I have learned a lot about the structure of character mesh files, and what I didn't know Sir Kane's 3ds mesh importer (http://www.saintsrowmods.com/forum/threads/mesh-importer-for-3ds-max.4661/) was useful for filling in the gaps. But one thing I still can't figure out is how textures are mapped to mesh objects.
Each character mesh is divided up into multiple mesh objects with each mesh object representing the exact same model but with different levels of detail. Using Kinzie (npc_Kinzie.str2_pc) as an example, shows that the character mesh is divided into four objects (or four lod). The highest lod is divided up into six different draw calls with each draw call representing a different portion of the model (in this order as read from the CMESH):
So how does the game know what texture goes to a particular draw call in a mesh object?
Each character mesh is divided up into multiple mesh objects with each mesh object representing the exact same model but with different levels of detail. Using Kinzie (npc_Kinzie.str2_pc) as an example, shows that the character mesh is divided into four objects (or four lod). The highest lod is divided up into six different draw calls with each draw call representing a different portion of the model (in this order as read from the CMESH):
- jacket
- gloves, buttons, glasses
- hair(bangs, bun)
- pants
- shoes
- finger tips
- kinzie_sm_upper_d
- kinzie_sm_upper_n
- hair_blonde_01_sb
- leather_02_sb
- cloth_matte_02_sb
- skin_ca_02_sb
- kinzie_sm_lower_d
- kinzie_sm_lower_n
So how does the game know what texture goes to a particular draw call in a mesh object?