光照贴图深入学习 Lightmapping In-Depth

http://www.ceeger.com/Manual/LightmappingInDepth.html

If you are about to lightmap your first scene in Unity, this Quickstart Guide might help you out.

如果你是在Unity第一次接触光照贴图,这个快速指南可以帮助你快速了解。

Lightmapping is fully integrated in Unity, so that you can build entire levels from within the Editor, lightmap them and have your materials automatically pick up the lightmaps without you having to worry about it. Lightmapping in Unity means that all your lights' properties will be mapped directly to the Beast lightmapper and baked into textures for great performance. Unity Pro extends this functionality by Global Illumination, allowing for baking realistic and beautiful lighting, that would otherwise be impossible in realtime. Additionally Unity Pro brings you sky lights and emissive materials for even more interesting scene lighting.

Unity 完全集成了光照贴图,可以通过编辑器创建完整的光照贴图,你完全不用担心,所有材质会自动获得光照贴图。光照贴图的意思是,所有灯光的特性将被直接映射到Beast lightmapper并烘培到纹理,以此获得更好的性能。UnityPro版扩展了全局光照功能,可以烘焙出真实而漂亮的光照,然相反这将不能实时。此外,Unity专业版带给你天光和发光材质,为你增加更有趣的场景照明。

In this page you will find a more in-depth description of all the attributes that you can find in the Lightmapping window. To open the Lightmapping window select Window – Lightmapping.

在此页中,你会发现更深入的描述,可以找到在Lightmapping窗口的所有属性。从菜单中Window – Lightmapping打开Lightmapping窗口。

Object 物体

Per-object bake settings for lights, mesh renderers and terrains - depending on the current selection.

每一个物体的烘培设置:灯光、网格渲染和地形 - 取决于当前的选择。

Mesh Renderers and Terrains 网格渲染器和地形:

  • Static 静态
    Mesh Renderers and Terrains have to marked as static to be lightmapped.
    可渲染网格和地形必须标记为静态才能被烘培。
  • Scale In Lightmap
    光照图比率
    (Mesh Renderers only) Bigger value will result in more resolution to be dedicated to the give mesh renderer. The final resolution will be proportional (Scale in lightmap)*(Object's word-space surface area)*(Global bake settings Resolution value). A value of 0 will result in the object not being lightmapped (it will still affect other lightmapped objects).
    (只作用于可渲染网格)特别大的数值将分配给可渲染网格更大的分辨率。最终分辨率比例(光照图缩放)*(物体世界坐标空间所占面积)*全局分辨率烘培设置)如果设置为0物体将不被烘培。(但是它依旧对其他的物体有影响)
  • Lightmap Size
    光照图大小
    (Terrains only) Lightmap size for this terrain instance. Terrains are not atlased as other objects - they get their individual lightmaps instead.
    (只作用于地形)光照贴图尺寸是地形实例独有的属性,地形将不和其他物体共用图集。地形光照贴图将存贮在一个单独的文件中。
  • Atlas 图集
    Atlasing information – will be updated automatically, if Lock Atlas is disabled. If Lock Atlas is enabled, those parameters won't be modified automatically and can be edited manually.
    图集信息-如果Lock Atlas(锁定图集)选项没有开启那么这些参数将自动更新。如果Lock Atlas(锁定图集)选项开启,这些参数将不会自动编辑。但是你可以手动设置他们。
  •     Lightmap Index 光照图索引
    An index into the lightmap array.
    光照贴图序列中的索引。
  •     Tiling 平铺
    (Mesh Renderers only) Tiling of object's lightmap UVs.
    (只作用于可渲染网格)物体光照贴图UVs平铺。
  •     Offset 偏移
    (Mesh Renderers only) Offset of object's lightmap UVs.
    (只作用于可渲染网格)物体UVs的偏移。

