Material Ambient Occlusion in Unreal Engine 5
0:00
我将直接进入您现在应该设置的一个选项。
I'm going to jump straight into a setting you should probably have set up right now.
0:05
在您的虚幻引擎5项目设置中,搜索“允许静态光照”,并取消选中此框。
In your Unreal Engine 5 project settings, search for Allow Static Lighting and uncheck this box.
0:12
这将启用材质环境光遮蔽,让我们从这个结果变为这个。
That will now enable Material Ambient Occlusion, which will allow us to go from this result to this.
0:19
间接照明区域的阴影变得更加干净和改善。别客气。
Much cleaner and improved shadowing in indirectly lit areas. You're welcome.
0:24
如果您在虚幻引擎5中使用Lumen一段时间,您可能注意到它缺少控制
If you've been using Lumen in Unreal Engine 5 for a while, you might have noticed that it is missing the ability
0:30
环境光遮蔽的能力。虽然在虚幻引擎4中我们可以通过后处理体积控制AO,但现在情况不同了。
to control ambient occlusion. And while we used to be able to control AO through the post-process volume in Unreal Engine 4, things are different now.
0:38
在我们深入了解这一切是如何运作的之前,稍微做个广告,这个视频由我赞助。
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.
0:45
在12月,我在Epic市场发布了一款名为Easy Mapper的新工具,现在下周享受50%的折扣。
In December I released a new tool called Easy Mapper on the Epic Marketplace, which is now 50% off for the next week.
0:52
Easy Mapper是一个主材质设置,支持世界联盟三平面纹理
Easy Mapper is a master material setup that supports World Alliance triplanar texture
0:56
投影,结合纳米细分和位移,以及高级顶点混合,所有这些都整合在一个优雅的包中,便于在所有资产上进行纹理混合。
projection combined with nanite tessellation and displacement, and advanced vertex blending all in one elegant package for easy texture blending on all of your assets.
1:06
我刚刚为EasyMapper发布了一个更新,允许自定义灰度图和绘制水洼的功能。
I also just released an update for EasyMapper allowing custom grayscale maps and the ability to paint puddles.
1:11
所以如果您还在犹豫,现在是购买的好时机,因为它非常便宜。您可以在下面找到链接。
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.
1:18
好的,让我们深入了解为什么材质AO很重要。
Okay, so let's dive into why Material AO is important.
1:22
光遮蔽,简称AO,是一种渲染技术,用于模拟在物体的褶皱、裂缝和角落中发生的柔和阴影,光被附近的几何体或模型遮挡。
Light occlusion, or AO for short, is a rendering technique used to simulate the soft shadows that occur in creases, cracks, and corners of objects where light is occluded by nearby geometry or models or whatever.
1:34
屏幕空间AO在UE4中是一个非常受欢迎的功能,很多人想知道为什么在Lumen中不能再使用。
Screen Space AO was a very popular feature in UE4, and a lot of people are wondering why it can't be used anymore with Lumen.
1:42
然而,在虚幻引擎5中,Lumen使用一种称为全局光照(GI)的技术来进行照明。
In Unreal Engine 5, however, Lumen uses a technique called global illumination, or GI, for its lighting.
1:48
GI关注场景中的直接和间接照明,包括适当的颜色溢出和多次光线反射的光照和阴影效果。
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.
1:58
与环境光遮蔽不同,全局光照确实考虑了光与表面和材料的相互作用。
Unlike ambient occlusion, global illumination does take into account the interactions of light with surfaces and materials.
2:05
AO仅考虑几何体的接近性,而不考虑光照。
AO only takes the proximity of Geo into account, not the lighting.
2:11
即使表面被强光照亮,AO仍然会出现,看起来有点假和游戏化。
So even if a surface is brightly lit, AO still shows up and looks a little fake and gamey.
2:16
AO和GI是两种完全不同的渲染方法。
AO and GI are two totally different rendering approaches.
2:20
因此,在Lumen中,屏幕空间AO不再真正必要,因为GI已经为我们处理了环境阴影。
So with Lumen, a screen space AO isn't really necessary anymore because GI takes care of the ambient shadows for us already.
2:28
同时拥有SSAO和GI会导致阴影过于黑暗,看起来并不好。
Having SSAO and GI would result in shadows that are way too dark, and it just doesn't look very good.
2:35
但Lumen并不完美。为了让虚幻实时运行,必须在某些地方做出妥协。
But Lumen isn't perfect. In order for Unreal to run in real-time, shortcuts need to be made somewhere.
2:42
Lumen通过牺牲光照质量,特别是光照准确性来采取这些捷径。
And Lumen takes those shortcuts by sacrificing lighting quality, and more specifically, lighting accuracy.
2:48
因为虽然Lumen确实使用光线追踪,但它每个像素仅计算大约半条光线,而路径追踪渲染需要每个像素大约200条以上的光线才能达到可接受的无噪声全局光照。
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.
2:58
所以,是的,某些地方需要做出妥协。没有免费的午餐。虽然Lumen确实处理了物体之间的一般阴影,但实际上,在虚幻引擎5.3中,它做得非常好。
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 Engine 5.3.
3:07
我必须给予应有的赞誉。但它的准确性不足以获得那些与路径追踪器相比的令人满意的高频细节阴影。
I've got to give credit where credit is due. 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 path tracer.
3:18
看看我去年在视频中制作的这个渲染。路径追踪的结果显然更好,尤其是当你知道该关注什么时。
Take a look at this render I made in a video last year. The path trace results are simply better, especially once you know what to look for.
3:26
幸运的是,这就是材质AO可以非常有用的地方,这是我们在视频开始时通过取消选中那个复选框启用的功能。
Fortunately, that is where Material AO can come in very handy, which is the feature we just enabled by disabling that checkbox at the beginning of the video.
3:37
别问。所以这里我有这个很棒的盔甲模型。
Don't ask. So here I have this awesome suit of armor model.
3:41
你会看到,由于全局光照和Lumen,盔甲的部分确实有一点自阴影。你可以免费获得这个。
You'll see that the armor bits do get a bit of self-shadowing thanks to GI and Lumen. You get this for free.
3:47
但有些接触阴影仍然感觉有点漂浮。
But some of those contact shadows still feel a little bit floaty.
3:52
比如这里的这一部分,在两个金属板之间,它应该非常暗。
Like this part here, for example, right in between the two metal plates, it should be very dark.
3:57
那里不应该有太多光线能够照射进去。如果我们与路径追踪器进行比较,你会发现路径追踪的结果感觉更好。
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.
4:07
盔甲的部分感觉更加连接。就在这里,如果我们放大那些较薄的金属部分,这里的接触阴影非常柔和、准确且清晰。
The pieces of armor feel more connected. Right here, again, if we zoom in to those thinner placed metal, the contact shadows here are just so soft and accurate and crisp.
4:18
一切都与这些接触阴影有关。但是,使用材质AO,我们可以部分弥补使用Lumen时的准确性不足。
It is all about those contact shadows. But, using material AO, we can partly make up for that lack of accuracy when using Lumen.
4:27
所以通过为这个模型使用AO贴图,将贴图插入材质的环境遮挡槽,我们可以从这个变成这个。
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.
4:36
这是一个巨大的差异,但真正酷的是,如果我旋转光源,你会注意到我们添加的AO会消失。
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.
4:45
它只会出现在模型的间接照明区域。
It only shows up in indirectly lit areas of your models.
4:50
这不仅仅是将AO乘以基础颜色,就像我们在2008年时做的老派方法。
It isn't just multiplying the AO on top of the base color like that old school thing we used to do back in 2008.
4:56
这很好,因为你不希望在强光直接照射时出现黑暗的AO阴影,对吧?
This is great because you wouldn't want a dark AO shadow to show up when a big bright light is shining directly on it, right?
Only the first 5 minutes are free. Install the app or extension to keep watching.
DownloadRequest another language





