UDN
Search public documentation:
CreatingDecoLayers
Interested in the Unreal Engine?
Visit the Unreal Technology site.
Looking for jobs and company info?
Check out the Epic games site.
Questions about support via UDN?
Contact the UDN Staff
Creating DecoLayers
Document Summary: An introductory document on setting up DecoLayers. Document Changelog: Last updated by Michiel Hendriks, v3323 update. Previously updated by Jason Lentz (DemiurgeStudios?) to separate into smaller docs for the 2110 build. Original author was Lode Vandevenne (UdnStaff).Introduction
Here you will see how to create your own DecoLayers and the various ways you can manipulate them to your liking. This document assumes that you know how to build and shape a terrain and that you are familiar with the UnrealEdInterface, the StaticMesh Browser, and the Texture Browser.Creating a DecoLayer
DecoLayers generate Static Meshes everywhere on the terrain. You can only see the ones that are inside a radius you can set, to save resources. Also, the StaticMeshes from a DecoLayer are able do not impede players, so using them for trees isn't realistic, but DecoLayers are better used for grass, flowers and ferns. To create a new DecoLayer on a Terrain go to the Terrain Editor and click on the Decorations tab and press .You can also add more than one DecoLayer if you like. Before the DecoLayer works, you have to set a lot of settings. First give it a StaticMesh by right clicking on the newly created DecoLayer. This tells the DecoLayer what it will be rendering. Then you must create a new Terrain Layer. Get a texture that is very different from your terrain (for instance an checked texture -although make sure it's an RGBA8 texture with an alpha channel or a P8 texture). Create a new Terrain Layer by clicking on the "Layer" tab of the Terrain Editor, then click the button. Be sure to enter the texture's correct dimensions in the AlphaHeight and AlphaWidth fields. Also you should create this layer at the bottom of the layer stack. If you did not, you can move it to the bottom by selecting the layer and using the buttons. Next, select the Layer Texture that was created in the Texture Package "MyLevel" in the Texture Browser (Decoalpha1 in this example). Go back to the Decorations Tab and then right-click on the DecoLayer and choose the "Set Density Texture from Current." This tells the DecoLayer where to lay the decorations using an alpha channel. The white parts of the alpha channel, or the highest places in the palette of the P8 texture, will become the places where the most Static Meshes will be generated. You can also create your own textures maps to use as a Density Texture. If you just want the whole terrain to be grassy, you can use for example a white Density Texture, but if you want the grass to be only in the NW corner of the terrain, make the Density Map black everywhere, except in one corner. For example, you can create a crop circle with it. The picture on the left shows the alpha channel of the Density Texture that was used: The next options to set are in the Properties window of the Terrain Info. To open this, just double click on the TerrainInfo name in the Terrains tab of the Terrain Editor. Go to the TerrainInfo rollout within the Properties window and then expand the DecoLayers section. Then expand the DecoLayer enumerated as "[0]", and under the FadeoutRadius enter a large value for the Max, and a smaller value of for the Min. Between each Min and Max FadeOutRadius, the Static Meshes will become more and more transparent, until they become invisible. For example in the screenshot the Min FadeOutRadius is 500 and the Max is 1200. Both radii are marked with a yellow circle on the screenshot. Everything inside the smallest circle is opaque, everything between both circles is translucent, and outside the circles everything becomes invisible. The last in adding the DecoLayer Meshes to your map is to paint them on to your map. To do this, go back to the Layers tab of the Terrain Editor and select the layer you created (Decoalpha1 for this example). If the checkered texture you selected as the Density Texture is showing up when you paint on the DecoLayer Meshes simply go to the Layer tab in the Terrain Editor and move the Layer one below the rest of the Layers in the stack. This causes the terrain to no longer render the texture; however you can still select that layer and paint with it. NOTE: Do NOT paint while you have the DecoLayer selected under the Decorations tab. This can create holes in the Density map which prevent you from painting on StaticMeshes anywhere on those holes.Additional DecoLayer Properties
There are other options for adjusting the DecoLayers within the TerrainInfo rollout. Below are descriptions of what each of field controls.AlignToTerrain
If this is set to [1], this setting will cause the DecoLayer to rotate the StaticMeshes to align with the normal of the quad that the mesh is sitting on. If left at [0] the StaticMeshes will all be vertical. Aligning to the terrain can be useful for such things as rocks and debris, but when used on trees and grass it can look out of place.ColorMap
This map changes the color of the decorations on different locations. It has to be a RGBA8 texture; otherwise all decorations will become black. This effect is best visible on white or very bright Static Meshes. For example, white Static Meshes become like this if you use a colorful ColorMap: You can also paint a color on the DecoLayer manually: go to the Terrain Editing Window, select the tool "Color", pick a color with the Color button, and then go to the Decorations tab and select the DecoLayer you want to paint on. Then you should be able to paint on the terrain in the 3D View.DensityMap
This is the Texture Map you assigned by right clicking on the Layer in the Terrain Editor. From here you can reassign it to a different texture by first selecting a texture in the Texture Browser then clicking the "Use" button in this field when it is selected.DensityMultiplier
These fields vary the number of StaticMeshes that are placed in the painted DecoLayer area on the terrain. I'm not sure how exactly the Max and Min values separately determine the number ofStaticMeshes placed, but they do each do different things. Experiment with each to find the appropriate density of DecoLayer StaticMeshes.DetailMode
This defines the minimal detail that has to be set before this decolayer is shown. The minimal value isDM_Low
, in this case it will always be shown, unless decolayers are completely turned off ( DecoLayers
in [WinDrv.WindowsClient]
). With DM_High
it's only shown in high detail mode ( HighDetailActors
in the render device settings), and DM_SuperHigh
is just for eye candy ( SuperHighDetailActors
in the render device).