Placing decals in a level is a simple way to break up uninteresting textures, as well as bring together various level elements like brushes and terrain.
|Table of Contents|
Selecting the Decal Entity
To place a decal in the level, you should first activate Follow Terrain. This ensures that the decal will be visible on the terrain.
Now go to the Misc Object Type library located in the RollupBar and select Decal.
Placing a Decal in the Level
Select the decal by dragging the Decal into the level. The Follow Terrain tool that was previously selected will snap the new object to the terrain as you move it around.
Click to place the decal in its current position. You can then Move/Rotate/Scale the decal by using the Editing Mode commands located in the Edit menu or on the EditingMode ToolBar.
Setting Up the Decal Material
A decal material has to be marked with the Decal flag in the Shader Generation Parameters in the material options, as shown below.
With the decal selected in the Perspective view, select a material in the Material Editor and click the Assign Material to Selection button.
Decal Projection Types
Decals have 4 different projection types, numbered 0 to 3. To change a decal's projection, select the decal and change the value in the Projection type line, shown below.
The decal will be displayed in the exact same position in space as where you placed the center of the object.
Planar projection offers the cheapest performance.
The decal will be projected onto the geometry of an object in the level. It will be projected along the opposite direction of the blue Z axis.
This method is automatically done as a deferred pass.
The decal will be projected directly on to the terrain of your level, ignoring any assets that might otherwise receive the projection.
This projection type is a combination of type 2 and 3, and will be displayed on both the terrain and objects.
This method is automatically performed as a deferred pass.
Manual Placement of Decals on Objects or Terrain
Select the decal entity, activate Reorientate and use mouse shortcuts to place the decal:
This speeds up placement enormously.
Fixing Flickering Decals
If a placed decal is flickering, follow these steps to ensure that it has been properly set up.
- Check that all sub materials have the "Decal" flag checked in the Material Editor.
- If it still flickers, check for overlapping layers that have the "Decal" flag enabled. Use the SortPriority param to specify which decal will appear on top of the other.
- Other than for decals (which are flagged correctly) the mesh shouldn't have any overlapping triangles. Also do not try offsetting them by a few units along the surface normal, it can still break in some situations and will introduce parallax effects, e.g. floating over the surface.
Depending on the view distance and the resulting precision of the depth buffer, it might work on some hardware but fail on others.
Good placement of decals can bring your level to life. They can also be used to create seamless transitions between many different objects.