UE4_Lighting Scenarios
在游戏制作过程中,有时会存在同一场景使用多套Lightmap的情况,如:模拟天气系统,以及一天中不同时段的光照等。在Unreal 4引擎中,可以利用Lighting Scenarios功能达到此效果。使用Lighting Scenarios时,首先需要创建不同的光照Level,然后在Level设置页面将其设置为Lighting Scenario类型,如下图所示:

另外,设置Level的加载方式为使用Blueprint加载:

接着,对不同Level设置不同的光照进行烘焙。烘焙结束后,在Persistent Level Blueprint中,添加Load Stream Level节点对Level进行加载,并设置要加载的Level名称Day,如下图所示:

当需要切换到夜晚的全局光照烘焙效果时,可使用该节点加载Night Level即可。渲染结果如下图所示,上下两图分别是白天和晚上的光照效果。

