This page has been translated automatically.
视频教程
界面
要领
高级
实用建议
UnigineEditor
界面概述
资产工作流程
设置和首选项
项目开发
调整节点参数
Setting Up Materials
Setting Up Properties
Landscape Tool
Sandworm
使用编辑器工具执行特定任务
Extending Editor Functionality
嵌入式节点类型
Nodes
Objects
Effects
Decals
光源
Geodetics
World Objects
Sound Objects
Pathfinding Objects
Players
编程
基本原理
搭建开发环境
Usage Examples
UnigineScript
C++
C#
UUSL (Unified UNIGINE Shader Language)
File Formats
Rebuilding the Engine Tools
GUI
双精度坐标
应用程序接口
Containers
Common Functionality
Controls-Related Classes
Engine-Related Classes
Filesystem Functionality
GUI-Related Classes
Math Functionality
Node-Related Classes
Objects-Related Classes
Networking Functionality
Pathfinding-Related Classes
Physics-Related Classes
Plugins-Related Classes
IG Plugin
CIGIConnector Plugin
Rendering-Related Classes
创建内容
Content Optimization
Materials
Art Samples
Tutorials
注意! 这个版本的文档是过时的,因为它描述了一个较老的SDK版本!请切换到最新SDK版本的文档。
注意! 这个版本的文档描述了一个不再受支持的旧SDK版本!请升级到最新的SDK版本。

基于体素的GI

Voxel-Based Global Illumination is a static GI technique projecting a precalculated 3D lighting map into a box-shaped voxel volume. This approach uses spatial modulation, that is why there is no need in UV coordinates.基于体素的全局照明是一种静态GI技术,可将预先计算的3D光照图投影到盒状体素体中。这种方法使用空间调制,这就是为什么不需要UV坐标的原因。

Voxel-based GI is provided by Voxel Probes.基于体素的GI由Voxel Probes提供。

Light baking is performed using the Bake Lighting Tool.使用Bake Lighting Tool进行光烘焙。

注意
启用了光照贴图的曲面不会被Voxel Probes照亮。

See Also也可以看看#

Ambient Lighting环境照明#

The primary application of Voxel Probes is ambient lighting. When baked, a Voxel Probes illuminates everything within its volume with ambient lighting providing a decent simulation of global illumination including ambient occlusion, light bounces and diffuse interreflections.Voxel Probes的主要应用是环境照明。烘焙后,Voxel Probes用环境照明照亮了其体积中的所有物体,从而提供了对整体照明的不错​​模拟,包括环境光遮挡,光反射和漫反射。

如果场景包含动态对象,则Bake Internal Volume功能对于将其着色非常有用。如果没有移动物体,则将此选项设置为Off是合理的。

Workflow工作流程#

To bake global illumination into a Voxel Probe, some preparations are needed.要将全局照明烘焙为Voxel Probe,需要进行一些准备。

Preparing The Content准备内容#

为了使表面有助于静态GI烘焙,必须启用Cast Global Illumination选项。对于动态曲面,必须将其关闭。

注意
Lightmapped surfaces are not shaded by Voxel Probes.光照贴图的曲面不会被Voxel Probes着色。

Set up light sources in the scene:在场景中设置光源:

  • For light sources that should contribute to global illumination, select the Static mode. Dynamic lights will be ignored. Only indirect lighting from lights is baked, so light sources are to be kept enabled to provide direct lighting and specular highlights.对于应该有助于整体照明的光源,请选择Static模式。 Dynamic灯将被忽略。仅烘焙来自光源的间接照明,因此应保持启用光源以提供直接照明和镜面高光。
  • For emissive surfaces (having Emission state in the material parameters enabled) also enable the Emission Bake GI option. Both direct and indirect (bounced) lighting from emissive materials is baked.对于发光曲面(在启用的材料参数中具有Emission状态),还要启用Emission Bake GI选项。烘烤来自发光材料的直接和间接(反射)照明。

Creating Voxel Probes创建体素探针#

  1. Create and place one or several Voxel Probes at the places where the lighting remains relatively static (e.g. interiors, outdoor buldings, immovable objects).

    注意
    Place voxel probes inside other voxel probes to create insets defining the areas that require higher detail. Note that voxel probes with the additive blending mode enabled cannot be used for this purpose, as they are blended instead of replacing each other.Place voxel probes inside other voxel probes to create insets defining the areas that require higher detail. Note that voxel probes with the additive blending mode enabled cannot be used for this purpose, as they are blended instead of replacing each other.
    Place voxel probes inside other voxel probes to create insets defining the areas that require higher detail. Note that voxel probes with the additive blending mode enabled cannot be used for this purpose, as they are blended instead of replacing each other.
    在灯光保持相对静止的地方(例如室内,室外建筑物,不动的物体)创建并放置一个或多个Voxel Probes

    注意
    Place voxel probes inside other voxel probes to create insets defining the areas that require higher detail. Note that voxel probes with the additive blending mode enabled cannot be used for this purpose, as they are blended instead of replacing each other.将体素探针放置在其他体素探针内部,以创建定义需要更高细节的区域的插图。请注意,启用了添加剂混合模式的体素探针不能用于此目的,因为它们被混合而不是彼此替换。
  2. Set the Common Settings of probes, such as the Box Size and the Voxel Size. By configuring these parameters you define the resolution of the voxel grid and the video memory consumed by the probe.
    警告
    Do not use the Scale transform parameter to change the probe size as it causes visual artifacts.Do not use the Scale transform parameter to change the probe size as it causes visual artifacts.
    Do not use the Scale transform parameter to change the probe size as it causes visual artifacts.
    设置探针的通用设置,例如Box SizeVoxel Size。通过配置这些参数,可以定义体素网格的分辨率和探针消耗的视频内存。
    警告
    Do not use the Scale transform parameter to change the probe size as it causes visual artifacts.请勿使用Scale变换参数来更改探针大小,因为它会引起视觉伪像。
  3. Adjust the Baking Settings of probes.调整探针的烘焙设置

