Game Development Community

How does Torque call textures?

by Scott Army · in Artist Corner · 09/03/2005 (8:04 pm) · 1 replies

I have a dillema with regards to laying out my textures. I'm wondering if it would be more efficient to lay out small textures for a character's weapons/accessories or to try and fit everything into one larger file. If it's the case that Torque calls the entire large texture file each and every time a mesh that uses the texture,m that doesn't seem terribly efficient.

So as an example, I have a character and a weapon. I could make one large texture (say 512x512) for both models. Or I could make a large texture for the character and a small one for the weapon. If I choose to make them all on one texture file will Torque access two copies of the 512x512 texture when it draws the guy with the weapon in his hand? If that's the case I'd probably be better off making the guy 512x512 and the weapon 256x256.

#1
10/14/2005 (3:25 pm)
Duplicates would only be created if the texture files were duplicated, i.e. player.png and player1.png have the same image. Otherwise the engine should use the handle (pointer/whatever) to the specified texture, no matter how many different models use it.

I personally recommend keeping textures specific to their models and vice versa. So, yeah, making separate skins for the player(s) and weapon(s) is a good idea. I'd also use separate skins for any other equipable items like armor, backpacks, flashlights, etc.