Lights 灯光:

  • Lightmapping 光照贴图
    The Lightmapping mode: Realtime Only, Auto or Baked Only. See Dual Lightmaps description below.
    光照图模式:仅实时模式,自动模式和仅烘培 模式。查看下面Dual Lightmaps的描述。
  • Color 颜色
    The color of the light. Same property is used for realtime rendering.
    灯光颜色。同一属性用于实时光照。
  • Intensity 光强度
    The intensity of the light. Same property is used for realtime rendering.
    灯光照明强度。同一属性用于实时光照
  • Bounce Intensity 反弹强度
    A multiplier to the intensity of indirect light emitted from this particular light source.
    特定光源间接光照强度的倍增值。
  • Baked Shadows 烘焙阴影
    Controls whether shadows are casted from objects lit by this light (controls realtime shadows at the same time in case of Auto lights).
    控制当前灯光是否投射阴影。自动灯光情况同时控制实时阴影
  •     Shadow Radius 阴影半径
    (Point and Spot lights only) Increase this value for soft direct shadows - it increases the size of the light for the shadowing (but not lighting) calculations.
    (只作用于点光源和聚光灯)增加这个值将得到一个较柔和的阴影。增加这个值的大小影响阴影覆盖面积范围的计算(不会影响到灯光照射范围)。
  •     Shadow Angle 阴影角度
    (Directional lights only) Increase this value for soft direct shadows - it increases the angular coverage of the light for the shadowing (but not lighting) calculations.
    (只影响平行光)增加这个值将会得到一个比较柔和的阴影-增加灯光阴影覆盖角度范围的计算。(不会影响到灯光照射范围)
  •     Shadow Samples 阴影采样
    If you've set Shadow Radius or Angle above zero, increase the number of Shadow Samples as well. Higher sample numbers remove noise from the shadow penumbra, but might increase rendering times.
    如果你将阴影半径或者角度设置为大于0的值,增加阴影采样值能得到一个比较好的结果。高采样值将消除半影中中的噪点。

Bake 烘焙

Global bake settings.

