One big texture or many small textures for one model?

Dont games always use only 1 texture? Im not sure about modern games but what i've seen of the hl1 engine all the models were always unwrapped to 1 texture.
 
A single big texture should lead to a lower number of GPU state changes needed for rendering the model in question (unless you also change other state between different parts of the model, such as shaders or blend mode). This should, at least in principle, lead to higher performance.
 
Many small textures in one texture = texture atlas, and as arjan de lumens said, this method leads to better performance. Google for BatchBatchBatch by Matthias Wloka - it should clear some things for you. Batching is graphics programmers mantra - it is about feeding GPU with as much work as possible with every draw (for ex. DrawIndexedPrimitive in d3d) call, which in effect leads to fewer draw calls = fewer state changes, lesser driver overhead etc. So do everything to group your geometry, shaders & textures efficiently.

Puting perfomance aside, texture atlases help save samplers = you can access more textures in fragment (or/and, with SM3.0, vertex) shader.

And again, last but not least, print it and stick over your bed: BATCH BATCH BATCH :cool:
 
With the atlas, you probably need to take some special care so that MIP mapping works nicely. There is a thread in the games developers algorithms forum which you may find useful.
 
Vadi said:
What is better performance wise?

If it's only one model in any one scene, I doubt there's any reason to be concerned whichever way you choose. With every additional model in a scene, you'll have to consider CPU hits.

Not sure if this helps or is related to whatever you're working on.
 
Back
Top