Version: 2019.3
使用高度贴图
视觉效果组件

地形设置 (Terrain Settings)

The final tool on the five-icon toolbar is for settings. In the Inspector, click the gear icon to reveal the Terrain settings.

Basic Terrain

属性 功能
Grouping ID Auto connect 功能的分组 ID。
Auto Connect 选中此复选框可自动将当前地形区块连接到具有相同 Grouping ID 的相邻区块。
Reconnect On rare occasions, you might lose connections between Terrain tiles if you change the Grouping ID, or disable Auto connect for one or more tiles. To recreate connections between tiles, click the Reconnect button. Reconnect only connects two adjacent tiles if they have the same Grouping ID and if both tiles have Auto Connect enabled.
Draw 选中此复选框可启用地形渲染。
Draw Instanced 选中此复选框可禁用实例化渲染。
Pixel Error The accuracy of the mapping between Terrain maps (such as heightmaps and Textures) and generated Terrain. Higher values indicate lower accuracy, but with lower rendering overhead.
Base Map Dist. The maximum distance at which Unity displays Terrain Textures at full resolution. Beyond this distance, the system uses a lower resolution composite image for efficiency.
Cast Shadows Use this to define how the Terrain casts shadows onto other objects in the Scene. Rendering.ShadowCastingMode controls how the Terrain shadow interacts with Scene objects.
Off The Terrain does not cast shadows.
On The Terrain casts shadows.
Two Sided Casts two-sided shadows from either side of the Terrain. Enlighten and Progressive Lightmapper do not support two-sided shadows.
Shadows Only Shadows from the Terrain are visible, but the Terrain itself is not.
Reflection Probes 使用此属性可设置 Unity 在地形上使用反射探针的方式。此设置仅在 Material 设置为 Built In Standard 时,或在使用支持反射渲染的自定义材质(__Material__ 设置为 Custom__)时有效。| ||Off|禁用反射探针,并使用天空盒进行反射。| ||Blend Probes|启用反射探针。混合仅在两个探针之间发生。如果附近没有反射探针,则使用默认反射,但默认反射和探针之间不会发生混合。| ||Blend Probes And Skybox|启用反射探针。混合发生在探针之间或探针与默认反射之间。| ||Simple|启用反射探针,但当存在两个重叠的探针体积时,探针之间不发生混合。| |Material||Lets you specify the Material to use for rendering Terrain.| ||Create__ The Create button only appears when you select a default Terrain Material. It does not appear when you select a custom Material. When you click Create, Unity creates a copy of the Material in your Project folder, which you can modify, and then automatically selects this new copy.

Tree and Detail Objects

属性 功能
Draw 选中此复选框可绘制树、草和细节。
Bake Light Probes For Trees 如果选中此复选框,Unity 将在每棵树的位置创建内部光照探针,并将它们应用于树渲染器以便渲染光照。这些探针是内部探针,不会影响场景中的其他渲染器。

如果不选中此复选框,树仍受光照探针组的影响。此选项仅对在原型预制件上启用了光照探针的树有效。
Remove Light Probe Ringing 如果选中此复选框,Unity 将消除可见的过冲(通常在受强光照射影响的游戏对象上表现为振铃)。此设置可降低对比度,并依赖于“Bake Light Probes for Trees”设置。有关更多信息,请参阅光照探针组:振铃
Preserve Tree Prototype Layers 如果希望树实例采用其原型预制件的层值而非地形游戏对象的层值,请选中此复选框。
Detail Distance 超过此距离(相对于摄像机)将剔除细节。
Detail Density 给定单位面积内的细节/草对象数量。将此值设置得较低可以减少渲染开销。
Tree Distance 超过此距离(相对于摄像机)将剔除树。
Billboard Start 位于此距离(相对于摄像机)的 3D 树对象将由公告牌图像取代。
Fade Length 树在 3D 对象和公告牌之间过渡的距离。
Max Mesh Trees 表示为实体 3D 网格的可见树的最大数量。超出此限制时,树将被公告牌取代。

Wind Settings for Grass

属性 功能
Speed 风吹过草时的速度。
Size 风吹过草地时出现的波纹大小。
Bending 草对象被风吹弯的程度。
Grass Tint 应用于草对象的整体颜色色调。

Mesh Resolution

属性 功能
Terrain Width 地形游戏对象在 X 轴上的大小(以世界单位表示)。
Terrain Length 地形游戏对象在 Z 轴上的大小(以世界单位表示)。
Terrain Height 最低可能高度贴图值与最高值之间的 Y 坐标差异(以世界单位表示)。
Detail Resolution Per Patch 单个面片(网格)中的单元格数量。该值经过平方后形成单元格网格,且必须是细节分辨率的除数。
Detail Resolution 可用于将细节放置到地形区块上的单元数。此值在经过平方后生成单元格网格。

Holes Settings

属性 功能
Compress Holes Texture If you check this box, Unity compresses the Terrain Holes Texture to the DXT1 graphics format in the Player during runtime. If you don’t check this box, Unity does not compress the Texture.

Texture Resolutions

属性 功能
Heightmap Resolution 地形高度贴图的像素分辨率。此值必须是 2 的幂再加 1,例如 513,即 512 + 1。
Control Texture Resolution The resolution of the splatmap that controls the blending of the different Terrain Textures.
Base Texture Resolution The resolution of the composite Texture to use on the Terrain when you view it from a distance greater than the Basemap Distance.

Require resampling on change indicates that when you change properties under Texture Resolutions, the Editor resizes the Terrain tile’s content to the new size you specify, which can potentially affect the quality of your content.

高度贴图 Import/Export 按钮

Import RawExport Raw 按钮允许您将地形的高度贴图设置或保存为 RAW 灰度格式的图像文件。可在第三方地形编辑工具(如 Bryce)中创建 RAW 格式文件,然后可在 Photoshop 中打开、编辑和保存这些文件。因此可在 Unity 之外以复杂的方式生成和编辑地形。

Lighting

属性 功能
Contribute Global Illumination Enable this check box to indicate to Unity that the Terrain influences Global Illumination computations. When you enable this property, Lightmapping properties appear.
Receive Global Illumination You can only configure this option if you’ve enabled Contribute Global Illumination above. If you don’t enable Contribute Global Illumination, the Terrain registers as non-static, and receives Global Illumination from Light Probes.

光照贴图

属性 功能
Scale in Lightmap Lets you specify the relative size of an object’s UVs within a lightmap. If you set this to zero, the object is not lightmapped, but still contributes lighting to other objects in the Scene. A value greater than 1.0 increases the number of pixels (the lightmap resolution) used for this GameObject, while a value less than 1.0 decreases it.
Lightmap Parameters 调整高级参数,这些参数会影响使用全局光照为对象生成光照贴图的过程。请参阅光照贴图参数 (Lightmap Parameters) 以了解有关这些设置的更多信息。
Rendering Layer Mask Determines which rendering layer this Terrain lives on. When you use a scriptable render pipeline, you can specify an additional rendering-specific layer mask. This filters the renderers based on the mask the renderer has and the mask passed to the DrawRenderers command.

Terrain Collider

属性 功能
Material 物理材质的引用,可确定该地形的碰撞体与场景中其他碰撞体之间的交互方式。
Terrain Data The TerrainData Asset that stores heightmaps, Terrain Textures, detail Meshes, and Trees.
Enable Tree Colliders 选中此复选框可启用树碰撞体。

  • 2020–01–16 页面已修订

  • Updated content to reflect new UI and options

使用高度贴图
视觉效果组件