Game Development Community

one model many skins

by Dusty Monk · in Torque Game Engine Advanced · 04/09/2009 (2:19 pm) · 1 replies

So since the advent of TGEA we lost the ability to easily place one model in two different subdirectories, with a different skin in each folder, but named the same, and have them both load their respective textures. This is because the material mgr saves the texture name when it first encounters it, and then when it encounters it again, uses the cached texture, even if it has encounted the texture in a different folder.

So my question has anyone worked around this problem easily in TGEA, without re-exporting the model? That is, I have one .dts, and multiple color variations to use with the model. I'd like to load multiple instnaces of that model, each with a different color. The color change doesn't have to be dynamic, putting separate copies in separate folders is fine.

It seems like the "mapTo" field in the material definition should do this perfectly, but again it appears the mapTo specification is a one time thing only per texture. That is, it accepts the first "mapTo" specification I make, but any other mapTo's I make in future material definitions to that same texture in the .DTS are ignored.

Related (perhaps), can anyone point me to documentation/resources on the 'remapTextureTags' field in shapebase? This seems like it might get me where I want to go, but not entirely sure.

Thanks,

Dusty

About the author

Dusty Monk is founder and president of Windstorm Studios, an independant game studio. Formerly a sr. programmer at Ensemble Studios, Dusty has worked on AAA titles such as Age of Empires II & III, and Halo Wars.


#1
04/09/2009 (2:28 pm)
Oh hey looks like remapTextureTags is an AFX thing. Maybe I'll go bug those guys. The original question/dilemma still stands though, so any help or pointers would be greatly appreciate. :)