Thursday, March 20, 2014

UDK Landscapes Part 2: Importing Heightmaps and Weightmaps into UDK

You can either create your game landscape inside UDK using the landscape editor or by using an external program and importing those heightmaps into UDK. In our last post I detailed how to use one such external program called Terresculptor to generate height and weight maps for your landscape. This tutorial will show you how to import those maps into UDK.

1. Create a new blank map in the UDK Editor, and click Landscape Mode on the left toolbar. This will open the Landscape Edit box.

2. In the Landscape Edit box under "Heightmap Import," click the ellipsis to bring up the search box. Navigate to your .r16 heightmap file you created in Terresculptor and click "Open."

3. Back in the Landscape Edit box, under the "Layers" subheading, click the ellipsis next to "Import Layer" and navigate to your weightmaps. It is important that you import these in order of the most steep slope, to least sloping because the last weight map imported will serve to cover everything not covered by the other two layers (if you are familiar to Photoshop, this is the same idea as different Photoshop layers).

4. Click the "Create Landscape" button at the bottom and UDK will use your heightmap to generate your landscape. Close the Landscape Edit box and open up the landscape properties by either double-clicking on the landscape, right-clicking and choosing the "Landscape Properties" option, or by pressing F4. Navigate to the "Draw Scale 3D" under the Display tab and change the Z value from "256" to "128" to make your landscape the same scale as you made in in Terresculptor. Close the "Landscape Properties" box.

5. In your viewport, right-click on your landscape and add a dominant directional light and your editor should automatically switch you to Lit Mode and display the details of your landscape.

The next tutorial in this series will show you how to apply materials to your landscape using the weightmaps.

No comments:

Post a Comment