Hi there,
Long after PBR is introduced, I'm still wondering about one thing.
Do we have to use an AO texture for every single Albedo texture? if so, why not just keeping the shadows in the texture in the first place? if that is because we can control the AO intensity, doesn't that mean we have to change it's intensity under each different lighting condition to make it sit perfectly? that shouldn't be a good way of doing things.
Here is my maps:
In engine render:
What always seems better in my eyes is exactly breaking the first rule of PBR, which is taking out all the shadow information. Like on the right, it feels better than the left.
Taking out shadows does make sense to me when it's about a geometry with curvatures, where engine already adds AO to it, but like 90% of surfaces are not bending on themselves or curves like that.
Replies
That said, it's all about the end result. Do what makes sense visually, and technically, for whatever project you're working on
Edit: And to clarify, PBR doesn't suggest you don't use a detailed AO via texture, it suggest you seperate your AO and Albedo and multiply them together realtime.
I dont know what engine this is, but you may try messing around with the SSAO settings
Moreover with typical metallic / roughness aproach it would not allow to wipe out highlight completely from those "in-cracks" shadows even with 100% roughness.
@radiancef0rge, Sorry for not mentioning the engine. It's UE4. It does shadow the cracks in the normal map but it only does it for that part of the surface that's in the shadows.
If the engine do AO for normal map even while the surface is not under a shadowed area then that's a more realistic result. Like the Diffuse/Albedo comparison texture in the OP, the diffuse is also taken in bright day light but it does have AO in the cracks.
One temporary solution can be letting some AO be there in Albedo itself so when a light does reach a surface and take out all the AO there'll still be a little shadow there from the Albedo. But still say the material was also use in an overcast level too then we need to duplicate the material.
So after all, I'm still not seeing a clear approach to this.
An example I always like to use when this comes up is: Go look under your fridge. Its really dark under there, yeah? Now shine a flashlight under it, it lights up, right?
If you bake medium-large scale AO into your diffuse, what you're essentially doing is flagging the area under the fridge as dark no matter if a direct/dynamic light source hits it. This is physically incorrect, and well, just looks dumb when you see in it in game.
This is not a "fail" of PBR, it's an advantage of it. When the AO data is stored in a separate map, the shader can use the information in a more intelligent way.
Now, for small detail aka micro-occlusion, where you don't have enough geometry resolution to properly shadow, you may want to include high frequency details in a cavity map. Typically, a cavity map will apply to both ambient and direct light sources. For more on this, check out the explanations for AO vs cavity maps here: http://www.marmoset.co/toolbag/learn/pbr-practice
Its worth noting that the example in the OP is closer to what I would consider cavity detail rather than AO detail.
Edit: The orange area should still be darker while there is light shining on the surface is what I'm trying to say.
No matter what I plug into the AO slot in UE4, it all completely goes out in angles that are facing light between the whole 0 to 89 degrees. I'm curious to know how should I be using a cavity map so it also stays there on the surfaces that are lit.
Before PBR it was no problem at all since the system was much more flexible and not so physical dogma driven.
In such cracked surface I personally even can't use the normalmap for cracks shading because I can't make the texture repeating in each few meters to get enough normal map resolution and strong highlight just wipes those cracks shadows out whatever roughness they would be.
That was actually such cracks on the asphalt when I changed my initial excitement about PBR to pretty opposite opinion.
Apart from changing the spec level it does nothing else really what you said.
The only solution seems to be changing the term "Remove AO information from texture" to "Reduce AO information from texture" in PBR rendering until game engines catch up with more options such as micro AO/Cavity shader, that doesn't get wiped out if there's light on the surface.
that is absolutely incorrect. it is used for cavity shadowing
https://docs.unrealengine.com/latest/INT/Engine/Rendering/Materials/PhysicallyBased/index.html#Specular
http://blog.selfshadow.com/publications/s2013-shading-course/karis/s2013_pbs_epic_slides.pdf slide 20
You can get full black by setting the black areas as metallic. Because the albedo defines the brightness and colour of metals' specular highlights, setting the albedo to black removes all highlights for those areas.
Also, if light's never ever ever going to get into those cracks, you can totally multiply the AO over the diffuse input. It might be breaking a rule or something, but this is one of the scenarios where I don't really see a downside.
I have adjusted the levels/contrast to strengthen the effect and plugged it into the Specular slot. As gnoop mentioned
No matter how the map is looking up there I only get to see a change in specular level.
@Joopson, Setting the cracks to metallic does darken it a little. The amount depends on the brightness of the albedo and we cant adjust the cracks in albedo to look darker because that'd be the same as multiplying AO with albedo.
As you said so here's the result.
@Cathodeus, Wise words from a zBrush master. Have no other option left but trying to break the rules and find my own pipeline.
Thanks all for the time.
Still I consider it a huge pain in the a.. altogether. Because it's basically a trying to deceive inflexible PBR system , too honest for all those tricks.
This ground cracks was just an example I used quickly from CGTextures. This problem happens with everything imagine a tree bark, a wooden shield, a rocky surface etc. none of them get AO on them by the engine unless another object is too close to them, and while the AO map doesn't keep anything if light is reaching that surface we'll only be seeing "base color" meaning only pure flat colors and normal map with no darkening in the cracks and things like that at all that's too ugly.
So keeping AO information in diffuse is not the best approach but it does the job until game engine at least supports some micro AO even while the light is reaching a surface.
To be clear, the metalness workflow itself is not "PBR", its not mutually exclusive or inclusive to the concepts of physically based rendering. It is simply a method to pack textures inputs to save on memory, while providing a fail safe for implausible materials. Yes, working with the metalness workflow has certain drawbacks, but it's very misleading to tie those to PBR.
Now, to get cavity detail in UE4, you can simply multiply your cavity map on your base color. This will effect the diffuse for insulators and the specular for metals (so you may want to mask your cavity map with your metalness map to prevent it from showing on metallic areas). Because it's generally desirable for cavity detail to multiply on ambient and direct light sources this content doesn't need to live in a different map like AO. Again, this is a very bad idea for mid-large scale ao but should work fine for micro-occlusion aka cavity detail.
As Chris says, Epic's docs clearly state that this is what should be happening when you use the spec input, but I guess the docs are incorrect and it isn't happening. Weird. Anyway, at minimum it masks the insulator reflectivity, so if you want to apply your cavity map to occlude micro detail on the spec pass for insulators, load the cavity map here as well.
It's also important to note that this a cavity map:
While this is a curvature map (contains both concavity and convexity detail):
More here, including how to convert curvature to cavity/convexity: http://www.polycount.com/forum/showthread.php?t=140861
Sorry; I should have been clearer. Setting the cracks to be black AND metallic. That's the only way in PBR to get pure non-light-accepting black.
So take your cavity map, multiply it onto your diffuse. Then take the cavity map, invert it using a one-minus node, and plug that into Metalness. I have to say though, pure black can be really jarring to the viewer, so be careful using it.
Personally I try to deviate from rules as little as possible. It might not make the most eyecathing assets, but it makes for more pleasant looking scenes.