全局烘焙设置。

  • Mode 模式
    Controls both offline lightmap baking and runtime lightmap rendering modes. In Dual Lightmaps mode both near and far lightmaps will be baked; only deferred rendering path supports rendering dual lightmaps. Single Lightmaps mode results in only the far lightmap being baked; can also be used to force single lightmaps mode for the deferred rendering path.
    控制完全脱离实时光照仅使用光照图渲染和实时灯光与光照图混合渲染模式。在双重光照图模式下近端和远端光照图都将被烘培;只有延迟光照渲染方式式才能更好的支持双重光照图。单光照图模式仅烘培远端光照图。在延迟渲染方式下也可以强制使用单光照图模式。
  • Use in forward rendering
    使用正向渲染
    (Dual lightmaps only) Enables dual lightmaps in forward rendering. Note that this will require you to create your own shaders for the purpose.
    (只作用于双重光照贴图模式)可以让前端渲染模式使用双重光照贴图,但需要注意的是在前端渲染方式下需要依赖自定义shader去实现双重光照效果。
  • Quality 质量
    Presets for high (good-looking) and low (but fast) quality bakes. They affect the number of final gather rays, contrast threshold and some other final gather and anti-aliasing settings.
    高质量(比较好的效果)和低质量(计算速度快)的预设值。它们将影响最终聚集光线数量和对比度的数值以及其他有关最终聚集和抗锯齿的设置。
  • Bounces 反弹
    The number of light bounces in the Global Illumination simulation. At least one bounce is needed to give a soft, realistic indirect lighting. 0 means only direct light will be computed.
    控制全局光照模拟中光线反弹的次数。如果想得到一个比较柔和的相对真实的光照至少需要将此数值设置为1.如果设置为0那么只会计算直接光照。
  • Sky Light Color 天光颜色
    Sky light simulates light emitted from the sky from all the directions - great for outdoor scenes.
    天光是模拟从天球向所有方向发射光线照射场景-在烘培室外场景的时候开启天光将得到一个非常好的效果。
  • Sky Light Intensity 天光强度
    The intensity of the sky light - a value of 0 disables the sky light.
    天光的强度 - 0代表禁用天光。
  • Bounce Boost 反弹增强
    Boosts indirect light, can be used to increase the amount of bounced light within the scene without burning out the render too quickly.
    增强间接光, 可用来增加场景中渲染太快没有烘焙出灯光的反弹量。
  • Bounce Intensity 反弹强度
    A multiplier to the intensity of the indirect light.
    间接光照的强度倍增器。
  • Final Gather Rays 最终聚集光线
    The number of rays shot from every final gather point - higher values give better quality.
    控制从最终聚集点发射的光线数量-较高的数值能得到更好的效果 。
  • Contrast Threshold
    对比度阈值
    Color contrast threshold, above which new final gather points will be created by the adaptive sampling algorithm. Higher values make Beast be more tolerant about illumination changes on the surface, thus producing smoother but less-detailed lightmaps. Lower numbers of final gather rays might need higher contrast threshold values not to force additional final gather points to be created.
    颜色对比度根据采样运算规则控制哪些最终聚集点被创建。较高的数值可以使Beast处理物体表面灯光照明时有很大的改善,从而得到一张平滑的光照贴图但是会牺牲一些照明细节。较低的数值需要最终聚集光线数量要高于对比度阈值这样被过滤掉的最终聚集点才能被创建出来。
  • Interpolation 插值
    Controls the way the color from final gather points will be interpolated. 0 for linear interpolation, 1 for advanced, gradient-based interpolation. In some cases the latter might introduce artifacts.
    控制最终聚集点颜色的插值。设置0为线性插值,设置1为基于梯度的高级插值。多数情况下推荐使用后者。
  • Interpolation Points 插值点
    The number of final gather points to interpolate between. Higher values give more smooth results, but can also smooth out details in the lighting.
    设置最终聚集点颜色的插值的参考点。高数值可以获得比较平滑的结果,但是会牺牲一些光照细节。
  • Ambient Occlusion
    环境光遮挡
    The amount of ambient occlusion to be baked into the lightmaps. Ambient occlusion is the visibility function integrated over the local hemisphere of size Max Distance, so doesn't take into account any lighting information.
    烘培光照图时产生一定数量的环境阻光。环境阻光计算物体每一点被一定距离内的其他物体或者一定距离内自身物体的遮挡程度(用来模拟物体表面环境光及阴影覆盖的比例,达到全局光照的效果),所以和所有的灯光设置没有太大关系。
  •     Max Distance 最大距离
    Beyond this distance a ray is considered to be unoccluded. 0 stands for infinitely long rays.
    超出这个距离的光线将不被遮挡。0表示无限长的光线。
  •     Contrast 对比度
    Controls the transition between fully occluded to not occluded.
    控制完全阻光和不阻光之间的过度。
  • Lock Atlas 锁定图集
    When Lock Atlas is enabled, automatic atlasing won't be run and lightmap index, tiling and offset on the objects won't be modified.
    当锁定图集被打开。自动图集功能将不执行,物体光照图索引,平铺和偏移将不能编辑。
  • Resolution 分辨率
    The resolution of the lightmaps in texels per world unit, so a value of 50 and a 10unit by 10unit plane will result in the plane occupying 500x500 pixels in the lightmap.
    每世界单位中光照图分辨率的大小。因此当设置分辨率为50的一个10单位乘以10单位的平面将产生一张500*500像素的光照贴图。

Maps 贴图

The editable array of all the lightmaps.

所有光照贴图的可编辑数组。

  • Compressed 压缩
    Toggles compression on all lightmap assets for this scene.
    控制是否压缩所有当前场景中的光照贴图。
  • Array Size 数组大小
    Size of the lightmaps array (0 to 254).
    光照贴图数组的大小(0~254)。
  • Lightmaps Array 光照贴图数组
    The editable array of all the lightmaps in the current scene. Unassigned slots are treated as black lightmaps. Indices correspond to the Lightmap Index value on Mesh Renderers and Terrains. Unless Lock Atlas is enabled, this array will get auto-resized and populated whenever you bake lightmaps.
    当前场景被烘培的所有光照图的可编辑序列。没有被指定的通道将被处理为黑色光照图。索引相当于网格渲染和地形中所使用的光照图编号。除非锁定图集被开启否则序列将自动初始化并分配给你烘培的贴图。

