L3DT documentation
Large 3D terrain generator

Raw binary data file

The raw binary data file (.RAW) is an unstandardised - but usually simple - file format that is used to exchange data between programs. RAW files usually contain no header, which makes them unsuitable as a general purpose format, and this L3DT supports RAW for import and export only (though mosaic maps are supported).

Because RAW is not a well-defined format, there are many options available for this format. These options are accessible via the file preferences window ('File→Format preferences' in menu), or by the import and export wizards. These options are shown in the window below and explained afterwards.

Mode

One of the wonderful things about RAW files is that everyone uses a different data format, depending on what is convenient at the time. L3DT supports eight data formats for RAW:

Mode Value range Comments
8-bit unsigned (full range) 0→255 Always spans full range.
16-bit unsigned (full range) 0→65535 Always spans full range.
16-bit unsigned (metres) 0→65535 Clipped to metres; does not use full range.
16-bit unsigned (manual scale) 0→65535 Clipped to manual scale steps; does not use full range.
16-bit signed (full range) -32768→32767 Scaled such that highest above sea-level is 32767 OR lowest below sea-level is -32768.
16-bit signed (metres) -32768→32767 Clipped to metres; does not use full range.
16-bit signed (manual scale) -32768→32767 Clipped to manual scale steps; does not use full range.
32-bit floating point (metres) ±3.4028235×1038 Clipped to metres; does not use full range.

InvertY

The InvertY option automatically flips the y-axis on import/export. This is useful as L3DT uses a right-handed coordinate system in which the y-axis increases 'up the screen', whereas many programs use a left-handed system where the y-axis increases 'down the screen'.

Import

HeaderSize

Numerous programs pack extra data into a custom header section of a raw file (such as width, hight and bits/pixel). The HeaderSize is the number of bytes in that header, which you must provide to L3DT so that it can skip-over the custom section and read the data correctly.

Width and Height

The Width and Height values are the number of pixels in the x- and y-axes, respectively. RAW files do not store this data, so you have to input it manually.

Export

AppendSizeToFilename

L3DT can optionally append the width and height of the RAW file to the filename, which may make it easier to load in other applications. With AppendSizeToFilename enabled, for example, a 1024×2048 pixel RAW file that you saved as 'temp.raw' would actually be saved by L3DT as 'temp_1024x2048.raw'. This option is off by default.

 
l3dt/formats/specs/raw.txt · Last modified: 2017/08/31 06:43 (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