Mesh Decal
A mesh decal is a decal based on the arbitrary .mesh file and projected onto a surface by means of the orthographic projection.
- The mesh that is used for projection should contain a single surface. In case if the mesh contains several surfaces, only the one with the 0 index will be used. Thus, the area of the decal will differ from the initial mesh.
- The decals are always of the same size regardless of the projection box location relatively to the projection surface.
Roads Based on the Mesh Decal
See Also
- The DecalMesh class to manage mesh decals via API
- A set of samples located in the data/samples/decals/ directory:
- deferred_mesh_00
- deferred_mesh_01
- deferred_mesh_02
- deferred_mesh_03
- deferred_mesh_04
Creating a Mesh Decal#
To create a mesh decal:
- On the Menu bar, choose Create -> Decal -> Mesh.
- In the file dialog window that opens, choose a mesh for the decal:
An exported mesh should have less than 10000 polygons.
- Press Ok button and place the decal somewhere in the world (for the decal to be projected, the mesh should intersect the surface).
Editing a Mesh Decal#
In the Node tab of the Parameters window, you can adjust the following parameters of the mesh decal:
Node tab
Decal Mesh#
Projection parameters of the mesh decal:
Radius | The height of the projection box along the Z axis, in units.
|
||||
---|---|---|---|---|---|
Mesh | Path to the .mesh file on which the decal is based. |
Decal Common#
Parameters common for all types of decals:
Bit Masks#
Viewport Mask | A viewport mask, specifying if the decal can be seen in the camera's viewport. |
---|---|
Intersection Mask | The decal's intersection mask is used paired with the cutout intersection mask of clutters and grass to cut out the clutter or grass in the areas of intersection with the decal (e.g. can be used to remove grass from the surface of a road projected using decal). |
You can specify a shadow mask and a material mask in the decal_base material.
Life-Time Parameters#
Life time | A time period during which the decal is projected, in seconds. Set -1 to make the decal permanent. |
---|---|
Fade time | A time period during which the decal fades away (after its life time exceeds), in seconds. |
Init time | A time period after which the decal is projected, in seconds. |
Visibility Parameters#
Parameters controlling decal's visibility depending on the distance:
Min visibility | A minimum visibility distance, starting at which the decal begins to fade in and then becomes completely visible, in units. |
---|---|
Min Fade | A minimum fade-in distance, across which the decal smoothly becomes visible due to the alpha fading. It is counted starting from the minimum visibility distance value, in units. |
Max visibility | A maximum visibility distance, starting at which the decal begins to fade out until becomes completely invisible, in units. |
---|---|
Max Fade | A maximum fade-out distance, across which the decal smoothly becomes invisible due to the alpha fading. It is counted starting from the maximum visibility distance value, in units. |
Texture Coordinates Transformation#
Decal's texture coordinates transformation (a texture atlas can also be used):
Scale X | A texture size along the X axis. For example, by the scale of 2 the texture is reduced twice on one decal. |
---|---|
Scale Y | A texture size along the Y axis. |
Translate X | A texture offset along the X axis. For example, by the offset of 0.5 along the X axis the texture is repositioned to the right (so that the edge of the texture is rendered in the center). |
Translate Y | A texture offset along the Y axis. |
Setting a Material#
A material selection:
Material | A new material of the decal. |
---|
Last update:
09.04.2021
Помогите сделать статью лучше
Была ли эта статья полезной?
(или выберите слово/фразу и нажмите Ctrl+Enter