Terrain Generator

Terrain Generator is a simple terrain/elevation editor.
It can generate terrains that can be exported as:
- Doom levels for advanced source ports as GZDoom, ZDoom, K8Vavoom, Vavoom, DelphiDoom, RAD etc
- Voxels
Download latest version https://sourceforge.net/projects/dd-terrain/files/latest/download
Project Page: https://sourceforge.net/projects/dd-terrain/
Source Code Repository: https://github.com/jval1972/DD_TERRAIN
Main Application Window

The main application consists of the drawing and editing tools, the texture manager, the 2d preview and the 3d preview.
Drawing Tools
The drawing tools are used for painting directly to the terrain texture.
There are 3 drawing tools:

- rectangle: Draws rectangular shape
- circle: Draws round shape
- round edge: Draws round shape with smooth edge
The drawing tools can be configured by the Drawing Options:

- Size: The size of the shape
- Opacity: The drawing opacity percentage (from 1 to 100)
- Scale: The drawing source scale (from 10% to 400%)
Mesh Tools
The mesh tools are used for altering the terrain geometry.
There are 3 mesh tools:

- edit mesh: Changes the position grid vertexes
- elevation: Changes the elevation of the terrain
- smooth: Smoothes the elevation of the terrain
The mesh tools can be configured by the following options:

- Height: The amount of elevation that the elevation tool applies
- Smooth: The strength of smoothness that the smooth tool applies
By pressing the right mouse button over the 2d preview of the terrain the "Edit Heightmap Item" dialog appears:

In this dialog you can manually set the elevation and x/y offsets of a vertex.
There are the following options:
- Height: The amount of elevation of the vertex
- DX/DY: Horizontal plane offsets to make accurate deformations to geometry, not limited by automatic grid spacing
Texture Manager
The texture manager allows you to load texture from various sources.
The selection is used by the drawing tools.

There are 4 tabs:
- WAD file: Loads flats and patches from a WAD file. It will detect and display PNG & JPG images
- PK3 file: Loads textures from a PK3 archive. PNG and JPG images are supported
- Directory: Loads textures from a directory in your hard drive. PNG, JPG, TGA and BMP images are supported
- Color: Plain color
2D Preview
This is where all the editing is performed with the drawing and mesh tools.

3D Preview
This is where we can observe our efforts.
We can change the camera position by clicking the left or right mouse button, or by scrolling the middle mouse button.

Creating a New Terrain
You can create a new terrain by selecting the File/New menu item:

Then the "New Terrain" dialog appears:

In this dialog we can select the properties of the terrain:
- Texture Size: The actual size of the terrain. This is the drawing surface and can have sizes from 256x256 to 2048x2048 pixels
- Heightmap Size: This control the number of vertexes. It's size can be from 5x5 to 65x65
Import and Export
Terrains generated with Terrain Generator are saved in a custom format. In order to share data between diffent applications we use the import and export menu items.
Import

- Terrain texture: Loads the terrain texture from an image on disk. The image will be stretched to fit the terrain dimentions
- Heightmap: Loads the heightmap from an image on disk. The image will be stretched to fit the heighmap size. The image will be converted to grayscale and each pixel will represent the elevation of the terrain
Export

- WAD Map: Opens the Export WAD Map dialog with many options to configure WAD export.
- Voxel: Opens the Export Voxel dialog with many options to configure Voxel export.
- Terrain Texture: Exports the terrain texture to disk.
- Heightmap: Exports the terrain heightmap to disk.
- Screenshot (3d View): Saves the current 3D view of the terrain on an image on disk.
Export WAD Map dialog

In this dialog we select the properties of the generated MAP.
Engine
- DelphiDoom/RAD
- UDMF (GZDoom/K8Vavoom etc)
- Hexen format (ZDoom/Vavoom)
Game
- Doom
- Heretic
- Hexen
- Strife
- Radix
When selecting the Radix game, you can still use the map with ZDoom and Vavoom family source ports but you must also use the RAD2WAD tool to create an editing WAD for RADIX.DAT file.
If you want to use it with the DelphiDoom family source ports it is recommented use it with RAD.
Elevation Method
- Sloped sectors: It will create a map full of slopes!
- Flat sectors: Naive method to export a map without slopes.
- Trace contour: This method is using the meandering triangles algorithm to generate the map.
- Minecraft: This method will generate a map that resembles minecraft. Note that it will still generate in some cases triangular sectors.
The exported maps can be edited with DoomBuilder:

Export VOXEL Map dialog

In this dialog we select the properties of the exported Voxel.
- Size: The output size of the voxel from 32x32x32 up to 256x256x256.
- Constrains: Control the elevation stretching.
Voxels can be saved as:
- DelphiDOOM ddvox
- Slab6 vox
Both formats are supported from DelphiDoom family source ports and DD_VOXEL editor. You can use the Slab6 vox format to use the voxel with other source ports.