Unity Graphics (Unity 图形渲染 ) 官方教程文档笔记系列之七

本文介绍了Unity图形渲染中预计算实时全局光照(Realtime GI)的过程,包括如何标记静态对象以启动预计算,以及预计算的优化策略。此外,还详细讲解了探头光照的概念,用于给非静态物体提供高效且接近实时的间接光照。通过合理放置光照探头,可以降低光照图图表数量,提升性能。文章提供了设置和放置光照探头的步骤,以实现更好的场景光照匹配。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

Unity Graphics (Unity 图形渲染 )
- Everything for Lighting and Rendering in Unity
- 主要涉及到光照与渲染方面的知识

本文档主要是对Unity官方教程的个人理解与总结(其实以翻译记录为主:>)
仅作为个人学习使用,不得作为商业用途,欢迎转载,并请注明出处。
文章中涉及到的操作都是基于 Unity2018.3版本
参考链接:https://unity3d.com/cn/learn/tutorials/s/graphics


下面是将要介绍的章节,黑体是本次内容:

  • Introduction to Lighting and Rendering
    介绍光照和渲染
  • Precomputed Realtime GI (Realtime Global Illumination)(7)
    预处理实时全局光照(7)
  • Rendering and Shading
    渲染与着色
  • Cameras and Effects
    相机与效果
  • Geometry in Unity
    几何体

4.Starting the precompute process

4.开始预计算处理

To generate a lighting solution using Precomputed Realtime GI, we must initiate the precompute process. For this to begin, we must have at least one object marked as Lightmap Static in our Scene.
为了使用预计算实时GI生成一个光照解决方案,我们必须启动预计算处理。为此,我们必须在场景中至少有一个被标记为Lightmap Static 的对象。

Organizing and grouping GameObjects within the Hierarchy view makes it quick and easy to select GameObjects for inclusion in the lighting precompute. There are numerous strategies for organizing the hierarchy of GameObjects. Discussing these different strategies in detail is outside the scope of this tutorial. However, what is important is to understand that having some scheme for organizing GameObjects will greatly improve productivity when making repeated selections in the Scene.
在层次视图中组织和分组游戏对象使其能够快速且容易地选择包含光照预计算的游戏对象。有许多策略来组织游戏对象的层次结构。详细讨论这些不同的策略超出了本教程的范围。然而,重要的一点是:在场景中重复标记时,有计划地组织游戏对象将极大地提高生产力。

In our example Scene, we have organised our GameObjects into classifications underneath a parent object called Environment. This group contains all the visible, static MeshRenderers which make up the environment of our Scene. Underneath this we have sub-groups of objects which have similar characteristics in terms of size or topology.
在我们的示例场景中,我们将我们的游戏对象分类到一个称为“环境(Environment)”的父对象下。这个组包含所有可见的、静态的网格渲染器,它们构成了我们场景的环境。在这下面,我们有一些子组,子组以大小或拓扑结构具有相似的特征为组织。

这里写图片描述
Grouping of objects within the Scene hierarchy can help when making repeated selection of objects
场景层次结构中的对象分组可以在重复标记对象时有所帮助

It is most efficient to begin by applying lighting settings in broad strokes and then progressively refine the details as we move forwards.
最有效的方法是先将光照设置应用于大致框架下,然后在后续改进的过程中逐步完善细节。

  • Select the Environment GameObject. 选择Environment 游戏对象
  • In the Inspector window, check the box marked Static 在属性窗口,选择Static标记
  • When asked if you wish to enable the Static flags of the child 选择环境组下的游戏对象
    objects as well, select Yes, change children. Doing this ensures the
    GameObject and its children will receive the Lightmap Static flag.
    They will then be included in the lighting precompute.
    当被问及是否希望开启子对象的静态标志和本身一致时,选择Yes,改变子对象。这样确保了游戏对象和子对象接收都置为 光照静态 标记。它们将被包括在光照预计算中。

Now that our Scene has some Static GameObjects, we can begin the precompute process.
现在我们的场景中有一些静态的游戏对象,我们可以开始预计算处理了。

  • Open the Lighting window (Window > Lighting) and then select the Scene tab.
    打开光照窗口(Window > Rendering > Lighting Settings),然后选择 Scene 选项卡。[新版修订]
  • Ensure that the Auto checkbox is checked. The Auto checkbox can be found next to the Build button, which will be greyed out if the Auto checkbox is checked.
    确保选中了“自动”复选框。自动复选框可以是在“构建”按钮旁边找到它,如果“自动”复选框被选中,“构建”按钮将变灰色。
  • The precompute process will now begin. The progress of the precompute process is shown in the bottom right of the Unity Editor and is represented by a blue progress bar. The current task (written as x/xx) and the number of jobs remaining in that task are displayed within the progress bar.
    预计算过程将会
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值