This page has been translated automatically.
视频教程
界面
要领
高级
实用建议
UnigineEditor
界面概述
资产工作流程
设置和首选项
项目开发
调整节点参数
Setting Up Materials
Setting Up Properties
照明
Landscape Tool
Sandworm (Experimental)
使用编辑器工具执行特定任务
Extending Editor Functionality
嵌入式节点类型
Nodes
Objects
Effects
Decals
Light Sources
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
注意! 这个版本的文档是过时的,因为它描述了一个较老的SDK版本!请切换到最新SDK版本的文档。
注意! 这个版本的文档描述了一个不再受支持的旧SDK版本!请升级到最新的SDK版本。

Field Spacer

A field spacer is an object, specifying geometry areas of grass and water that should not be rendered. Inside the spacer field, geometry is cut off gradually starting from the center of the field.

The spacer field allows you to dynamically adapt grass and water surface to other objects in the scene. For example:

  • A field spacer can be used to specify area under a building and around it where grass should not grow. Moreover, by using the attenuation factor, it is possible to create thinner grass around the building.
  • A field spacer can be set for a boat so that water is not rendered inside it.
Notice
A field spacer affects grass or water only if the FieldSpacer Interaction flag is set on the States tab of the corresponding material.
Boat without the spacer field: water is inside the boat
Boat with the spacer field: the spacer field cuts water off
Notice
The maximum number of FieldSpacers rendered per frame/bit mask is limited to:
  • 341 (DirectX)
  • 42 (OpenGL)

See also#

  • The FieldSpacer class to manage spacer fields via API
  • A set of samples located in the data/samples/fields/ folder:
    • spacer_00
    • spacer_01
    • spacer_02

Adding Field Spacer#

To add a spacer field in the world via UnigineEditor, do the following:

  1. On the Menu bar, choose Create -> Field -> Spacer.

  2. Place the spacer field in the world so that it intersects geometry required to be cut off:
    Notice
    Make sure that the Spacer interaction flag is set for materials applied to grass or water.
    • In case of grass, the spacer field should intersect the surface, on which grass grows.
    • In case of water, the spacer field should intersect the water surface:

If you are going to use the spacer field with dynamic objects, it is better to add the field as a child node to this object so that it can correctly affect grass or water geometry.

Editing Field Spacer#

In the Field Spacer section (Parameters window -> Node tab), the following parameters of the spacer field can be adjusted:

Setting Form of Spacer#

Ellipse Indicates whether the spacer field is ellipsoid-shaped. If unchecked, the spacer field has a form of a cube.

Setting Bit Masks#

Field Mask A field mask. A bit mask that specifies an area of the spacer field to be applied to grass or water. The spacer field will be applied to grass or water only if they have matching masks.
Viewport Mask A viewport mask. A bit mask for rendering the spacer field into the current viewport. For the spacer field to be rendered into the viewport, its mask should match the camera viewport mask.

Setting Size and Attenuation#

Size Size of the spacer field along the axes in units.
  • If the Ellipse option is unchecked, this is the size of the spacer field box along the axes.
  • If the Ellipse option is checked, these are the ellipse radius values along the axes.
Attenuation An attenuation factor indicating how much geometry is cut off gradually starting from the center of the spacer field.
  • By the minimum value of 0, all geometry inside the field spacer will be rendered.
  • The higher the value, the less geometry will be rendered inside the spacer field.
Atten = 5
Atten = 15
Last update: 2021-02-17
Build: ()