Baking烘培#

  1. Open the Bake Lighting window.打开Bake Lighting窗口。
  2. Enable Bake Voxel Probes. Adjust the Voxel Size Multiplier, if needed.启用Bake Voxel Probes。如果需要,调整Voxel Size Multiplier
  3. Adjust the Common settings:
    • Select the number of light ray bounces. Higher values will result in a brighter lighting since each voxel receives more photons.Select the number of light ray bounces. Higher values will result in a brighter lighting since each voxel receives more photons.
    • Set the number of samples (voxels) calculated per frame. This parameter is available for adjustment during baking process.Set the number of samples (voxels) calculated per frame. This parameter is available for adjustment during baking process.
    Select the number of light ray bounces. Higher values will result in a brighter lighting since each voxel receives more photons.Set the number of samples (voxels) calculated per frame. This parameter is available for adjustment during baking process.
    调整通用设置:
    • Select the number of light ray bounces. Higher values will result in a brighter lighting since each voxel receives more photons.选择光线反射的次数。更高的值将导致照明更亮,因为每个体素接收更多的光子。
    • Set the number of samples (voxels) calculated per frame. This parameter is available for adjustment during baking process.设置每帧计算的样本(体素)数量。此参数可在烘焙过程中进行调整。
  4. Start baking process by clicking Bake All Lighting and wait for it to finish. Live preview is available. Several iterations (one per bounce) will be simulated for each Voxel Probe.

    注意
    You can stop the process at any moment by using the Stop button and you will be prompted to keep the achieved result or restore the previous textures.You can stop the process at any moment by using the Stop button and you will be prompted to keep the achieved result or restore the previous textures.
    You can stop the process at any moment by using the Stop button and you will be prompted to keep the achieved result or restore the previous textures.
    单击Bake All Lighting开始烘焙过程,然后等待其完成。实时预览可用。对于每个Voxel Probe,将模拟几次迭代(每跳一次)。

    注意
    You can stop the process at any moment by using the Stop button and you will be prompted to keep the achieved result or restore the previous textures.您可以随时使用Stop按钮停止该过程,并且系统会提示您保留所获得的结果或恢复以前的纹理。
  5. Upon completion, generated lightmaps will be saved in the bake_lighting/voxel_probes folder and assigned to the corresponding Voxel Probes.完成后,生成的光照贴图将保存在bake_lighting/voxel_probes文件夹中,并分配给相应的Voxel Probes

You can check the result by selecting the Indirect Lighting mode in the Rendering Debug.您可以通过在Rendering Debug中选择Indirect Lighting模式来检查结果。

If you are not satisfied with results on certain objects, you can select surfaces and/or nodes and perform partial re-bake using different settings by clicking Bake Selected.如果您对某些对象的结果不满意,可以选择表面和/或节点,并通过单击Bake Selected使用不同的设置执行部分重新烘焙。

Additional Features附加的功能#

Diffuse Reflections漫反射#

As each voxel of a Voxel Probe stores light data, a Voxel Probe is capable of providing diffuse (blurred) reflections at every spatial point withing its volume provided Bake Internal Volume was enabled for baking. Control reflections by adjusting the Reflections Parameters.Voxel Probe的每个体素存储光数据时,如果启用了Bake Internal Volume进行烘焙,则Voxel Probe能够在每个空间点提供其体积的漫反射(模糊)反射。 通过调整反射参数控制反射。

Diffuse reflections provided by a voxel probe.体素探针提供的漫反射。

Additive Blending添加剂混合#

More flexibility in lighting control is available with the Additive Blending mode. You can use it to blend lighting of several voxel probes together and control them separately (e.g. make a separate Voxel Probe for an indoor emissive light source and blend it with another Voxel Probes with lighting baked from the sky, having the ability to enable and disable them separately).Additive Blending模式可提供更大的照明控制灵活性。您可以使用它来混合几个体素探测器的照明并分别控制它们(例如,为室内发射光源制作一个单独的Voxel Probe并将其与另一个从天空烘烤的Voxel Probes进行混合,并具有分别启用和禁用它们的能力)。

Additive blending of two Voxel Probes.两个Voxel探针的添加混合。

Using Sun Color使用太阳色#

A Voxel Probe is subject to multiplication by the sun light color if the Use Sun Color option is enabled for it.如果为Voxel Probe启用了Use Sun Color选项,则将其乘以太阳光的颜色。

最新更新: 2021-04-29
Build: ()