Home Unreal Engine

Landscape Layer Blend

Hey

I'm making a landscape in UDK and want to blend my layers together using different blend texture rather than using simple vertex blending. I've gathered I have to use the 'Landscape Layer Blend' node (http://udn.epicgames.com/Three/Lands...0Layer%20Blend) to do that. But I find the information documented there not to be sufficient enough for me to get started. Anyone here tried using it?

Replies

  • Eric Chadwick
    Options
    Offline / Send Message
    I haven't used it since the November build, but here are some of my notes from back then. Be aware this might be wrong now, as the Landscape system was under heavy development at the time.
    • The height map creates the terrain shape.
    • The alpha map creates a mask for the layer. There is a different alpha map for each layer.
    • It is best to use a 3D program to create these maps: World Machine, or Vue, or Terragen.
    • When you create the Landscape in Unreal, the first layer's alphamap is ignored. This is because the first layer is rendered under the other layers. Do not create an alphamap for the first layer, because it will be ignored.
    • All the bitmaps must be the same size. For a small landscape use 127x127. For a larger landscape use 253x253. UDN - Three - LandscapeCreating
    • Height map must be 16bit grayscale RAW format. Layer alphamaps must be 8bit grayscale RAW format. UDN - Three - LandscapeCreating
    • To load RAWs in Photoshop, set the height map RAW importer to 1 channel and 16bits and IBM PC. To load the alpha map in Photoshop, set the RAW importer to 1 channel and 8bits.
    • To save RAWs out of Photoshop: height maps should be Grayscale and 16 Bits/Channel (Image menu > Mode) and save as RAW (IBM PC), alpha maps should be Grayscale and 8 Bits/Channel and saved as RAW.


    • In Unreal in your landscape material, one of the layers must use LB_AlphaBlend. You will see black spots on the terrain, if all the layers use LB_HeightBlend. Usually, it is best to use LB_AlphaBlend for the layer that is behind the others (the one you imported first in the Landscape Edit window).


    1. To create a new Landscape mesh, open the Landscape tool.
    2. Load the height map. This will automatically set the vertex size.
    3. Load the first layer alpha map.
      1. This alpha map is ignored!
      2. It does not matter which bitmap you load here, but it has to be the same resolution as the height map.
      3. This texture will be under all the other texture layers. The layers are added in reverse order... you load the bottom layer first, you load the top layer last. Each alpha map will cover the bitmaps before it, so load them in the order you want them to cover each other.
    4. Load the other layer alpha maps.
      1. Make sure the alpha map Layer Names are the same as the names in the material Layer Blend nodes.
      2. If you want to rename the Layers, then you must use the same names when you import the alpha maps, that you are using in the material Layer Blend nodes.
    5. Press the "Create Landscape" button.
    6. Press the "Camera Mode" button to exit "Landscape Mode".
    7. Select the Landscape model. Press F4 to see the Properties view.
      1. Display > Draw Scale 3D > Change both the X and Y numbers to 32. This will scale down the mesh so you have a vertex every meter.
      2. Display > Draw Scale 3D > Change the Z number to 8. This will scale the vertical so it looks natural.
      3. Assign the material.
    8. Move the Landscape mesh to the middle of the world. Close the Properties window... if the Properties window is open, it might reset the position.


    Recommended Landscape Sizes
    • 127 x 127
    • 253 x 253
    • 509 x 509
    How control the size of the Landscape quads?
    • In the Properties dialog, set Draw Scale 3D to a smaller number, like 0.25.


    How do I blend textures based on terrain angle? For example, rock texture on vertical terrain.

    How do I blend textures based on terrain height? For example, snow texture at high elevations.


    I hope this helps.
  • Pampers
    Options
    Offline / Send Message
    hey thanks, but that only helped to some extent, do you by some chance have a screenshot of a material node setup using a landscape layer blend node?
  • Eric Chadwick
  • Pampers
    Options
    Offline / Send Message
    Yeah, found nothing. Those videos don't go through what I'm asking for.
  • Eric Chadwick
    Options
    Offline / Send Message
    So, give me some more information. You just want a bitmap mask for each layer?
  • Pampers
    Options
    Offline / Send Message
    Well, I want to blend my layers with masks so I can get more detailed transition other than just simple vertex blending :)

    LB_HeightBlend.png like this
  • Eric Chadwick
    Options
    Offline / Send Message
    Here's an example. The blend textures are loaded in the Landscape Tool, not the material. They are not stored as vertex color though, they are actual pixel data.

    gXo5x.jpg
  • Eric Chadwick
    Options
    Offline / Send Message
    I put my height maps in the normal map alpha channel. Then I used the Properties view to change a layer to use LB_HeightBlend... then it uses the alpha map for the "big" blending, and the height map for the "detail" blending.
  • Pampers
    Options
    Offline / Send Message
    Thanks a bunch man, did a quick test with it now and it works...but only in one direction
    gWpue.jpg
    made the heightmap similar to the example above
  • Eric Chadwick
    Options
    Offline / Send Message
    The height map in their example image is only tiled horizontally, it's meant for mapping on just a single strip of terrain.

    Instead, you want a traditional height map, like this. Also, the more contrast the sharper the blend.

    disp2.jpg
  • Pampers
    Options
    Offline / Send Message
    Figured, thanks again for all your help.
  • Eric Chadwick
    Options
    Offline / Send Message
    Awesome. I'm looking forward to seeing what you come up with, if you want to share later.
Sign In or Register to comment.