The 3D editor chunk, 3D3D (lib3ds MDATA), sits in the main
chunk and holds everything about the scene except its animation: materials, objects,
and the settings below. It has no data of its own, only sub-chunks. Chunk layouts are
given as the data after the 6-byte chunk
header.
Mesh version
| ID | Name | Data | Meaning |
|---|---|---|---|
3D3E | MESH_VERSION | dword | Version of the editor data. Some older notes print this ID as 3E3D, a slip |
Units and construction plane
| ID | Name | Data | Meaning |
|---|---|---|---|
0100 | MASTER_SCALE | float | The size of one unit (“one unit” in 3dsinfo.txt) |
1500 | O_CONSTS | vector | The construction plane |
Shadows and ray tracing
| ID | Name | Data | Meaning |
|---|---|---|---|
1400 | LO_SHADOW_BIAS | float | Global shadow map bias (low) |
1410 | HI_SHADOW_BIAS | float | Global shadow map bias (high) |
1420 | SHADOW_MAP_SIZE | word | Shadow map size, 10 to 4096 |
1430 | SHADOW_SAMPLES | Unknown | Named by lib3ds, not read by it, and not described elsewhere |
1440 | SHADOW_RANGE | Unknown | Likewise |
1450 | SHADOW_FILTER | float | Shadow filter, 1 (lowest) to 10 (highest); “shadow map sample range” in 3dsinfo.txt |
1460 | RAY_BIAS | float | Ray-traced shadow bias |
1470 | Not named | None (flag) | Use ray tracing, per 3dsinfo.txt |
Background
A scene stores all three kinds of background, and a separate flag chunk says which one is in use. The stored settings are kept even when not used.
| ID | Name | Data | Meaning |
|---|---|---|---|
1100 | BIT_MAP | strz | File name of the background bitmap |
1101 | USE_BIT_MAP | None (flag) | The bitmap is the background |
1200 | SOLID_BGND | Colour sub-chunks | Background colour, usually as 0010 then 0013 |
1201 | USE_SOLID_BGND | None (flag) | The solid colour is the background |
1300 | V_GRADIENT | float, then six colour sub-chunks | A three-colour vertical gradient: the float, 0.0 to 1.0, is the position of the middle colour; then top, middle and bottom colours, each written as a 0010 and a 0013 chunk |
1301 | USE_V_GRADIENT | None (flag) | The gradient is the background |
Ambient light
| ID | Name | Data | Meaning |
|---|---|---|---|
2100 | AMBIENT_LIGHT | Colour sub-chunks | The scene’s ambient light colour, usually float |
Fog and distance cue
| ID | Name | Data | Meaning |
|---|---|---|---|
2200 | FOG | 4 floats, then sub-chunks | Near plane, near density, far plane, far density; then a colour chunk and optionally 2210 |
2210 | FOG_BGND | None (flag) | Fog the background too |
2201 | USE_FOG | None (flag) | Fog is on |
2302 | LAYER_FOG | 3 floats, dword, then a colour chunk | Layered fog: lower height, upper height, density, flags; the flag bits are not documented |
2303 | USE_LAYER_FOG | None (flag) | Layered fog is on |
2300 | DISTANCE_CUE | 4 floats, then sub-chunks | Near plane, near dimming, far plane, far dimming; optionally 2310 |
2310 | DCUE_BGND | None (flag) | Dim the background too |
2301 | USE_DISTANCE_CUE | None (flag) | Distance cue is on |
Views and viewports
3D Studio saved its screen layout with the scene. These chunks matter only to the program’s own user interface. They appear in the editor chunk and, separately for the keyframer’s screen, in the keyframer chunk.
| ID | Name | Data | Meaning |
|---|---|---|---|
3000 | DEFAULT_VIEW | One view sub-chunk | The default view |
3010–3060 | VIEW_TOP, VIEW_BOTTOM, VIEW_LEFT, VIEW_RIGHT, VIEW_FRONT, VIEW_BACK | vector, float | Target position and view width |
3070 | VIEW_USER | vector, 4 floats | Target, width, horizontal angle, vertical angle, roll angle |
3080 | VIEW_CAMERA | 11 bytes | Name of the camera that gives the view |
3090 | VIEW_WINDOW | Unknown | Not described |
7001 | VIEWPORT_LAYOUT | 7 words, then sub-chunks | Layout style (see below), active viewport, unknown, swap, unknown, swap prior, swap view; then 7020 and one 7012 per view |
7020 | VIEWPORT_SIZE | 4 words | Position x, y and size width, height of the layout |
7012 | VIEWPORT_DATA_3 | See below | One view of the layout |
7011 | VIEWPORT_DATA | Unknown | The view record of releases 2 and 3; not described |
7000, 7010 | VIEWPORT_LAYOUT_OLD, VIEWPORT_DATA_OLD | Unknown | Older forms; not described |
7030 | NETWORK_VIEW | Unknown | Not described |
The 7012 view record, as lib3ds reads it:
| Offset | Size | Type | Meaning |
|---|---|---|---|
| 0 | 2 | word | Unknown |
| 2 | 2 | word | Axis lock |
| 4 | 4 | 2 words | Position x, y |
| 8 | 4 | 2 words | Size width, height |
| 12 | 2 | word | View type (see below) |
| 14 | 4 | float | Zoom |
| 18 | 12 | vector | Centre |
| 30 | 4 | float | Horizontal angle |
| 34 | 4 | float | Vertical angle |
| 38 | 11 | bytes | Camera name |
| View type | View | Layout style | Layout | |
|---|---|---|---|---|
| 0 | Not used | 0 | Single | |
| 1 | Top | 1 | Two panes, vertical split | |
| 2 | Bottom | 2 | Two panes, horizontal split | |
| 3 | Left | 3 | Four panes | |
| 4 | Right | 4 | Three panes, left split | |
| 5 | Front | 5 | Three panes, bottom split | |
| 6 | Back | 6 | Three panes, right split | |
| 7 | User | 7 | Three panes, top split | |
| 18 | Spotlight | 8 | Three panes, vertical split | |
| 65535 | Camera | 9 | Three panes, horizontal split | |
| 10 | Four panes, left split | |||
| 11 | Four panes, right split |