Home Technical Talk

How Texture Affecting Performance Issues

Few question that I'm not sure regarding texture optimization, I don't know where to begin so it's best I state a few example that I have in mind.

I actually started to ask myself these when I was asked to seperate the leaves and tree bark texture into two map which explained to me the reason why was as the leaves being rendered 2 sided, the tree bark will be rendered as the same setting too, in which is unnecessary and wasting memory usage.

Now I have another similar question, if I were to use a map with 90% being an opaque object and only 10% using alpha from transparency, would that be wise? Or best seperate into another map, in which alpha is being utilized more in that map. By they way, I'm speaking of map for modular models, not a map for a single object. In my case it would be, windows and doors, frames and some other stuff to make the variations possible.

My 2nd question is, when an engine reads a map consisting 4 256*256 objects in a map versus, 4 256*256 maps for the objects, which one would be faster? Or is there any difference at all?

Lastly, I really would wish to learn more on this "topic" on how various kind of texture planning can and how it affect the engine's performance, but I'm lacking the keyword to find fruitful result on the web. If anyone could show me the way, I'd be glad and happy.

Replies

  • tristamus
  • Randize
    Options
    Offline / Send Message
    Thanks man, I'll give that a read and come back if I have questions left. Appreciate the direction by the way. Thanks again tristamus.
  • EarthQuake
    Options
    Offline / Send Message
    Randize wrote: »
    Few question that I'm not sure regarding texture optimization, I don't know where to begin so it's best I state a few example that I have in mind.

    I actually started to ask myself these when I was asked to seperate the leaves and tree bark texture into two map which explained to me the reason why was as the leaves being rendered 2 sided, the tree bark will be rendered as the same setting too, in which is unnecessary and wasting memory usage.

    Now I have another similar question, if I were to use a map with 90% being an opaque object and only 10% using alpha from transparency, would that be wise? Or best seperate into another map, in which alpha is being utilized more in that map. By they way, I'm speaking of map for modular models, not a map for a single object. In my case it would be, windows and doors, frames and some other stuff to make the variations possible.

    Yes it is always better to split off your alpha stuff if it is only a small % of the asset that needs alpha, the reason is simple, a 1024x1024 texture with 24 bit(standard) is 1/4 the size of the original texture, and a 1024x1024 32 bit(with alpha) is only 1/2 the size when compressed. So you're doubling the amount of texture data for that diffuse texture. Now, say you only need 128x128 for alpha, we'll see huge texture savings here.

    So if you have alpha for your entire 1024, think of it like this:
    1 1024 normal
    1 1024 spec
    1 1024 diffuse
    1 1024 alpha

    so, 4x1024

    OR, with a smaller 2nd texture:

    1 1024 normal
    1 1024 spec
    1 1024 diffuse
    1 128 normal
    1 128 spec
    1 128 diffuse
    1 128 alpha

    Now when we consider that you can fit 64 128s inside a 1028, you'll see the large memory gain, as you're only adding 1/16th addition memory, as apposed to 1/3rd additional memory with a full alpha. If you're only using diffuse textures, the % of texture savings is even higher. 100% extra, or only 1/64th extra.

    Its very important to think of textures in terms of compressed memory, and then we have to remember the rule that a 24 bit image compresses 4:1 and a 32 bit image compresses 2:1.
    My 2nd question is, when an engine reads a map consisting 4 256*256 objects in a map versus, 4 256*256 maps for the objects, which one would be faster? Or is there any difference at all?
    This one is very confusing, what is better, 4 256*256 or 4 256*256? Those are both the same.

    Unless you mean mapping 4 objects to a 512x512, or having 4 objects separate 256x256.

    In this case, if the objects will always be seen together, and share the same material, its better to do it all one on material, and if they are 4 unique items, that will be loaded in different areas of a level, its always best to separate them.
    Lastly, I really would wish to learn more on this "topic" on how various kind of texture planning can and how it affect the engine's performance, but I'm lacking the keyword to find fruitful result on the web. If anyone could show me the way, I'd be glad and happy.
    search:
    dds texture compression
    draw calls
    texture usage
    etc
Sign In or Register to comment.