Materials and Textures
Understand ped materials, texture samplers and clothing variations
Introduction
A Blender material preview is not enough to make a GTA clothing material. The exported drawable also needs a compatible ped shader, correctly named texture samplers, UV maps and any vertex color channels used by that shader.
For a first item, preserve or duplicate the material from a working Freemode component with similar behavior. A shirt, transparent decal, skin-composited section and emissive accessory do not necessarily use the same setup. See Skin Tone Data before editing a body or head area that changes with the selected skin tone.
Common Texture Roles
An ordinary Freemode ped material often uses:
Diffuse
Visible color and, where supported, opacity
External YTD variation
Normal
Small surface direction/detail such as fabric and seams
Embedded in the YDD
Specular
Material response to light
Embedded in the YDD
Sollumz commonly exposes these through parameters such as DiffuseSampler, BumpSampler and SpecSampler. The exact parameters depend on the shader, so inspect the imported reference instead of adding sampler names from memory. Normal-map image data should be treated as non-color data in Blender.
Normal and specular textures are common for normal ped materials, but they are not universal requirements for every drawable. Decals, emissive materials, alpha materials and other special cases can differ. Copy the complete shader and sampler setup from a comparable working item.
For deeper Sollumz material controls, see Setting up Sollumz Shaders. Its example is for props, so use it to understand the interface rather than choosing its example shader for clothing.
External Texture Variations
Durty Cloth Tool uses one external YTD per selectable texture variation. The normal component naming pattern uses letters a through z, for example:
jbib_004_u.ydd
jbib_diff_004_a_uni.ytd
jbib_diff_004_b_uni.ytdKeep only the intended variation texture in each YTD. Extra entries add size without becoming additional variation slots. See Drawable Types & Textures and Files Naming for the full component and prop conventions.
Embedded Textures and Samplers
An embedded image is only useful when the material references it through the correct sampler. Keep the embedded name and material parameter aligned when replacing or renaming a normal or specular texture.
Use DCT's Embedded Textures Editor to preview, replace or rename embedded images and update linked shader parameters where possible. The Material Editor lets you verify the sampler assignments without returning to Blender for a simple reference change.
Texture Checklist
Before exporting, check that:
UVs use the intended texture and do not overlap accidentally.
Material slots still match the correct faces on every LOD.
Width and height are exact powers of two; see Textures and Power of Two.
DDS compression, alpha and mipmaps suit the texture's purpose.
Embedded names match the material sampler references.
Color 1andColor 2are present when the ped material expects them; see Vertex Colors.
When adding an external variation, Durty Cloth Tool can import YTD/YTD XML directly or create the YTD from common image files. Its Cloth Analysis Report also checks dimensions, mipmaps, missing samplers and unused embedded textures. Use the 3D Preview and live texture editing for quick visual iterations, then verify the final material in-game under different lighting.
Laatst bijgewerkt