texture parts of mesh

Blitz3D Forums/Blitz3D Programming/texture parts of mesh

Rook Zimbabwe(Posted 2004) [#1]
I have a blazingly silly question.

OK the lack of surprise at that statement has forced me to continue meekly...

If I have a mesh lets say of a hand. AND

All the parts of the mesh are named ie: thumb, pinky, ring, middle, palm etc.

CAN I:
Assign textures to the individual parts of the mesh that are labeled after I load the mesh?

IOW:

Could I assign one texture to index and a different to palm?

Or do I have to use a program like Ultimate Unwrap 3d...

But see I was thinking of changing them during the game...


jfk EO-11110(Posted 2004) [#2]
when you load the mesh with LoadMesh then the individual parts of the mesh can be identified as surfaces. You would then have to use then "paintsurface" command to assign individual brushes (and the brushes use individual textures, see LoadBrush). You might use the GetTextureName$ Function to find out which Surface should use which texture. (Study the SaveB3D Example in the code archives for that)

If you load it using LoadAnimMesh then you can access the parts as children, but take care, the hierarchy might be nested, so you have to parse the hierarchy recursively or use the FindChild Command.

But of course, this requires that the mesh is stored with mutliple materials or children (or both).