I am trying to implement something I’ve seen in some commercial games. Basically a single model is used for a character (say a soldier). But there are several texture sets which are made for the model, so you can have differnt teams,colors, etc.
The textures are stored in a subfolder under the model’s path.
What I’d like to do is programmatically allow the user select which texture to use by letting them specify a folder.
Now I haven’t tried it yet, but think I figure out the setTexture sample code in the manual to switch this for simple models with 1 texture if it’s always the same filename. seems simple enough.
But if some models have multiple textures, is there a way I can just change the paths used by all textures in a model?
Say the default textures are:
the user chooses to use the set in /green_soldier/
I would need to load and set:
so whats the best approach ? (assuming I don’t know beforehand the name of the texture files or the number of files a model uses)