渲染烘焙

Cycles着色器和灯光照明可以烘焙到图像纹理。这有几个不同的用途,最常见的是:

  • 烘焙纹理,如基础颜色或法线贴图,用于导出到游戏引擎。

  • 烘焙环境光遮蔽或程序纹理,作为纹理绘制或进一步编辑的基础。

  • 创建光照贴图以提供全局照明或加快游戏中的渲染速度。

Note

Baking is not supported on OptiX GPU rendering.

建立

Baking requires a mesh to have a UV map, and either vertex colors or an Image Texture node with an image to be baked to. The Active Image Texture node or Vertex Color layer is used as the baking target.

Use Render Bake in intensive light/shadow solutions, such as AO or soft shadows from area lights. If you bake AO for the main objects, you will not have to enable it for the full render, saving render time. Cycles uses the render settings (samples, bounces, …) for baking. This way the quality of the baked textures should match the result you get from the rendered scene.

设置

参考

面板

渲染 ‣ 烘培

Bake

Perform the baking operation.

Bake from Multires

Bake directly from multires object.

Bake Type

Type of pass to bake.

  • 合成结果

    Bakes all materials, textures, and lighting except specularity. The passes that contribute to the combined pass can be toggled individually to form the final map.

    环境光遮蔽

    烘焙世界面板中指定的环境光遮蔽,忽略场景中的其他灯光。

    阴影

    烘焙阴影及灯光。

    Normal

    烘焙不同空间的法线。

    UV

    映射 UV 坐标,用于表示纹理映射至网格上的位置。这通过图像的红色和绿色通道表示,蓝色通道的编码为常值1,但不保存任何信息。

    Roughness

    Bakes the roughness pass of a material.

    自发光

    烘焙自发光,或是材质的辉光颜色。

    环境光

    根据从世界原点(0, 0, 0)投射的光线所看到的,将环境(即为场景定义的世界表面着色器)烘焙到选定的物体上。

    Diffuse

    Bakes the diffuse pass of a material.

    Glossy

    Bakes the glossiness pass of a material.

    Transmission

    Bakes the transmission pass of a material.

Influence

合成结果

Lighting

  • Direct

    Add direct lighting contribution.

  • Indirect

    Add indirect lighting contribution.

Contributions

  • Diffuse

    Add diffuse contribution.

  • Glossy

    Add glossy contribution.

  • Transmission

    Add transmission contribution.

  • 环境光遮蔽

    Add ambient occlusion contribution.

  • 自发光

    Add emission contribution.

Diffuse, Glossy, Transmission

Contributions

  • Direct

    See above.

    Indirect

    See above.

  • Color

    Colorize the pass.

    • If only Color is selected you get the pass color, which is a property of the surface and independent of sampling refinement.

    • If Color is not selected, you get the direct and/or indirect contributions in gray-scale.

    • If Color and either Direct or Indirect are selected, you get the direct and/or indirect contributions colored.

Normal

Space

法线可以在不同的空间中烘培:

For materials, the same spaces can be chosen in the image texture options next to the existing Normal Map setting. For correct results, the setting here should match the setting used for baking.

  • Object

    对象坐标中的法线,与对象变换无关,但取决于变形。

    Tangent

    切线空间坐标中的法线,与对象转换和变形无关。这是默认设置,在大多数情况下都是正确的选择,因为法线贴图也可以用于动画对象。

Swizzle R, G, B

轴要烘培成红色,绿色和蓝色的通道。

已选定为活动物体

Bake shading on the surface of selected objects to the active object. The rays are cast from the low-poly object inwards towards the high-poly object. If the high-poly object is not entirely involved by the low-poly object, you can tweak the rays start point with Max Ray Distance or Extrusion (depending on whether or not you are using cage). For even more control you can use a Cage Object.

Note

每一个用于烘培的物体都会占用一定的CPU和内存,为了避免内存不足而造成的崩溃,在烘焙之前,可以先将高模物体进行合并。渲染中的分块设置,也会影响到内存的使用。比如分的块越大,CPU占用的越少,而内存则会占用的更多(不管是CPU,还是GPU)。

罩体

光线会从罩体投射到活动的物体,罩体是指从低模通过手动(指定要用的物体)或自动(调整光线距离)创建出来的膨胀版本。如果不使用罩体,光线会依循网格的法线,这在边线的地方会产生一些小的瑕疵,为了避免这些瑕疵,可以围着边线添加额外的循环边,在烘焙平面时,这或许是一个不错的方法。

  • Cage Object

    指定作为 罩体 的物体,以此替代活动物体的罩体挤出。

罩体偏移

在使用 所选物体->活动物体罩体 来控制光线向内投射的距离时。向内投射的光线会由不含有边线分割修改器版本的活动物体发出。当然强制分割(如应用掉边线分割修改器)也不行。因为这些都会导致边线处的法线变得不为平滑。

Note

When the base mesh extruded does not give good results, you can create a copy of the base mesh and modify it to use as a Cage. Both meshes need to have the same Topology (number of faces and face order).

Max Ray Distance

Distance to use for the inward ray cast when using Selected to Active. Ray distance is only available when not using Cage.

输出

Target

Where to output the baked map.

  • Image Textures

    Bake to the image data-block associated with the Active Image Texture node.

    • 边距

      烘焙的结果将会超出每一个UV块的边界,以此来柔和纹理中的接缝。

    • Clear Image

      选择该项时,在渲染烘焙前会先清空图像。

    Vertex Colors

    Bake to the Active Vertex Color layer on the active mesh. Note, the active object must be a mesh as other object types do not have vertex colors.