Creating rivers with the Flatten tool

Now that we have some hills going on, let's add some holes, making use of an additional tool, the Flatten tool.

Getting ready

You will need to have a landscape created for this recipe. If you need assistance with this, check out the Creating a landscape recipe earlier in this chapter.

How to do it…

With the knowledge of how to start a workflow, we can now apply that by quickly creating a level!

  1. In the Landscape Mode tab, click on the Sculpt tool tab and select the Flatten tool.
  2. Check the Flatten Target selection and put in -100. By default, the Flatten tool will flatten to the middle of the map, but this allows us to pick a new position for it to go to.
  3. Next, we want to increase Tool Strength to .8 to make it easier to dig out the river by clicking and dragging around wherever we want water to be placed.
    How to do it…

    Note

    There are a lot of other sculpting tools that can be used for other own purposes, but we don't have enough room to cover them all. For more information on all of the Sculpt mode tools, refer to https://docs.unrealengine.com/latest/INT/Engine/Landscape/Editing/SculptMode/index.html.

  4. Now that we have the ground for the river to be placed, we need to get our water placed in the world. In the Modes tab, select the Place mode and drag and drop a BSP Box object into the world. Under the X and Y axis, set the size to 50000, just like our terrain, and shift it so that it is centered in the world, being above the water but below our normal terrain.
  5. Then, go to the Materials folder and drag and drop the M_Water_Lake material to the Details tab under the Element 0 property of Surface Materials.

    Note

    One thing to note is that if you have a material selected before you create a BSP box, the material will automatically be applied to it once it is brought into the world.

    How to do it…
  6. Play the game and move over the water.
    How to do it…

    Playing the game with water in the world

  7. This is looking really nice, except that we can currently walk on water. That's because brushes always have collision. But, we can fix this by converting the BSP into a static mesh.
  8. Select the Box Brush object from the Scene Outliner tab and under the Details panel, go to Brush Settings and click on the little arrow at the bottom of the part to show the extended options. Once here, click on the Create Static Mesh option.
    How to do it…

    Option to convert object into a static mesh

  9. It will ask where you want to save it. Click on Create Static Mesh once again and it will finally convert the object into a static mesh.
    How to do it…

    The river object is now converted into a static mesh

    But you will see that on the geometry, it says Invalid Lighting Settings, as seen in the preceding image. To fix this, go to the mesh's location in the Content Browser tab and double-click on it to open up the Static Mesh Editor.

  10. Inside the Static Mesh Editor, in the Details tab, go to the LOD Settings section and expand Build Settings if it isn't expanded already. From here, uncheck the Generate Lightmap UVs option and then click on Apply Changes:
    How to do it…
  11. Finally, exit the Static Mesh Editor and go back into the Unreal Editor and select the mesh once more. From the Details tab, change Collision to NoCollision.

    Note

    Alternatively, in the Static Mesh Editor for the mesh, you can also go to Collision | Remove Collision, but this will make it so that all the objects with that mesh will not have collision, whereas the Details tab is only for that specific object in your level.

    How to do it…

    Playing the game with the removed collision allows the player go down into the water

Now you can go down into the water with no issues! It's looking pretty awesome!

Note

Another cool way of creating rivers is making use of the Landscape Splines tool. You can learn more about it at https://docs.unrealengine.com/latest/INT/Engine/Landscape/Editing/Splines/index.html

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.142.121.153