Introduction
The parameter record of Mandelbulb 3D with MandId 4 to 6: TMandHeader4, 272
bytes. It is the 200-byte record of MandId 0 to 3 followed by the
field of view, the hard light axes and shadow, depth and cutting settings. The program’s loader reads
exactly SizeOf(TMandHeader4) bytes for these numbers.
No file of this kind was available. The layout is read from the program’s source
(thargor6/mb3d, TypeDefinitions.pas and FileHandling.pas) and the explorer’s reading is
tested only on files built to it, so the viewer is partial for this variant. A file is taken as this
layout when it is exactly 272 bytes and MandId is 4 to 6. There is no signature.
Layout
The first 0x6C bytes and the lighting block at 0x6C (92 bytes) are as in
MandId 0 to 3: five int32 (MandId, Width,
Height, Iterations, iOptions), the doubles dZstart,
dZend, dXmid, dYmid, dZmid, dXrot,
dYrot, dZrot, dZoom, RStop and dPow from 0x14 to 0x6B, then
TLightingParas (TBpos[1..11], TBoptions, TBfineColAdjust, DepthCol
and nine Cols, the colours as Delphi colour values with red first). What follows is new:
| Offset | Size | Field | Type | Meaning |
|---|---|---|---|---|
| 0xC8 | 8 | dFOVy | f64 | Field of view in the Y direction, degrees |
| 0xD0 | 8 | dHardLightZaxis | f64 | The Z axis of the hard light |
| 0xD8 | 8 | dHardLightXaxis | f64 | The X axis of the hard light |
| 0xE0 | 1 | bColorOnGrad | u8 | Colour on the gradient |
| 0xE1 | 1 | bCalculateHardShadow | u8 | Calculate the hard shadow |
| 0xE2 | 1 | bStepsafterDEStop | u8 | Steps after the DE stop (smooth normals) |
| 0xE3 | 4 | MinimumIterations | i32 | Minimum iterations |
| 0xE7 | 1 | iThreadPriority | u8 | The thread priority |
| 0xE8 | 4 | iAvrgDEsteps | i32 | Average DE steps × 10 (statistic) |
| 0xEC | 4 | iAvrgIts | i32 | Average iterations × 10 (statistic) |
| 0xF0 | 1 | CalcBackgroundShadow | i8 | Background shadow, −128 to 127 |
| 0xF1 | 1 | bCalcAmbShadowAutomatic | u8 | Ambient shadow: automatic (bit 1), kind (bit 2) |
| 0xF2 | 4 | sAniStart | f32 | Animation start (obsolete) |
| 0xF6 | 4 | sAniStop | f32 | Animation stop (obsolete) |
| 0xFA | 4 | sAniStep | f32 | Animation step (obsolete) |
| 0xFE | 1 | bAniOption | u8 | Animation option (obsolete) |
| 0xFF | 1 | bHScalculated | u8 | Hard shadows were calculated |
| 0x100 | 4 | sCutX | f32 | Cutting X (obsolete) |
| 0x104 | 4 | sCutY | f32 | Cutting Y (obsolete) |
| 0x108 | 4 | sCutZ | f32 | Cutting Z (obsolete) |
| 0x10C | 1 | bCutOption | u8 | The cutting option |
| 0x10D | 3 | newBuffer | 3 bytes | Spare |
The loader of the program flips the Z range and swaps and scales the rotations when
MandId is below 5 and the start is after the end, and for 5 and 6 converts
iOptions; it then converts the record to the current layout.
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. The obsolete animation and cutting fields,
iOptionsand the lighting option bits have only terse meanings, and the conversion to the current layout is not described. - 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 TMandHeader4 and the loader (Delphi)
Reference
- M3P, MandId 20 and later – the current record, with every field’s meaning