GTA4材质

  • 格式:rtf
  • 大小:3.27 MB
  • 文档页数:6

GTA的材质设置和定义GTA4引擎基于着色器并需要使用预先定义描绘程序去渲染多边形。

这些程序(着色程序)可以在GTA\common\shaders\win32_30*文件夹中找到,但它们不会给你任何有价值的信息。

实际上,你只要在那找到着色器名字就足够了材料在Zmodeler里必须包含要用的着色器名字,否则就导出一坨屎(会弹出警报)。

着色器名字是:gta_vehicle_badgesgta_vehicle_basicgta_vehicle_chromegta_vehicle_discgta_vehicle_genericgta_vehicle_interiorgta_vehicle_interior2gta_vehicle_lightsemissivegta_vehicle_meshgta_vehicle_paint1gta_vehicle_paint2gta_vehicle_paint3gta_vehicle_rims1gta_vehicle_rims2gta_vehicle_rubbergta_vehicle_shutsgta_vehicle_tiregta_vehicle_vehglass实际上,所有来自游戏文件夹的着色器都可以使用,但我没有这些着色器的内部定义(正如我并没有一些上文列表的定义那样),但这只是时间问题。

因为所有着色器都有"gta_vehicle_"前缀,你可以省略它并使用简单名字就像"paint1", "mesh", "tire"等等。

如果你这样做,请确定设置了缺少的前缀就像图片下方那样:着色器名字是一个在材料名字中必须有的东东!你可以指定任何名字在材质的开头。

然后,接一个空格,着色器名字必须跟着。

例如替换:meshmeshinterior2 [CLR:2]interior2 [CLR:2]paint1 [CLR:1]你可以写:front_rear meshunderside meshseats1 interior2 [CLR:2]dashboard interior2 [CLR:2]Left and right side paint1 [CLR:1]此外,很多着色器可以使多边形有不同的表现(不同的结果出现在屏幕上)。

这些设置都是在GTA\common\shaders\db文件夹列出的. 在很多场合,着色器有一个一对一的设置文件,但你可以混合着色器和着色器设置。

我并不能确定这样一个混合的实际需要,但原版GTA模型通常有一个混合就像这样:gta_vehicle_lights (shader) 和 gta_vehicle_vehglass (settings)。

You can specify such a mix in ZModeler by specifying settings name in brackets of material name. 你可以依靠在材质名的框架里指定设置名在Zmodeler里指定一个这样的混合。

例如:lights(vehglass)等价于:gta_vehicle_lights(gta_vehicle_vehglass)很多GTA的交通工具着色器允许涂上不同的颜色。

如果你常常用GTA:SA DFF导出,然后一个所谓的"pri mary"和"sec ondary"的交通工具色现在可以在材质名里指定为[CLR:1]和[CLR:2]。

例如,使用材质的多边形:paint2 [CLR:1]就会涂上“pri mary”交通工具颜色,他们将使用深色金属的 "gta_vehicle_paint2"着色器。

多边形被分配给材质。

mesh [CLR:2]将被涂上“sec ondary”交通工具颜色,将使用"gta_vehicle_mesh"着色器。

每种材质可以有附加(additional)自定义设置,比如反射度,污垢度,高光级别诸如此类。

你也可以在材质编辑器的拓展(Extensions)\用户定义项(User Defined options)里为你的材质指定更好的设置:注意,如果你创建了新的材质,你可以手动添加必要的用户定义项。

确保正确指定条目的标注。

如果用户自定义values没有被指定,过滤器将会使用默认设置为材质导出。

I'll provide texture slots configurations for all known shaders, but it will take some time. Currently, you can refer imported models (they have to be loaded with all textures) or refer GTA Example Pack.材质设置每个着色器需要正确分配纹理的位置。

纹理位置必须有预先的应用方法,否则不能被识别。

“使用没有合理设置的纹理AAA用于着色器BBB”这种情况大多会有警告。

让我们看看对于纹理位置要合理设置的项:First of all, when you assigned a texture for certain texture slot, press "Edit..." button next to "Apply as" label.There are severl pre-defined apply methods for textures. Additionally, Use UV Mapping is important and it can vary in shaders, so make sure to set proper configuration before uv-mapping your model.Shader: gta_vehicle_paint1Texture layer #1: generic texture, usually white placeholder(vehicle_generic_smallspecmap). Apply as GTA: Texture, UV#1Texture layer #2: dirt texture, usually vehicle_genericmud_car. Apply as GTA:Dirt/Mud/Reflection, UV#2Texture layer #3: specular texture, usually vehicle_generic_alloy_silver_spec. Apply as GTA: Specular, UV#1.Environment reflection texture is added automatically to this shader.Note, specular layer (#3) and main texture (#1) uses UV#1. Thus, specular texture layoutmust match main texture layout. Stock models use blank white main texture and dots-noise texture as a specular. UV#1 is enlarged several times, so Specular noise texture is wrapped 10-20 times per body and noise appears as a very small glossy/metallic/pearl effect on car body.Shader: gta_vehicle_paint2Texture layer #1: generic texture, usually white placeholder(vehicle_generic_smallspecmap). Apply as GTA: Texture, UV#1Texture layer #2: dirt texture, usually vehicle_genericmud_car. Apply as GTA:Dirt/Mud/Reflection, UV#1Texture layer #3: specular texture, usually white placeholder(vehicle_generic_smallspecmap). Apply as GTA: Specular, UV#1Shader: gta_vehicle_badgesTexture layer #1: Badges texture. Apply as GTA: Texture, UV#1Texture layer #2: Badges bump-texture. Apply as GTA: BumpMap, UV#1Texture layer #3: specular texture, usually white placeholder(vehicle_generic_smallspecmap). Apply as GTA: Specular, UV#1Texture layer #4: environment reflection texture, usually vehicleenvmap128. Apply as GTA: Dirt/Mud/Reflection, Auto Sphere Environment UVShader: gta_vehicle_shutsTexture layer #1: Main door-shuts texture (usually vehicle_generic_doorshut). Apply as GTA: Texture, UV#1Texture layer #2: Bump-map for main texture (usually vehicle_generic_doorshut_normal) Apply as GTA: BumpMap, UV#1Texture layer #3: specular texture, usually white placeholder(vehicle_generic_smallspecmap). Apply as GTA: Specular, UV#1Shader: gta_vehicle_meshTexture layer #1: Main vehicle texture (usually vehicle_generic_detail2). Apply as GTA: Texture, UV#1Texture layer #2: dirt texture, usually vehicle_genericmud_car. Apply as GTA:Dirt/Mud/Reflection, UV#2Texture layer #3: Bump-map for main texture (usually vehicle_generic_detail2_normal) Apply as GTA: BumpMap, UV#1Texture layer #4: Specular texture for main texture, (vehicle_generic_detail_spec). Apply as GTA: Specular, UV#1Shader: gta_vehicle_interior2Texture layer #1: Main interior texture. Apply as GTA: Texture, UV#1Texture layer #2: Specular texture for interior, usually (vehicle_generic_smallspecmap). Apply as GTA: Specular, UV#1。