Lightmap Display 光照贴图显示

Utilities for controlling how lightmaps are displayed in the editor. Lightmap Display is a sub window of the Scene View, visible whenever the Lightmapping window is visible.

在编辑器中控制光照图如何显示的工具。光照图显示是在场景视口中的一个子窗口。可见只要光照图窗口可见。

  • Use Lightmaps 使用光照贴图
    Whether to use the lightmaps during the rendering or not.
    是否渲染光照图。
  • Shadow Distance 阴影距离
    The distance at which Auto lights and Close By lightmaps fade out to just Far Away lightmaps. This setting overrides but not overwrites the QualitySettings.shadowDistance setting.
    根据过度到只使用远端光照图时哪些设置为自动模式的灯光被关闭的距离。这里的设置覆盖其他面板中相关设置。但是不能覆盖质量设置中的阴影距离设置。
  • Show Resolution 显示分辨率
    Toggles the scene view Lightmap Resolution mode, which allows you to preview how you spend your lightmap texels on objects marked as static.
    切换在场景中是否显示光照图分辨率。开启这项设置你可以在你的场景中直接预览静态物体光照图的分辨率大小。

Details 细节

Dual Lightmaps 双重光照贴图

Dual lightmaps is Unity's approach to make lightmapping work with specular, normal mapping and proper blending of baked and realtime shadows. It's also a way to make your lightmaps look good even if the lightmap resolution is low.

双光照贴图是Unity中的光照贴图可以同高光贴图,法线贴图和适当混合的实时阴影一起渲染的工具。同时它也可以让你的光照贴图看起来效果更好,即使设置的光照分辨率较低。

Dual lightmaps by default can only be used in the Deferred Lighting rendering path. In Forward rendering path, it's possible to enable Dual Lightmaps by writing custom shaders (use dualforward surface shader directive).

双光照贴图默认情况下只能用于延迟光照渲染路径。但通过编写自定义着色器就可能让双光照贴图用于前向渲染路径中(使用dualforward表面着色指令)。

Dual lightmaps use two sets of lightmaps:

双光照贴图即意为使用两套光照贴图:

  • Far: Contains full illumination
    远 :包含全部照明
  • Near: Contains indirect illumination from lights marked as Auto, full illumination from lights marked as Bake Only, emissive materials and sky lights.
    近 :包含标记为自动模式的灯光所产生的的间接照明,和标记为仅烘焙模式的灯光,发光材质和天光的所有照明。

Realtime Only lights are never baked. The Near lightmap set is used within the distance from the camera smaller than the Shadow Distance quality setting.

设置为仅实时的灯光永远不会被烘培。近端光照图作用于质量设置中的相对摄像机最小阴影距离范围内。 

Within this distance Auto lights are rendered as realtime lights with specular bump and realtime shadows (this makes their shadows blend correctly with shadows from Realtime Only lights) and their indirect light is taken from the lightmap. Outside Shadow Distance Auto lights no longer render in realtime and full illumination is taken from the Far lightmap (Realtime Only lights are still there, but with disabled shadows).

在这个距离范围内,自动模式的灯光将实时渲染高光,凹凸和阴影,(它们的阴影与实时模式的等光的阴影融为一体),间接光则来自近端光照贴图。 若超出阴影距离自动模式灯光光就不再进行实时渲染,而全部照明都由光照贴图产生(仅实时模式灯光仍然产生照明,但不产生阴影)。

