Lumen Surface Cache Rendered Excessively Dark \ Lumen 表面缓存渲染过暗

When hardware ray tracing + surface caching is enabled, the foliage appears excessively dark.

Are there any solutions to improve this? Are there optimization plans for future updates?

[Image Removed]Level:

UE5_UDN_Cases

/Script/Engine.World’/Game/LumenSurfaceCacheBug.LumenSurfaceCacheBug’

主要原因应该是surface cache默认不具有Mask效果(查看Surface Cache Viewmode),也就是会遮蔽更多的天光。r.Lumen.HardwareRayTracing.SurfaceCacheAlphaMasking 1打开可以改善。但因为surface cache的精度很低,还有生成基于card的位置摆放只有几个角度的投射面,并非基于模型的切线空间UV生成,因此最终的SurfaceCache还是会有大量并不完美的部分。

1、r.Lumen.HardwareRayTracing.SurfaceCacheAlphaMasking效果的明显程度取决于Lumenscene里被Mask掉的范围大小。首先上面提到了surface cache是基于cards位置的投射产生的,因此并非是精确的最终渲染的Mask范围,也就是Lumenscene里遮蔽的范围还是大于最终渲染的Mask的范围。这也取决于植被制作的方式,尽量使用模型表现,而非大面积的Mask来表现会好些。

2、目前没有你提到的混合效果方案

简单总结:这里导致问题的原因不同于另外帖子草地暗产生的原因,主因来自LumenScene的遮蔽。减小这种遮蔽有几种方式:

1、是开启SurfaceCacheAlphaMasking;

2、模型如果用几何体表现减少Mask面积可改善;

3、转成Nanite模型,Nanite的LumenScene来自其Fallback Mesh,Fallback mesh的面数可以适当减少,也就减少了Lumenscene的自身遮蔽,如下图。

[Image Removed]4、也可以适当在材质中增加raytracing的亮度,从而增加GI的贡献,如图,但要注意这也会反映在反射中。

[Image Removed]

[Image Removed]Hi,感谢用中文回复,我做了充分测试,r.Lumen.HardwareRayTracing.SurfaceCacheAlphaMasking 1很难察觉到变化,但是r.Lumen.ScreenProbeGather.ScreenTraces.HZBTraversal 0变化又太强,有时候美术只需要一个“表面缓存阴影透明度”的参数,最好针对这种过黑的Mask对象,开发逐对象和全局参数,逐对象的优先级高于全局,来实现我的截图中的A50%+B50%的效果,这种取巧方法是否会考虑?

Hi, thank you for replying in Chinese. After thorough testing, I found that r.Lumen.HardwareRayTracing.SurfaceCacheAlphaMasking 1 has a barely noticeable effect, while r.Lumen.ScreenProbeGather.ScreenTraces.HZBTraversal 0 is too strong. Sometimes, artists just need a “Surface Cache Shadow Transparency” parameter—ideally, both per-object and global settings—where the per-object setting takes precedence over the global one. This would allow adjusting overly dark masked objects to achieve the 50% A + 50% B effect shown in my screenshot. Would this kind of workaround be considered?

:+1: :+1: :+1:

感谢提供这些思路!我们会在探索用mesh来表现树叶,这种可以完美解决效果问题

Fallback比较危险,会破坏PT和Hit Lighting

[Image Removed]但可以很快对齐PT,也许需要一些开发(不影响PT和Hit Lighting),才能在项目里落地​

[Image Removed]

r.raytracing.nanite.mode 1 可以略过Fallback mesh使用原始模型作为Raytracing Scene。此时在PT和Hitlighting下不会关心Fallback张什么样,也就不会有问题。但会极大增加RT开销,对PT来说没有问题,但对实时渲染Hitlighting可能会敏感,仅供参考。