Dynamic Textures with 3ds

Blitz3D Forums/Blitz3D Programming/Dynamic Textures with 3ds

Lilprog(Posted 2004) [#1]
Most of the modeling I do is with 3ds files using Milkshape 3d. In Milkshape I can use the texture coordinate editor to set my textures, Im curious if there is a way to select different textures in blitz 3d, and still have the coordinates apply.

For example, if I were to create 3ds models of players, and wanted to change their uniform / face etc.. without changing the model, could i load separate texture files in?

If so, what do you do when your using multiple textures on the same model?

Rob


jfk EO-11110(Posted 2004) [#2]
It depends if you use LoadMesh or LoadAnimMesh. WIth LoadAnimMesh you can identify Mesh Children by their Names (eg. head=FindEntity("Head"))

If you used to load them with LoadMesh, you need to parse the surfaces instead. Probalby you need to parse the surfaces anyway, when you use multiple Textures on one Mesh.

So the best would be:

-Recursively parse all children
-check all surfaces of each child
-identify each surface by tracking down it's brush texture
-store the information in an array.

Read the SaveB3D LIsting from the Code Archives to see how to track down a surfaces texture. It is very important that you track them down because the order of the surfaces will differ each time.

If you have once identified the surfaces, store them in arrays or something. now you can use the paintsurface command to do whatever you like with any individually textured part of your mesh.