CBD-Tech does not publish the format; its files carry a notice forbidding reverse
engineering. What is known comes from independent study of the files by the open
source community, now gathered in UVtools, whose reader and writer
(ChituboxFile.cs) this page follows. Field names are UVtools’; fields
whose purpose nobody has worked out are marked unknown. All numbers are
little-endian; floats are IEEE 754 single precision.
Magic numbers and versions
The same layout serves the older .cbddlp (and .photon)
files and .ctb. The first four bytes tell them apart, and the version
at offset 4 says which optional blocks are present.
| Magic | Bytes | Meaning |
|---|---|---|
| 0x12FD0019 | 19 00 FD 12 | CBDDLP (and Photon): antialiasing by repeated 1-bit layers, no encryption |
| 0x12FD0086 | 86 00 FD 12 | CTB versions 2 and 3 |
| 0x12FD0106 | 06 01 FD 12 | CTB versions 4 and 5 |
| 0xFF220810 | 10 08 22 FF | CTB for UniFormation GKtwo printers (version 4 layout, longer notice) |
| 0x12FD0107 | 07 01 FD 12 | Encrypted CTB, a different layout; see Encrypted CTB |
| Version | Adds |
|---|---|
| 1 | Header, previews, layer table, images |
| 2 | Print parameters block; in CTB, slicer info and machine name |
| 3 | An 84-byte extended layer record before each layer image (per-layer lift and wait settings) |
| 4 | Copyright notice and version 4 parameters |
| 5 | Resin parameters |
Order of blocks
- Header (112 bytes)
- Large preview: record and image data
- Small preview: record and image data
- Print parameters (version 2 and later)
- Slicer info, then the machine name (CTB version 2 and later)
- Copyright notice, then version 4 parameters (version 4 and later)
- Resin parameters (version 5)
- Layer table
- Layer images, each preceded in version 3 and later by its extended layer record
Every block is found through offsets in the header or the slicer info, so readers should follow the offsets rather than assume this order.
Header
| Offset | Size | Type | Name | Meaning |
|---|---|---|---|---|
| 0 | 4 | uint32 | Magic | See above |
| 4 | 4 | uint32 | Version | 1 to 5 |
| 8 | 4 | float | BedSizeX | Build area width, mm |
| 12 | 4 | float | BedSizeY | Build area depth, mm |
| 16 | 4 | float | BedSizeZ | Build height, mm |
| 20 | 8 | uint32 × 2 | Unknown | Not understood |
| 28 | 4 | float | TotalHeight | Height of the model, mm |
| 32 | 4 | float | LayerHeight | Layer height used when slicing, mm (the layer table has the real positions) |
| 36 | 4 | float | ExposureTime | Normal layer exposure, s |
| 40 | 4 | float | BottomExposureTime | Bottom layer exposure, s |
| 44 | 4 | float | LightOffDelay | Light-off time between normal layers, s |
| 48 | 4 | uint32 | BottomLayerCount | Number of bottom layers |
| 52 | 4 | uint32 | ResolutionX | Screen width, pixels |
| 56 | 4 | uint32 | ResolutionY | Screen height, pixels |
| 60 | 4 | uint32 | LargePreviewOffset | Offset of the large preview record |
| 64 | 4 | uint32 | LayerTableOffset | Offset of the layer table |
| 68 | 4 | uint32 | LayerCount | Number of layers |
| 72 | 4 | uint32 | SmallPreviewOffset | Offset of the small preview record |
| 76 | 4 | uint32 | PrintTime | Estimated print time, s |
| 80 | 4 | uint32 | ProjectorType | 0 normal, 1 mirrored projection (LCD printers count as mirrored) |
| 84 | 4 | uint32 | PrintParametersOffset | Offset of the print parameters (version 2 and later) |
| 88 | 4 | uint32 | PrintParametersSize | Their size, 60 |
| 92 | 4 | uint32 | AntiAliasLevel | Number of image planes per layer: 1 for CTB; 1, 2, 4 or 8 for CBDDLP |
| 96 | 2 | uint16 | LightPWM | UV light power on normal layers, 0 to 255 |
| 98 | 2 | uint16 | BottomLightPWM | UV light power on bottom layers, 0 to 255 |
| 100 | 4 | uint32 | EncryptionKey | Seed for the layer image XOR; 0 means not encrypted (always 0 in CBDDLP) |
| 104 | 4 | uint32 | SlicerInfoOffset | Offset of the slicer info (CTB), 0 if none |
| 108 | 4 | uint32 | SlicerInfoSize | Size of the slicer info without the machine name, 76 |
Preview records
| Offset | Size | Type | Name | Meaning |
|---|---|---|---|---|
| 0 | 4 | uint32 | ResolutionX | Width, pixels |
| 4 | 4 | uint32 | ResolutionY | Height, pixels |
| 8 | 4 | uint32 | ImageOffset | Offset of the image data, normally right after this record |
| 12 | 4 | uint32 | ImageLength | Its length in bytes |
| 16 | 16 | uint32 × 4 | Unknown | Not understood; zero |
The image data is 16-bit run-length colour; see Image encoding. The printer shows the previews when the user chooses a file, so it need not render the model itself.
Print parameters (60 bytes)
| Offset | Size | Type | Name | Meaning |
|---|---|---|---|---|
| 0 | 4 | float | BottomLiftHeight | Platform lift after bottom layers, mm |
| 4 | 4 | float | BottomLiftSpeed | Its speed, mm/min |
| 8 | 4 | float | LiftHeight | Platform lift after normal layers, mm |
| 12 | 4 | float | LiftSpeed | Its speed, mm/min |
| 16 | 4 | float | RetractSpeed | Speed back down to the vat, mm/min |
| 20 | 4 | float | VolumeMl | Resin needed, ml |
| 24 | 4 | float | WeightG | Its weight, g |
| 28 | 4 | float | Cost | Its cost, in the user’s currency |
| 32 | 4 | float | BottomLightOffDelay | Light-off time after bottom layers, s |
| 36 | 4 | float | LightOffDelay | Light-off time after normal layers, s |
| 40 | 4 | uint32 | BottomLayerCount | Number of bottom layers (again) |
| 44 | 16 | uint32 × 4 | Padding | Zero |
Slicer info (76 bytes plus the machine name)
| Offset | Size | Type | Name | Meaning |
|---|---|---|---|---|
| 0 | 4 | float | BottomLiftHeight2 | Second, slower stage of the bottom lift, mm (two-stage motion) |
| 4 | 4 | float | BottomLiftSpeed2 | Its speed, mm/min |
| 8 | 4 | float | LiftHeight2 | Second stage of the normal lift, mm |
| 12 | 4 | float | LiftSpeed2 | Its speed, mm/min |
| 16 | 4 | float | RetractHeight2 | Second stage of the retract, mm |
| 20 | 4 | float | RetractSpeed2 | Its speed, mm/min |
| 24 | 4 | float | RestTimeAfterLift | Wait after lifting, s |
| 28 | 4 | uint32 | MachineNameOffset | Offset of the machine name |
| 32 | 4 | uint32 | MachineNameSize | Its length in bytes |
| 36 | 1 | uint8 | AntiAliasFlag | CTB: 7 without, 15 (0x0F) with antialiasing; CBDDLP: 0 or 8 |
| 37 | 2 | uint16 | Padding | Zero |
| 39 | 1 | uint8 | PerLayerSettings | 0 per-layer settings not allowed; 0x10 CBDDLP; 0x20 CTB v2; 0x30 v3; 0x40 v4; 0x50 v5 (only partly understood) |
| 40 | 4 | uint32 | ModifiedMinutes | Time of slicing, in minutes since 1 January 1970 UTC |
| 44 | 4 | uint32 | AntiAliasLevel | Antialiasing level chosen by the user (for CTB, informational) |
| 48 | 4 | uint32 | SoftwareVersion | Chitubox version, one byte each for major, minor and patch from the top: 0x01060300 is 1.6.3, 0x01090000 1.9.0, 0x02000000 2.0.0 |
| 52 | 4 | float | RestTimeAfterRetract | Wait after retracting, s |
| 56 | 4 | float | RestTimeAfterLift2 | Wait after the second lift stage, s |
| 60 | 4 | uint32 | TransitionLayerCount | Layers over which exposure steps from bottom to normal (not all printers) |
| 64 | 4 | uint32 | PrintParametersV4Offset | Offset of the version 4 parameters (version 4 and later) |
| 68 | 8 | uint32 × 2 | Padding | Zero |
| 76 | varies | chars | MachineName | Printer model from the slicer profile, ASCII in all known files; not null-terminated, except in version 5 |
Version 4 parameters
After the machine name comes the copyright notice, 320 bytes of text (323 bytes
for GKtwo files), then this block at PrintParametersV4Offset:
| Offset | Size | Type | Name | Meaning |
|---|---|---|---|---|
| 0 | 4 | float | BottomRetractSpeed | Retract speed after bottom layers, mm/min |
| 4 | 4 | float | BottomRetractSpeed2 | Second stage, mm/min |
| 8 | 4 | uint32 | Padding | Zero |
| 12 | 4 | float | Unknown | Always 4.0 in known files |
| 16 | 4 | uint32 | Padding | Zero |
| 20 | 4 | float | Unknown | Always 4.0 in known files |
| 24 | 4 | float | RestTimeAfterRetract | Wait after retracting, s |
| 28 | 4 | float | RestTimeAfterLift | Wait after lifting, s |
| 32 | 4 | float | RestTimeBeforeLift | Wait before lifting, s |
| 36 | 4 | float | BottomRetractHeight2 | Second stage of the bottom retract, mm |
| 40 | 8 | uint32 × 2 | Unknown | Vary between files; not understood |
| 48 | 4 | uint32 | Unknown | Usually 5 |
| 52 | 4 | uint32 | LastLayerIndex | LayerCount − 1 |
| 56 | 16 | uint32 × 4 | Padding | Zero |
| 72 | 4 | uint32 | DisclaimerOffset | Offset of the notice |
| 76 | 4 | uint32 | DisclaimerLength | Its length, 320 or 323 |
| 80 | 4 | uint32 | ResinParametersOffset | Offset of the resin parameters (version 5), else 0 |
| 84 | 380 | bytes | Reserved | Zero |
Resin parameters (version 5)
| Offset | Size | Type | Name | Meaning |
|---|---|---|---|---|
| 0 | 4 | uint32 | Padding | Zero |
| 4 | 4 | uint8 × 4 | ResinColour | Blue, green, red, alpha |
| 8 | 4 | uint32 | MachineNameOffset | Offset of the machine name below |
| 12 | 4 | uint32 | ResinTypeLength | Length of the resin type |
| 16 | 4 | uint32 | ResinTypeOffset | Its offset |
| 20 | 4 | uint32 | ResinNameLength | Length of the resin name |
| 24 | 4 | uint32 | ResinNameOffset | Its offset |
| 28 | 4 | uint32 | MachineNameLength | Length of the machine name |
| 32 | 4 | float | ResinDensity | g/ml |
| 36 | 4 | uint32 | Padding | Zero |
| 40 | varies | chars | ResinType, ResinName, MachineName | The three strings, in that order |
Layer table
LayerCount × AntiAliasLevel records of 36 bytes. In CBDDLP files
with antialiasing the table holds one full set of layers for each image plane,
plane 0 first; CTB always has one set.
| Offset | Size | Type | Name | Meaning |
|---|---|---|---|---|
| 0 | 4 | float | PositionZ | Platform height for this layer, mm |
| 4 | 4 | float | ExposureTime | Exposure of this layer, s |
| 8 | 4 | float | LightOffDelay | Light off after this layer, s |
| 12 | 4 | uint32 | DataOffset | Offset of the image data within its 4 GiB page |
| 16 | 4 | uint32 | DataSize | Length of the image data |
| 20 | 4 | uint32 | PageNumber | Which 4 GiB page: the real offset is PageNumber × 232 + DataOffset |
| 24 | 4 | uint32 | TableSize | 36, or 84 in version 3 and later (this record plus the extension) |
| 28 | 8 | uint32 × 2 | Unknown | Zero |
Extended layer record (version 3 and later)
Directly before each layer’s image data: a copy of its 36-byte table record, then 48 more bytes.
| Offset | Size | Type | Name | Meaning |
|---|---|---|---|---|
| 0 | 36 | record | LayerDef | Copy of the layer table record |
| 36 | 4 | uint32 | TotalSize | Size of this record plus the image data |
| 40 | 4 | float | LiftHeight | Lift after this layer, mm |
| 44 | 4 | float | LiftSpeed | mm/min |
| 48 | 4 | float | LiftHeight2 | Second lift stage, mm |
| 52 | 4 | float | LiftSpeed2 | mm/min |
| 56 | 4 | float | RetractSpeed | mm/min |
| 60 | 4 | float | RetractHeight2 | Second retract stage, mm |
| 64 | 4 | float | RetractSpeed2 | mm/min |
| 68 | 4 | float | RestTimeBeforeLift | s |
| 72 | 4 | float | RestTimeAfterLift | s |
| 76 | 4 | float | RestTimeAfterRetract | s |
| 80 | 4 | float | LightPWM | UV power for this layer, 0 to 255, stored as a float |
Identical CBDDLP layer images (version 2 and earlier) may share one copy of their data: several table records point at the same offset.