The scene below contains one directional light with lightmapping mode set to the default Auto, a number of static lightmapped objects (buildings, obstacles, immovable details) and some dynamic moving or movable objects (dummies with guns, barrels). The scene is baked and rendered in dual lightmaps mode: behind the shadow distance buildings are fully lit only by lightmaps, while the two dummies are dynamically lit but don't cast shadows anymore; in front of the shadow distance both the dummy and static lightmapped buildings and ground are lit in realtime and cast realtime shadows, but the soft indirect light comes from the near lightmap.

下面的场景包含一个默认设置为为自动模式的平行光,一些烘培完光照贴图的静态物体(建筑物,障碍物,其他静态物体)和一些动态的移动或可移动物体(持枪的假人,桶)。 该场景在双重光照贴图模式中烘焙和渲染:阴影距离以外的建筑物完全由光照贴图产生照明,而两个假人由实时灯光产生动态光照,但是不投射阴影;阴影距离范围内的建筑物和地面被即时光照亮并投下实时阴影,但柔和的间接光是来自于近端光照贴图产生。

Single Lightmaps 单光照贴图

Single Lightmaps is a much simpler technique, but it can be used in any rendering path. All static illumination (i.e. from baked only and auto lights, sky lights and emissive materials) gets baked into one set of lightmaps. These lightmaps are used on all lightmapped objects regardless of shadow distance.

单一光照贴图是非常简单的技术,但是它可以应用到任何rendering path。所有静态光照(烘培一个设置为自动模式的光源,天光和自发光(放射性)光材质。)获得一个单一通道的光照贴图。这个光照贴图可以被应用到任何可被烘培的物体而不考虑阴影距离。

To match the strength of dynamic shadows to baked shadows, you need to manually adjust the Shadow Strength property of your light:

你需要手动去修正灯光的阴影强度,使得动态阴影的强度和烘培阴影的强度相匹配:


Adjusting Shadow Strength of a light from the original value of 1.0 to 0.7.
灯光阴影强度设置从1.0修改为0.7

Lightmapped Materials 光照贴图材质

Unity doesn't require you to select special materials to use lightmaps. Any shader from the built-in shaders (and any Surface Shader you write, for that matter) already supports lightmaps out of box, without you having to worry about it - it just works.

Unity不需要你为光照贴图选择特殊的材质。大部分内置的shader(以及大部分基于这些你写的表面shader)都可以无任何限制的支持光照贴图.。因此你不必担心光照贴图渲染会出问题。

Lightmap Resolution 光照贴图分辨率

With the Resolution bake setting you control how many texels per unit are needed for your scene to look good. If there's a 1x1 unit plane in your scene and the resolution is set to 10 texels per unit, your plane will take up 10x10 texels in the lightmap. Resolution bake setting is a global setting. If you want to modify it for a special object (make it very small or very big in the lightmap) you can use Scale in Lightmap property of Mesh Renderers. Setting Scale in Lightmap to 0 will result in the object not being lightmapped at all (it will still influence lightmaps on other objects). Use the Lightmap Resolution scene view render mode to preview how you spend your lightmap texels.

使用分辨率烘培设置可以让你控制每世界单位烘培到多大像素范围,从而使场景看起来很漂亮。如果你的场景空间中有一个1x1大小的平面,并且设置每世界单位分配10像素。那么你将得到一张10x10像素大小的光照贴图。分辨率烘培设置是一个全局设置。如果你想编辑某些特殊的物体(使它占用光照图上非常小或者非常大的面积)你可以使用网格渲染中的缩放光照贴图属性设置。设置缩放光照图属性值为0时物体将不烘培光照贴图。(但是它依旧影响其他的可烘培物体。)。使用光照贴图分辨率场景视口渲染模式可以查看关照图分辨率。


Lightmap Resolution scene view mode visualising how the lightmap texels are spent (each square is one texel).
光照图分辨率场景查看模式可以让你看到光照图分辨率大小。(每个小方格为一像素)

UVs

A mesh that you're about to lightmap needs to have UVs suitable for lightmapping. The easiest way to ensure that is to enable the Generate Lightmap UVs option in Mesh Import Settings for a given mesh.

