This can be an trivial question for some, also i didnt find the answer in the 1st 6 pages of my search... so my question is:
What is better for character texturing? 1 huge texture (i.e 2048x2048) with all elements on it (head, arms, dorso) or smaller textures for each part of body (i.e 64x64 for had, 128x128 for head...)... What is, for each method, the pros/cons about performance/video memory?
If i wasnt enought clear in my question, please tell me (as you can see, english is not my main language :) ).
Ty in advance.
Texturing Method (single huge vs some small)?
Started by pabloescobar, Feb 27 2008 02:20 PM
5 replies to this topic
#1
Posted 27 February 2008 - 02:20 PM
#2
Posted 27 February 2008 - 03:40 PM
This depends on the situation I'd say.
One large texture makes several things easier, your own file formats, the renderer needn't deal with changing textures during rendering the character, your artists needn't try to fix texturing seams across texture boundaries, and so on.
However, one large texture may produce unneccessary memory consumption when mapped without thought, and may not be supported on all hardware, though I guess both are rather pathological cases.
One advantage in choosing different textures for head, torso, and so on, is the ability to have a greater variety of characters by creating various sets for each body part for instance. Consider a figure with 10 different head textures, 10 different body textures and 10 different legs and arms textures. This gives a total of 1000 different characters that can be produced by arbitrarily mixing these up (note though that they still share the same mesh which can look a little bit artificial)
However, for a standard nonprofessional project, I'd stay with one larger texture, if but for convenience.
I can't tell you anything about hardware performance when comparing different texture sizes in this context, though I can add that texture changes used to be a bit costy.
Cheers,
- Wernaeh
One large texture makes several things easier, your own file formats, the renderer needn't deal with changing textures during rendering the character, your artists needn't try to fix texturing seams across texture boundaries, and so on.
However, one large texture may produce unneccessary memory consumption when mapped without thought, and may not be supported on all hardware, though I guess both are rather pathological cases.
One advantage in choosing different textures for head, torso, and so on, is the ability to have a greater variety of characters by creating various sets for each body part for instance. Consider a figure with 10 different head textures, 10 different body textures and 10 different legs and arms textures. This gives a total of 1000 different characters that can be produced by arbitrarily mixing these up (note though that they still share the same mesh which can look a little bit artificial)
However, for a standard nonprofessional project, I'd stay with one larger texture, if but for convenience.
I can't tell you anything about hardware performance when comparing different texture sizes in this context, though I can add that texture changes used to be a bit costy.
Cheers,
- Wernaeh
Some call me mathematician, some just call me computer guy. Yet, I prefer the term professional weirdo :)
#3
Posted 28 February 2008 - 12:42 PM
Dealing with textures on a one to one basis:
Pros:
1) Very easy to do. Just load and go.
2) Offers the highest quality, since a single texture can utilize up to the card's maximum texture resolution.
Cons:
1) Memory inefficient. 3D APIs require (by default) power of 2 textures. So if your image is 96x48, you need to increase the image size to 128x128. For a couple images that's not a big deal, but when you start getting into 50+ images, you'll see the difference. Now there are ways to support non power of 2 textures, but in doing so you forgo mipmaps, which offer huge performance and memory boosts.
Dealing with packed textures:
Pros:
1) More memory efficient, but you need to intelligently pack them. The idea is you'll group several images into one large texture (max = 4096x4096 on most cards) in the most efficiently packed way.
2) It's more organized, since for a single character you have everything defined in one image, as opposed to several smaller ones. This in turn helps load times and reduces fragmentation.
3) Having just one texture allows you to render the entire geometry in one shot. This creates fewer render calls, which in turn improve performance.
Cons:
1) You need a tool to manage this sort of work because manual labour will result in the loss of your sanity. You need to provide coordinates to all the sub images and then set the texture matrices accordingly so your objects render with the specific image.
2) It's more difficult to work with. Artists will have a smaller UV space to work with since everything is shared.
3) Having everything in one image makes it more difficult to share textures for different purposes.
4) With linear texture sampling, you'll have to be extra careful at the seams, since the edges can leak out into other parts of your texture.
Pros:
1) Very easy to do. Just load and go.
2) Offers the highest quality, since a single texture can utilize up to the card's maximum texture resolution.
Cons:
1) Memory inefficient. 3D APIs require (by default) power of 2 textures. So if your image is 96x48, you need to increase the image size to 128x128. For a couple images that's not a big deal, but when you start getting into 50+ images, you'll see the difference. Now there are ways to support non power of 2 textures, but in doing so you forgo mipmaps, which offer huge performance and memory boosts.
Dealing with packed textures:
Pros:
1) More memory efficient, but you need to intelligently pack them. The idea is you'll group several images into one large texture (max = 4096x4096 on most cards) in the most efficiently packed way.
2) It's more organized, since for a single character you have everything defined in one image, as opposed to several smaller ones. This in turn helps load times and reduces fragmentation.
3) Having just one texture allows you to render the entire geometry in one shot. This creates fewer render calls, which in turn improve performance.
Cons:
1) You need a tool to manage this sort of work because manual labour will result in the loss of your sanity. You need to provide coordinates to all the sub images and then set the texture matrices accordingly so your objects render with the specific image.
2) It's more difficult to work with. Artists will have a smaller UV space to work with since everything is shared.
3) Having everything in one image makes it more difficult to share textures for different purposes.
4) With linear texture sampling, you'll have to be extra careful at the seams, since the edges can leak out into other parts of your texture.
http://www.nutty.ca - Being a nut has its advantages.
#4
Posted 28 February 2008 - 08:13 PM
ty for tips :)
#5
Posted 28 February 2008 - 11:20 PM
To add one more thing:
A big texture made from multiple sub-textures may cause problems with mip-mapping.
A big texture made from multiple sub-textures may cause problems with mip-mapping.
My music: http://myspace.com/planetarchh <-- my music
My stuff: torus.untergrund.net <-- some diy electronic stuff and more.
My stuff: torus.untergrund.net <-- some diy electronic stuff and more.
#6
Posted 29 February 2008 - 06:34 AM
You can minimize it if you control mipmap generation.
1 user(s) are reading this topic
0 members, 1 guests, 0 anonymous users











