About these tips and tricks
I find it slow when I have to go find a YouTube tutorial to remind myself how to do some thing in Unreal Engine or Blender. These blog posts will summarise the steps and refer to the original video, to help me in the future and, I hope, may help you.
Creating a Heightmap for Unreal Engine Landscape in Blender
I find sculpting from a blank canvas in Unreal Engine tricky. You have to zoom into an area to be able to sculpt so getting the big picture is difficult. To make it easier like to create a heightmap to apply to the Unreal landscape as a starting point.
There are a number of ways to obtain a heightmap from real world data, but these are often more trouble than they are worth. Most rely on SRTM data, which is fine for the USA and territories, for the rest of the world the data is only accurate to around 90 metres, which does not result in a realistic landscape in Unreal. Aster data is available from TerrainParty, but often has clouds in the image which need to be touched up in image editing. Also the minimum size is 8Km square and the heightmap image size is too small. There are tools to create landscapes procedurally like Worldmachine, but they are expensive. The best solution I've found is to use a paid addon, Mirage, in Blender.
These are my steps for creating a heightmap in Blender with Mirage, and getting that into Unreal Engine:
But first there seems to be a bug in Mirage with Blender 2.90.1. Mirage does not load the presets automatically. The presets are in
- Create terrain in Mirage. I'd suggest Detail: 3. High, though if you PC can handle it, custom 2041 x 2041 will give a similar number of vertices as a 2041 x 2041 resolution in Unreal (for example 256 x 26 components, 64 components, 1 x 1 subsections = 2041 x 2041 resolutions (verts)). I'm not sure how much this changes the heightmap, and need to experiment more.
- Play around and get a nice landscape. The Mirage videos on YouTube are helpful, and the documentation is good (find it in the Blender Addons panel for Mirage).
- When done, select the Terrain in the Blender viewport
- Click on Mirage>Tools>Generate Vertex Groups and select Generate Height Group.
- Below in Export, click Export Vertex Group to Image.
- In the Blender image editor find the image (Height - Vertex Group)
- Change the image size to 2041 x 2041 (or whatever the Unreal Engine landscape resolution is. Image>Resize
- Save the image. Image>Save As . Set the image to png, BW, 16 Color Depth and no compression.
- If you load this into an Unreal Landscape it will be very blocky. First open the image in Photoshop (other image editing software is available and will cause much less damage to your financial well being). Apply a Filter>Guassian Blur at 1.5 pixels. Save the image
- In Unreal Engine, select the landscape, go into Modes>Landscape>Sculpt.
- Right click on Target Layers>Heightmap.
- Select Import from File and locate your heightmap.
- Once it's loaded you can adjust the height by scaling in Z on the Landscape Transform panel.
You can go back and play more in Blender, save a new heightmap image, apply the Gaussian Blur and then click on Heightmap in Unreal and select Reimport from...