How do I optimize textures for my 3D assets?
I'm currently finishing some assets for UE4. As an artist, how do I go about optimizing my textures? Is it just enough to include a variety of resolution maps (ex. 4k,2k, 512). I have thought about materials IDs. How much do they affect the performance?
There are two basic guiding principles when it comes to textures:
Speaking of MIP mapping, you don't have to worry about manually creating different resolutions for textures, the engine will take care of that. Just create the source image in as high res as you can, you'll be able to set the in-game size later.
Anyway, there is more to texture optimization that this (packing, tiling, mixing different frequency details, procedurally changing parts of a texture to avoid storing slight variations of the same texture, etc) but those are longer topics.
I hope this helps, let me know if you have questions. :)
answered Jan 07 '19 at 08:43 AM
I can give you view from programmer perspective
Textures by themselves don't take performance as once texture lands to VRAM it just sits there and all depends on how it samples and process by the shader... but thats shader job. So textures mainly effect VRAM usage, the more VRAM used the more UE4 gonna swap data on it and risk of running out of memory and crash increases. Shaders also have texture sampler limit. GPU don't recognize types of maps, for them they are just textures like any other and shaders which GPU executes give them proper function.
Textures are also laoded to VRAM as either raw bitmap or lossless compression format (like DXT) as GPU don't understand compressed images like PNG or JPG, so they take more space on VRAM then there file counterpart
You can decrese number of maps by putting single channel once (white and black maps) to single texture on different color chanell and on shader separate them route them. Shaders are super fast and just sampling and routing color channels should be breeze even for low spec GPU, even simple calculations are fine, problems is if you do some heavy calculations or resampling.
Follow this question
Once you sign in you will be able to subscribe for any updates here