你需要烘培光照图的网格模型需要包含一个合适的光照图UVs坐标集。你可以通过开启网格导入设置中的产生光照图UVs集的选项确保万无一失。

For more information see the Lightmap UVs page.

更多信息请参考Lightmap UVs页。 

Material Properties 材质属性

The following material properties are mapped to Beast's internal scene representation:

下列材质属性将通过Beast的内部场景算法进行烘培处理:

  • Color 漫反射颜色
  • Main Texture 漫反射贴图
  • Specular Color 高光颜色
  • Shininess 高光范围
  • Transparency 透明
    • Alpha-based: when using a transparent shader, main texture's alpha channel will control the transparency
      基础透明:如使用了透明材质,漫反射颜色贴图的alpha通道将控制透明 。
    • Color-based: Beast's RGB transparency can be enabled by adding a texture property called _TransparencyLM to the shader. Bear in mind that this transparency is defined in the opposite way compared to the alpha-based transparency: here a pixel with value (1, 0, 0) will be fully transparent to red light component and fully opaque to green and blue component, which will result in a red shadow; for the same reason white texture will be fully transparent, while black texture - fully opaque.
      基础颜色:beast的RGB透明可以激活shader上称为_TransparencyLM贴图属性。记住,这种透明度与alpha为基础的透明度的定义是相反的:这里有一个像素的值为(1,0,0)将完全可以透过的红色光而绿色和蓝色光就不能透过,并且产生一个红色的影子。因此,白色的贴图将是完全透明的,而黑色贴图 - 完全不透明。
  • Emission 自发光
    • Self Illuminated materials will emit light tinted by the Color and Main Texture and masked by the Illum texture. The intensity of emitted light is proportional to the Emission property (0 disables emission).
      自发光材质会产生基于漫反射颜色和漫反射纹理颜颜色以及自发光贴图遮罩范围的彩色光照。发光强度与自发光属性成正比(0产生自发光)。
    • Generally large and dim light sources can be modeled as objects with emissive materials. For small and intense lights normal light types should be used, since emissive materials might introduce noise in the rendering.
      一般大而昏暗的光源可以用指定了自发光材质的物体模拟。对于小而强的光源应使用常用的灯光类型,因为自发光材质在渲染时可能会产生噪点。

Note: When mapping materials to Beast, Unity detects the 'kind' of the shader by the shader's properties and path/name keywords such as: 'Specular', 'Transparent', 'Self-Illumin', etc.

注:使用Best烘培材质时,Unity会通过shader的属性和路径/名称关键字如:"反射","透明"," 自发光",等等检测shader的类型。

Advanced 高级

Automatic Atlasing 自动图集

Atlasing (UV-packing) is performed automatically every time you perform a bake and normally you don't have to worry about it - it just works.

Atlasing(UV包)是每次执行烘焙时都会自动执行的一个程序。

Object's world-space surface area is multiplied by the per-object Scale In Lightmap value and by the global Resolution and the result determines the size of the object's UV set (more precisely: the size of the [0,1]x[0,1] UV square) in the lightmap. Next, all objects are packed into as few lightmaps as possible, while making sure each of them occupies the amount of space calculated in the previous step. If a UV set for a given object occupies only part of the [0,1]x[0,1] square, in many cases atlasing will move neighboring UV sets closer, to make use of the empty space.

物体在世界空间表面面积是在每个物体烘培设置中的光照贴图缩放值乘以全局设置的分辨率以及物体光照贴图UV的尺寸(更确切地说是:[0,1] × [0,1]的UV平方单位)。接下来,所有的物体都压缩到 尽可能少的光照贴图里,同时确保它们的分辨率同前面我们所计算出的值一样。如果某个物体的光照图UV大小只占用了[0,1]X [0,1]平方单位的一部分,大部分情况下图集工具会减少两个物体的UV间隔,以释放更多空间。

