L3DT documentation
Large 3D terrain generator

Design map file

The L3DT design map file (DMF) stores a number of design parameters for the heightfield, including altitude, erosion strength, sea-flooding flags, and so-forth.

The data is preceded by a 11-byte1) header containing the following information:

Field name Contents Length Offset Purpose
ASCII marker “L3DT” 4 0 Tells L3DT and humans that this is an L3DT file. Note string is not null terminated.
Binary marker USHORT 2 4 Tells L3DT what type of map file this is. Must be 200 for DMF.
Map width USHORT 2 6 East-west extent of the map (number of pixels).
Map height USHORT 2 8 North-south extent of the map (number of pixels).
Wrap flag BYTE 1 10 See wrap flag comments for HFF

The map data itself has 10 bytes per pixel, which are explained below. The pixels are ordered in rows going west-to-east, with south-to-north row-order.

Byte pos Data type Description
0-1 short int Altitude, in metres.
2 byte Peak roughness.
3 byte Fractal roughness.
4 byte Cliffs/terraces strength.
5 byte Erosion strength.
6 byte Auto-lake strength.
7 byte Climate ID number.
8 byte Special type ID.
9 byte Special type parameter.

These values are used in the design/inflate heightfield algorithm.

As of L3DT v2.4a build 15, the loading and saving of the DMF format is handled by the 'L3DTio_DMF.dll' plugin, the source code of which is (at the time of writing) available in the L3DT Plugin API. This may be very useful for those interested in importing/exporting/modifying design maps.

1) Yeah, I know this should be DWORD aligned. Next time I revise the spec, I'll be sure to remember that.
l3dt/formats/specs/dmf.txt · Last modified: 2017/08/31 06:15 (external edit)
Except where otherwise noted, content on this wiki is licensed under the following license:CC Attribution-Share Alike 3.0 Unported
Recent changes RSS feed Donate Powered by PHP Valid XHTML 1.0 Valid CSS Driven by DokuWiki