Hi
I'm completely at a loss with this issue, and I've tried asking in various places, but with no luck.
I've tried on Reddit and the Unreal Answer Hub and I've either had no response or very little in the way of suggestions. I'm trying to get a baked AO map from Substance Painter to work in Unreal Editor for a character, and it just isn't working. I've tried looking around on Google, and what I've found suggests that the maps only work with Static Lighting...? Is this the case? Dynamic Lighting seems to generate its own AO anyway, but I've been told that an AO map is vitally important, so I shouldn't really skip it for my characters.
Whenever I connect my AO map up in the Material Editor, the map doesn't appear to make any difference from what I can tell. I'm only seeing the AO generated by the Dynamic Lighting. In fact, I've gone back to previous projects/models and noticed the same thing. I've checked the Red Channel and the AO map is there. I've tried enabling/disabling sRGB and setting it to/from Colour/Linear Colour, and I've hooked the texture from the red channel node to Ambient Occlusion. When I discovered I couldn't see any difference I then tried setting up a parameter in the hopes of increasing the strength, but that doesn't appear to be working either. :-\ Apart from disconnecting nodes and hitting apply, is there another and quicker way of checking to see if the map is having an affect on the Unreal...? I'm guessing not, but each time the shaders compile and the model goes blank/black for a few seconds, it makes it tricky to really notice if it has made a difference. As I say, I honestly can't tell. Then again, I did save two screenshots of before and after...
Replies
Right now your shader graph suggests you're multiplying the AO map by 0, which would erase any information in the map. Why are you doing this? If you're trying to debug its contribution, try using a Power node instead (and set your parameter to >=1!)
I don't think having baked AO is a hard rule, particularly if DFAO can carry it which it looks like it's doing to me.
The Power node is just a mathematic operation - like Multiply or Add, etc - that takes every pixel in a shader and outputs its value to the power of the 2nd parameter you provide. Like x^y for all x, y. It has the effect of increasing the contrast of the AO map, which can help debug whether or not it's actually appearing. Use it instead of the Multiply that you already have. After you compile/save the shader, you can scrub through your 'AO adjust' parameter in realtime, and see if there's anything changing.
https://docs.unrealengine.com/4.26/en-US/RenderingAndGraphics/Materials/ExpressionReference/Math/#power
Not as difficult as it sounds! Heres the official doc page for the node, comes with a fairly easy to understand example.
As for the seam, you likely need to flip your normal map's y axis/green channel (iirc).
As to the baked AO vs the Dynamic - I agree. I much prefer the Dynamic lighting and the AO it produces. However, I want to at least try and get the baked map to work. It’s just useful to know how to do it.
https://www.youtube.com/watch?v=fNTBzwa8arc
How bizarre! Unreal Engine's material AO is a magic black box to be honest - often not worth the trouble! Glad you got it sorted out though.
Aha. Cool. Good to know. Thanks for the tip. I did try using xNormal as that gives an option to bake a curvature map, but it keeps giving me an error about one of the meshes having an n-gon. I'm guessing it's the high poly. Although I did get Max to triangulate it. So I'm not sure if it has an issue with the high, the low, or the cage.
It looks like you are using a mirror UV for the head model. And the normal map for that part is wrong. Try to fix it with this solution
https://polycount.com/discussion/51088/tutorial-fixing-mirrored-normal-map-seams/p1
Oh that’s awesome. Thanks so much for sharing that. That should be super useful. When I finally get back to that project, I’ll have to try that out. :D