As a result of atlasing, every object to be lightmapped has it's place in one of the lightmaps and that space doesn't overlap with any other object's space. The atlasing information is stored as three values: Lightmap Index, Tiling (scale) and Offset in Mesh Renderers and as one value: Lightmap Index in Terrains and can be viewed and modified via the Object pane of the lightmapping window.

由于使用了图集工具,每个将被烘培物体的光照图都有自己足够的空间,且不会与任何其他物体的光照图重叠。图集信息存储有三个值:光照贴图索引,平铺(缩放),以及在渲染网格上的偏移;地形的图集只存储为一个值:光照贴图索引,图集工具可以通过光照贴图窗口中物体面板来查看和修改。


Right-clicking a lightmap allows to select all game objects, that are using the chosen lightmap. Lightmaps of the active object from the current selection will be highlighted in yellow.

右键单击一个光照贴图,可以同时选择所有使用这张光照贴图的物体,这里我们选择的是光照贴图。如果选择某一个物体的那么它的光照贴图边框将高亮显示为黄色。

Atlasing can only modify per-object data which is Lightmap Index, Tiling and Offset and can not modify the UV set of an object, as the UV set is stored as part of the shared mesh. Lightmap UVs for a mesh can only be created at import time using Unity's built-in auto-unwrapper or in an external 3D package before importing to Unity.

图集工具只能修改每个对象的数据,即光照贴图索引,平铺和偏移,但不能修改物体的UV集,因为UV集是作为共享网格的一部分来存储的。一个网格物体的光照贴图 UVs只能在导入时用Unity内置的自动展开或者在三维软件中生成。

Lock Atlas 锁定图集

When Lock Atlas is enabled, automatic atlasing won't be run and Lightmap Index, Tiling and Offset on the objects won't be modified. Beast will rely on whatever is the current atlasing, so it's the user's responsibility to maintain correct atlasing (e.g. no overlapping objects in the lightmaps, no objects referencing a lightmap slot past the lightmap array end, etc.).

当锁定图集选项启用时,自动图集功能将无法运行,物体的光照贴图索引,平铺和偏移也不能进行修改。Beast只能依靠当前的图集,所以用户需要自己保证图集的正确性(例如:光照贴图中不能有重叠的uv,物体没有使用超出光照贴图序列范围的光照贴图索引等)。

Lock Atlas opens up the possibility for alternative workflows when sending your object's for lightmapping. You can then perform atlasing manually or via scripting to fit you specific needs; you can also lock the automatically generated atlasing if you are happy with the current atlasing, have baked more sets of lightmaps for your scene and want to make sure, that after adding one more object to the scene the atlasing won't change making the scene incompatible with other lightmap sets.

当锁定图集选项被打开时有两种分配光照贴图的工作流程可供你选择。这时可以根据你的特殊需求 手动或通过脚本来执行的图集,你也可以锁定上一次烘培时自动生成的图集,比方说你已经很满意现在的图集,或者说你需要为场景烘焙多套光照贴图, 再加入一个新物体到场景时也可以确保图集不会发生变化,不会影响到场景中已经烘培好的光照贴图。

Remember that Lock Atlas locks only atlasing, not the mesh UVs. If you change your source mesh and the mesh importer is set to generate lightmap UVs, the UVs might be generated differently and your current lightmap will look incorrectly on the object - to fix this you will need to re-bake the lightmap.

请注意锁定图集直视将图集锁定而没有将物体的UVs锁定。如果你想改变原始网格和网格导入设置中生成的UVs,那么就必须从新生成UVs,不过这样的话网格当前使用的光照贴图就不能正确的显示。如果你需要从新烘培光照贴图那么你最好修改你的设置。

Custom Beast bake settings 自定义Beast烘焙设置

If you need even more control over the bake process, see the custom Beast settings page.

如果你需要更多的烘培过程的控制,请参考custom Beast settings页面。

页面最后更新: 2011-10-25

猜你喜欢

转载自blog.csdn.net/hcud024/article/details/52190231