TerreSculptor Supported Extended File Formats

TerreSculptor TSmap Heightmap Format

The TSmap file format is a basic headered binary format for storing a floating-point heightmap.

File ID ………………. 16 byte …. string
Type ID ……………. 16 byte …. string
Version ……………. 4 byte …… int32
Width ………………. 4 byte …… int32
Length  ……………. 4 byte ….. int32
Compression  .. 4 byte  …. enum
Padding …………. 16 byte …. padding
Data ………………. <binary> .. <binary>

File ID: “TerreSculptor”000
Type ID: “TSmap”00000000000
Version: 100
Width: datamap width 32-bit integer
Length: datamap length 32-bit integer
Compression: whether the file data is compressed, 0 = no compression (default), 1 = gzip full array compression (deprecated for saving), 2 = gzip line-by-line compression
Padding: header padding to take header size to 64 bytes
Data: either a stream of flat datamap float values or a gzip binary compressed byte stream


Truevision Targa TGA 16-bit Grayscale and 32-Bit Float Formats

Notes:
Photoshop only supports TGA Images up to 32767×32767 dimensions, even though the ImageWidth and ImageLength header properties are Int16 and therefore support values up to 65535×65535.
Photoshop does not support these Extended TGA File Formats of 16-Bit Grayscale and 32-Bit Grayscale.

TGA 16-bit Grayscale

– The header properties already natively support the necessary values to support this extended file format.
– The ImageType header property should be set to ‘3’ Black & White Uncompressed or ’11’ Black & White RLE Compressed depending on compression usage.
– The Bits-Per-Pixel header property should be set to ’16’.
– The Image Data block should contain ImageWidth*ImageLength Unsigned 16-bit Integers (Shorts) with a value range of 0…65535 per pixel.

TGA 32-bit Grayscale Float

– The header properties already natively support the necessary values to support this extended file format.
– The ImageType header property should be set to ‘3’ Black & White Uncompressed or ’11’ Black & White RLE Compressed depending on compression usage.
– The Bits-Per-Pixel header property should be set to ’32’.
– The Image Data block should contain ImageWidth*ImageLength Unsigned 32-bit Singles (Floats) with a value range of 0.0…1.0 per pixel. Other value ranges should not be used.