No announcement yet.

World Machine export to Landscape

  • Filter
  • Time
  • Show
Clear All
new posts

    World Machine export to Landscape

    I stared monkeying around with this a few days ago and I wanted to show some results.

    I've been using World Machine to generate the initial heightmap for the new landscape tool, along with some basic layer information. There is a macro in WM that creates basic color coverage based on a set of filters, and I've been working on modifying it to split the different coverage segments into separate .raw files for layer import. I then assign a layered material with similar color schemes to achieve the same effect in UDK. As you can see, I am getting pretty close, but I need cut some of the overlap so that the boundaries between layers are more sharp. The heightmap below is 1009x1009 with the z draw scale cut down to 16 after import into UDK.

    A few in game shots . . .

    I still don't grasp how to use the TerrainLayerWeight nodes for anything than simple diffuse texture info yet though. I was able to follow the example to set up a normal map for the entire terrain that makes it blend over LODs very well, but I'd like to apply normal maps to my layer textures so that the detail lighting looks better. With the heightmap used to create the normal for the entire landscape, the detail lighting is a bit blocky right now.

    See the following screenshots for examples . . .
    Hillside in editor with Lighting Only:

    Hillside in editor with Detail Lighting (Note the blocky detail lighting):

    The combined result.

    I'll try to get the WorldMachine macro cleaned up soon and show the end results. In the mean time, if anyone knows how to apply normal maps to the layer materials, please give me a heads up.


    Just create a separate layer weight chain in your material for the normal maps. Name the TerrainLayerWeight parameters the same as you did with the diffuse textures and plug the chain to the normal channel. This needs to be done to any channel you need to have in your landscape material.

    You can get the landscape geometry normals with a texture parameter named "Heightmap" inside the material. UDN shows quite well how to use it properly. You need to mix that normal map with the layer weight chain of your layer normal maps.


      Thank you musilowski. I started creating a separate layer weight chain yesterday and started having some graphics card issues. I now think it must have just been an unfortunate coincidence. Thanks for the guidance.


        Hi, I must Thank both of you It worked for me, it should have come into my mind though but it didnt. As I look on to it now, its pretty clear and easy.


          Alas, I'm still having trouble blending the two normal networks, the one from the heightmap, and my new normal TerrainLayerWeight chain. I'm going on the assumption that I should multiply the two together before connecting to the material normal channel. The result is that the layer normals seem to show up, but the heightmap driven normals are no longer having any effect (distant terrain no longer looks detailed). If I connect one network or the other alone, I get the expected results from that network.


            I use the landscape "Heightmap" normal map as the base normal map, and then add all other layer specific normal maps to it. Remember to multiply the layer specific normal maps with 3-vector constant (1,1,0) so that the blue channel is zero. Then when you add (don't multiply) it to the landscape normal map, it won't take detail away.


              Thanks, Xendance. I'll give it a try.


                I was still having trouble with the blocky heightmap based normals after blending, so I did a little more searching. I finally arrived on a solution that uses a network based on PixelDepth to interpolate between the heightmap based normals and the detail normals. The effect is that the heightmap based normals stay in the distance where they are needed, but don't create blocky details close to the camera. I've attached a screenshot of my material below. I'm happy with the results, but don't hesitate to let me know if I did anything foolish.

                Thanks for all the help, I learned a lot about the new landscape system this weekend, and even found time to tile my bathroom floor, so the wife is happy too.


                  Looks good. Can you give us a peak at what your map looked like with the new material set up? WE are having a major issue with the Normal maps looking too blocky up close. Thanks.


                    I'm really happy with the results I was able to achieve, and I'll post some screenshots after I get home from work tonight along with a better shot of the material setup. I suppose I could even provide the material itself, so you can dig into it.


                      Here is a screenshot without blending, notice the blocky normals on the terrain in the foreground.

                      Here is a screenshot taken from the same vantage point with linear blending applied in the material, most of the blockyness has gone away. When the camera is on the ground it is not noticeable at all, but I couldn't get the distance in.

                      Here is an updated shot of the material network.


                        Erasing paint strokes in Landscape layers

                        I'm just getting used to Landscape and have got my material on my landscape and added two layers and can paint them to mask in one or another texture, but I can't figure out how to erase brush strokes. Ctrl+RMB click doesn't do it. Ctrl+Shift+LMB doesn't do it.

                        Also, the brush for the texture is round but the painting result is always a square quite a bit larger than the radius.

                        Picture in attachment.
                        Attached Files


                          Hi tom,

                          You can't erase (it's not a viable meme with Landscape) you can only paint the other layer(s), as they all add up to one (they're not 'stacked' layers like photoshop). The Docs say the Landscape brush does have Ctrl+Sft+LMB brushwork (for regions masks and thing), but in the Weight maps, it decreases the active layer, and increases _all_ other layers by an equivalent amount, so 'erasing' is never going to give you one clean layer unless you only have 2 to start with.

                          Hi grimcat,

                          I like the distance blending. I haven't got to that yet in my test shaders, nice to see a good effect out of it. Looking very good so far.

                          Here's my attempt at Diffuse+Normals+Parallax material, GIS data heightfield sculpted & run thro L3DT:

                          Thanks for the PixelDepth pointer. Here's a couple other things to note:

                          Weightmaps are of comparable res to the Heightfield, and as mentioned above they 'add up to one' (you can check in PS/gimp, etc by importing the weight maps onto individual layers and changing the blend modes and whatnot... Multiply and Difference are nice...).

                          Whoa, just read through the new Gizmo docs, that's going to make my Atlas project very interesting...


                            Thanks Joshua,
                            I think I understood the layers add up to 1 overall, but what about the chunky square brush when there's even so small a brush used as round Alpha brush and 0.1 Brush size and 0.1 texture scale (or any other scale)?

                            I added a picture showing the thing that is bothering me. Tom.
                            Attached Files