Creating custom terrain with Worldmachine
WIP ARTICLE DONT DELETE PLZ TY
World Machine is a very powerful tool for creating realistic terrain. Thanks to its ability to export heightmaps, you can use terrain generated in World Machine and import it into Source using displacements.
Exporting the Bitmaps
To import this into Source, we will need 3 textures: a Heightmap, a Diffuse texture, and a Normal Map. To get a normal map, add a "Normal-Map Maker" device (located under the "Converter" tab). To the input, connect your primary terrain heightmap. From the normal map output, connect a Bitmap Output (found under the "output" tab). Don't forget to double-click on the bitmap output and set a file destination.
Next, we need a heightmap. Connect your primary terrain heightmap to a Height Output node (located under the "output" tab). Double click on it, set your file location, and change your file format to BMP. This is required to import the heightmap into Terragen.
Finally, we need to export the megatexture. Connect the output of your texture to a Bitmap Output and make sure to set your file path.
Go to File -> Export Terrain Files and press "Export All." If you are prompted to build the files, press Yes.
Generating the displacements with Terragen
Next, we need to use Dispgen to create our terrain. The best settings are to use 16384 units for the X and Y size, 4096 for the height, and 256 for the X and Y triangles. In addition, check the box next to "Adjust Terrain to minimize vertical texture stretching" and uncheck "Run Smoothing." You can leave the material name alone, as we will be making a custom texture later. Finally, Define your heightmap and VMF Output file and press generate!