Introduction
The oldest parameter record of Mandelbulb 3D: the first field, MandId, is 0 to 3. The
program’s loader (LoadParameter in FileHandling.pas) reads SizeOf(TMandHeaderOld),
200 bytes, for these numbers and fills the fields that came later with zero. The record has the image
size, the view and the lighting; the field of view, the hybrid and the cutting options do not exist yet.
No file of this kind was available. The layout is read from the program’s source
(thargor6/mb3d, TypeDefinitions.pas), and the explorer’s reading of it is tested only on files
built to that layout, so the viewer is partial for this variant. The file is little-endian with no
padding and no signature; it is told apart from the other layouts by its size, exactly 200 bytes, and
a MandId from 0 to 3.
Layout
| Offset | Size | Field | Type | Meaning |
|---|---|---|---|---|
| 0x00 | 4 | MandId | i32 | The version of the record, 0 to 3 |
| 0x04 | 4 | Width | i32 | Image width in pixels |
| 0x08 | 4 | Height | i32 | Image height in pixels |
| 0x0C | 4 | Iterations | i32 | Maximum iterations |
| 0x10 | 4 | iOptions | i32 | Option flags |
| 0x14 | 8 | dZstart | f64 | Start of the Z range |
| 0x1C | 8 | dZend | f64 | End of the Z range |
| 0x24 | 24 | dXmid, dYmid, dZmid | 3 × f64 | The middle of the view |
| 0x3C | 24 | dXrot, dYrot, dZrot | 3 × f64 | The rotation around each axis |
| 0x54 | 8 | dZoom | f64 | The zoom |
| 0x5C | 8 | RStop | f64 | The R bailout |
| 0x64 | 8 | dPow | f64 | The power of the formula |
| 0x6C | 92 | Light | TLightingParas | The lighting block (below) |
Lighting block (TLightingParas, 92 bytes)
| Offset | Size | Field | Type | Meaning |
|---|---|---|---|---|
| 0x6C | 44 | TBpos[1] to TBpos[11] | 11 × i32 | Trackbar positions of the lighting panel |
| 0x98 | 4 | TBoptions | u32 | Lighting options as bit flags: the specular function in bits 1 and 2, the diffuse function in bits 3 and 4, position 12 in bits 5 to 11, position 13 (interior colour) in bits 12 to 18 |
| 0x9C | 4 | TBfineColAdjust | u32 | Fine colour adjustment: start in the low byte, stop in the next, and the fine-down option in bit 17 |
| 0xA0 | 4 | DepthCol | colour | The depth colour |
| 0xA4 | 36 | Cols[1] to Cols[9] | 9 × colour | The object colours: diffuse 1, specular 1, ambient 1, diffuse 2 and so on |
A colour is a Delphi colour value, $00BBGGRR: the first byte in the file is red, then
green, then blue, and the fourth byte is zero. The program’s loader converts these records to the
current layout, and for MandId below 5 flips the sign of the Z range and the rotations if the start
is after the end.
Quirks
- The record holds only the parameters, no picture and no hybrid block.
- The loader reads these 200 bytes even from a longer file; the explorer takes only a file of exactly 200 bytes.
Not described
What this page and the explorer leave out or only infer for this layout.
- Reference: no real file of this layout was available; it follows from the program’s source and is unchecked on files.
iOptionsand the lighting option bits have only terse meanings, and how the program converts the record to the current layout is not described beyond the sign flip noted above. - Viewer: shown only as built test files show it; there is no conversion to the current layout.
Variants
- MandId 0 to 3 – the oldest record, TMandHeaderOld, 200 bytes
- MandId 4 to 6 – TMandHeader4, 272 bytes, with the field of view and shadow settings
- MandId 7 – the 580-byte record with four lights
- MandId 8 to 19 – TMandHeader9, 704 bytes, with the old hybrid block from MandId 16
- MandId 20 and later – the current record, 1,976 bytes
- MandId 20 and later with the old hybrid block – 1,856 bytes
Links
Software
- Mandelbulb 3D – the Windows program that reads these files (Windows)
Developers
- thargor6/mb3d – the program’s Delphi source under the GNU LGPL 2.1, with TMandHeaderOld and the loader (Delphi)
Reference
- M3P, MandId 20 and later – the current record, with every field’s meaning