I’ve been thinking about textures and how unreal deals with them.
So, let’s say I have a super awesome toaster model. It has two 2k textures which I pumped out of substance painter.
I have a:
Image #1
Diffuse - RGB
Transparency - A
Image #2
Spec - R
Roughness - G
Ambient Occ - B
Metallic - A
So, what I’m wondering is… What if I create a single 4k and put both 2ks in there side by side? In this case I’ll have 1 texture instead of 2. Also, I’ll have room on the 4k for another 2 textures…say…for some toast. That’s 4 images rolled into 1. So the UV would have 4 texcoord also.
Ofcourse, there’s the issue that unreal is now loading a 4k texture rather than 2 2ks. I assume the memory footprint is the same?
It would, as yoy already mentioned, affect the granularity of the texture streaming.
Additionally, you would need more instructions on your material to transform the individual texture tiles into a 0-1 UV space.
In cases you have a toaster without toast or vice versa, you load/unload unneccessarily data.
I sometimes use even up to three textures, avoiding the use of alpha channels.
-Diffuse Texture (RGB)
-MSR Texture (RGB as Metallic, Specular, Roughness)
optionally:
-EOX Texture (RGB as Emissive, Opacity, Aux - used for any purpose)
I avoid using specular textures with UE4 because they are not needed.
Generally with Substance painter I use the standard “Unreal Engine 4 (Packed)”
G= Roughess
B= Metallic
R= Ambient Occlusion
But if I need transparency or emissive, I can try to put one of those in place of the metallic or ambient occlusion.
Depending on the material you could use a constant value for the metallic.
If you use default compression for that three channel texture then I would swap metallic and roughness places. DXT1 use rgb565 endpoints so green channel get better precision than other channels. Metallic is usually quite binary. It’s either metal or not. So you don’t need that much precision for it.
@KVogler - Makes sense. It would be alot less work to use 3…or 4… i forgot the normal maps. Thanks! @ZacD - Can you talk more on not needing a Spec pass? Dont we need that to tell unreal the value of the highlights?
[MENTION=37019]Jenny Gore[/MENTION] - Thanks!..didnt know the channels had different precision. Good to Know!
Most of the non metals have specular value in range of 0.02-0.04 This value is also quite constant per material. I usually just have slider per material to set specular value. For small scale occlusion for specular I just use AO map.
Jenny Gore is right, the vast majority of non metals have a specular value of .02-.04, and using just roughness and AO will give you realistic results. Normally playing with the specular value will give you unrealistic results, even for stylized films like Pixar or games like Overwatch, they try to keep the material properties realistic.
There are some exceptions, like sparkling, transparent, or translucent materials where I’ll abuse it a bit.
Specular does not belong in most materials and, if it does, it’s pretty safe to rely on a constant value (should be 0.5 for most materials).
In the packed texture, you should also include a cavity map for some of the finer details to add to both the diffuse (straight multiplication) and the specular (0.5*cavity).
Depending on how well the materials are divvied up on some meshes, you can also generally assume 0 (non-metal) or 1 (metal), but I’ve found that a more fine-grained metallic map ends up looking a lot better.
For my own purposes I have:
An albedo (RGB)/displacement (A) - with an as-needed mask/transparency channel swapping in for displacement
Random kinda off topic question, I know that DFAO provides specular occlusion on skylights, is that the only automatic specular occlusion in the engine?
What are your guys thoughts on multi resolution texture passes? Meaning say… Diffuse being 4k, and others 2k, or any other combination. Diffuse and Normal has to match, but can I get away with 2k or less for the others? I’m thinking maybe opacity and AO can be smaller since it doesn’t matter too much if they are blurred a little.
I’m planing on testing it this weekend, but I thought I’d ask since I’m here.
Normal map and roughness are most important maps. Usually albedo don’t need to be as big as normal map.(It’s albedo not diffuse). Physical based materials does actually have pretty bland and boring albedo textures. Most details come from lighting.
That depends on the mesh its used for.
A small object with littlefeatures, like a light switch, doesnt need a detailed texture as a fully fledged cyber battle tank mecha.
The only place where I have seen 8k textures so far is the UE Kite Demo.
Also, for detailed characters you will rarely use one material/texture for the entire model.
Lot’s of games use 8K textures for special cases like landscape and global shadow maps. But rarely or ever objects have that big textures. Objects also need many maps. Albedo, normal map, roughness, height, ao, metalness, alpha. These are total 2-4bytes per pixel compressed. 8k^2 * 2-4bytes = 128-256Mb. Then multiply that with how many different objects you have and compare that to available video memory.