Most Efficient Way to Handle Large Amount of Textures
Hey All,
I'm looking into ways to most efficiently handle a large amount of tiling environment textures that will be shared across a large amount of environment objects. What are the best ways to tackle this?
I'm currently mulling over packing 512 textures into an 8k atlas. This would give me 256 different textures to work with (roughly 85 different materials - 3 textures per material).
I've heard that Texture Arrays are also another way of handling this, but don't know a lot about them. Is there a better/more efficient way to handle a large number of texture assets?
I'm looking into ways to most efficiently handle a large amount of tiling environment textures that will be shared across a large amount of environment objects. What are the best ways to tackle this?
I'm currently mulling over packing 512 textures into an 8k atlas. This would give me 256 different textures to work with (roughly 85 different materials - 3 textures per material).
I've heard that Texture Arrays are also another way of handling this, but don't know a lot about them. Is there a better/more efficient way to handle a large number of texture assets?
Replies
-
Hi. First of all you should think about if you really need that many textures. Maybe it is possible to work with other techniques like blending several textures together. Anyway sometimes you need that many textures.
Texture Arrays are a good solution and it would be much easier to handle than an atlas texture. Also with atlas textures you might run into seam and tiling issues. Your mesh and uv has to be layed out to tile an atlas map, with an texture array you can tile as usual. Also 8k, even 4k is not supported on all GPUs.
You would just need a custom shader that supports texture arrays. Not sure though if there is a limit to texture size, but from what I heared 256 textures is possible.
Also you need some kind of splatmap to identify the texture, a.g. a seperate texture or vertex color.
The downside is that you need all that textures in ram of your gpu. It would be best to know upfront if all of those are required. -
What kind of game is this for. Its relevant to an answer
-
You should profile the game before you do anything drastic.
-
McDev said:Hi. First of all you should think about if you really need that many textures. Maybe it is possible to work with other techniques like blending several textures together. Anyway sometimes you need that many textures.
Texture Arrays are a good solution and it would be much easier to handle than an atlas texture. Also with atlas textures you might run into seam and tiling issues. Your mesh and uv has to be layed out to tile an atlas map, with an texture array you can tile as usual. Also 8k, even 4k is not supported on all GPUs.
You would just need a custom shader that supports texture arrays. Not sure though if there is a limit to texture size, but from what I heared 256 textures is possible.
Also you need some kind of splatmap to identify the texture, a.g. a seperate texture or vertex color.
The downside is that you need all that textures in ram of your gpu. It would be best to know upfront if all of those are required.radiancef0rge said:What kind of game is this for. Its relevant to an answer -
For masks you don't need rgba/rgb images, you only need a single channel per mask, meaning you can stack up to 4 masks in a single image i.e one per channel in an RGB/RGBA image. But you will have to write a custom shader for this but it's fairly simple with amplify shader editor/shaderforge, but the payoff is uuuuge.
-
Some texure maps can also be re-created by multipying a single color with the greyscale version of the original map(grass,sand),Do this as well where possible and you can than pack that greyscale version of the map just like an alpha/mask.
-
Some examples of this in action over in my Sketchbook, if it helps.
http://polycount.com/discussion/comment/2490402/#Comment_2490402