Material Ambient Occlusion in Unreal Engine 5

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
I'm going to jump straight into a setting you should probably have set up right now in your Unreal Engine 5 project settings search for allow static lighting and uncheck this box that will now enable material ambient occlusion which will allow us to go from this result to this much cleaner and improved shadowing in indirectly lit areas you're welcome if you've been using alumin in onreal engine 5 for a while you might have noticed that it is missing the ability to control ambient occlusion and while we used to be able to control AO through the postprocess volume in Unreal Engine 4 things are different now now right before we jump into how and why this all works and a bit of a Shameless plug this video is sponsored by me in December I released a new tool called easy mapper on the Epic Marketplace which is now 50% off for the next week easy mapper is a master material setup that supports World align tripler texture projection combined with nanite tation and displacement and and advanced vertex blending allinone elegant package for easy texture blending on all of your assets I also just released an update for easy mapper allowing custom grayscale maps and the ability to paint puddles so if you've been on the fence now is the time to get it because it is dirt cheap you'll find the link down below okay so let's dive into why material AO is important ambient occlusion or AO for short is a rendering technique used to simulate the soft Shadows that occur in creases cracks and corners objects where light is uded by nearby geometry or models or whatever screen space AO was a very popular feature in ui4 and a lot of people are wondering why it can't be used anymore with lumen in Unreal Engine 5 however Lumen uses a technique called Global illumination or GI for its lighting GI is all about direct and indirect Lighting in a scene including effects like proper color bleeding and reflected lighting and shadows from multiple light bounces unlike ambient occlusion Global illumination does take into account the interactions of light with surfaces and materials AO only take the proximity of Goo into account not the lighting so even if a surface is brightly lit AO still shows up and looks a little fake in gy AO and GI are two totally different rendering approaches so with Lumen a screen space AO isn't really necessary anymore because GI takes care of the ambient Shadows for us already having ssao and GI would result in Shadows that are way too dark and it's just it just doesn't look very good but Lumen isn't perfect in order for unreal to run in real time shortcuts need to be made somewhere and Lumen takes those shortcuts by sacrificing lighting quality and more specifically lighting accuracy because while Lumen does use Ray tracing it only calculates about half a ray per pixel while path Trace renders need about 200 plus Rays per pixel for acceptably noise-free GI so yeah shortcuts need to be made somewhere there's no free lunch while Lumen does take care of the general shadowing between objects in fact it's really good as of unreal in 5.3 I've got to give credit where creditors do but it just isn't accurate enough to get those really satisfying high frequency detail Shadows that you get when you compare it with the p Tracer take a look at this render I made in a video last year the pass Tracer results are simply better especially once you know what to look for fortunately that is where material AO can come in very handy which is the feature we just enabled by disabling that check box at the beginning of the video don't ask so here I have this awesome suit of armor model you'll see that the armor bits do get a bit of self shadowing thanks to GI and Lumen you get this for free but some of those contact Shadows still feel a little bit floaty like this part here for example right in between the two metal plates it should be very dark not much light should be able to reach in there if we compare to the path Tracer you'll see that the path trace results just feel more better the pieces of armor feel more connected right here again if we zoom in to those thinner plates of metal the contact Shadows here are just so soft and accurate and crisp it is all about those contact Shadows but using material AO we can partly make up for that lack of accuracy when using Lumen so using an AO map for this model by plugging the map into the ambient occlusion slot of the material we can go from this to this it is a huge difference but the really cool thing is that if I rotate the light around you'll notice that the AO we added Fades away it only shows up in indirectly lit areas of your model it isn't just multiplying the AO on top of the base color like that old school thing we used to do back in like 2008 this is great because you wouldn't want a dark AO Shadow to show up up when a big bright light is shining directly on it right it is another way for us to squeeze out a bit more detail in those indirectly lit areas that Lumen really can struggle with a bit so see what happens if I toggle the AO map on and off it is a day and night difference major Improvement now I did add some additional cavity detail to the AO map just to accentuate the example but you get the idea fortunately every single Mega scan surface you download from the quick Bridge comes with an ARD o map meaning the ambient occlusion map is here in the red Channel but unfortunately the mega scans models do not seem to have AO included only the roughness and displacement which kind of sucks but don't worry there is a way to bake AO on your models directly in unreal so first you're going to need to enable the modeling tools plugin by going here to plugin and search for modeling make sure these are checked once you restart the engine you'll find the modeling tool here or you can use the shortcut then we can navigate to the bake tab over here select the model whose AO map you want to bake and select ambient inclusion from the list set it so that the AO map is saved to the correct folder choose your desired resolution and there you go you'll have your AO map baked and ready to plug into its material easy mapper or otherwise unfortunately unreal seems to use the CPU to bake the AO Maps which makes it a lot slower than the GPU baking that other apps like subst painter and designer use but I mean it's amazing to have this baking feature built directly into the engine I didn't even know it existed until recently so I hope you found this tip helpful thank you so much for watching everyone and as always folks happy rendering
Info
Channel: William Faucher
Views: 70,548
Rating: undefined out of 5
Keywords: Unreal Engine 4, Unreal Engine, Cinematics, UE4 4.26, UE5, Realtime, realtime rendering, rendering, CGI, 3D, 3D Artist, UE4, Unreal Engine 5
Id: 65cgc3jbNlg
Channel Id: undefined
Length: 6min 53sec (413 seconds)
Published: Thu Feb 15 2024
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.