Lights and cameras are named objects, like
meshes: a 4000 chunk with the name, holding a 4600 light or a
4700 camera. Their animation is in the
keyframer. The ambient light is a scene setting,
2100.
4600 – Light
| Offset | Type | Meaning |
|---|---|---|
| 0 | vector | Position |
| 12 | Sub-chunks | A colour chunk, settings, and 4610 if it is a spotlight |
Without a 4610 sub-chunk the light is an omni light, shining in every
direction.
| ID | Name | Data | Meaning |
|---|---|---|---|
0010 | COLOR_F | 3 floats | The light’s colour |
4620 | DL_OFF | None (flag) | The light is switched off |
4625 | DL_ATTENUATE | float, or none | Attenuation on (“attenuation on” in 3dsinfo.txt, which gives no data); lib3ds reads a float from it |
4654 | DL_EXCLUDE | strz | The name of an object this light does not light, one chunk per object (lib3ds does not read it yet) |
4659 | DL_INNER_RANGE | float | Range start, where attenuation begins |
465A | DL_OUTER_RANGE | float | Range end, where the light reaches zero |
465B | DL_MULTIPLIER | float | Brightness multiplier |
4610 | DL_SPOTLIGHT | See below | Makes the light a spotlight |
4610 – Spotlight
| Offset | Type | Meaning |
|---|---|---|
| 0 | vector | Target: the point the spotlight aims at |
| 12 | float | Hotspot: the angle of the cone of full brightness, in degrees |
| 16 | float | Falloff: the angle of the cone outside which there is no light, in degrees |
| 20 | Sub-chunks | The spotlight settings below |
| ID | Name | Data | Meaning |
|---|---|---|---|
4627 | DL_RAYSHAD | None (flag) | Ray-traced shadows |
4630 | DL_SHADOWED | None (flag) | The light casts shadows |
4641 | DL_LOCAL_SHADOW2 | float, float, word | This light’s own shadow map settings: bias, filter, map size |
4650 | DL_SEE_CONE | None (flag) | Show the cone in the editor |
4651 | DL_SPOT_RECTANGULAR | None (flag) | Rectangular beam instead of round |
4652 | DL_SPOT_OVERSHOOT | None (flag) | Overshoot: light outside the cone too, without shadows |
4653 | DL_SPOT_PROJECTOR | strz | Projector: the image file the spotlight projects |
4656 | DL_SPOT_ROLL | degree | Roll around the beam’s axis |
4657 | DL_SPOT_ASPECT | float | Aspect ratio of a rectangular beam |
4658 | DL_RAY_BIAS | float | Ray-trace bias |
4700 – Camera
| Offset | Type | Meaning |
|---|---|---|
| 0 | vector | Position |
| 12 | vector | Target: the point the camera looks at |
| 24 | degree | Roll, or bank, around the line of sight |
| 28 | float | Lens: the focal length in millimetres |
| 32 | Sub-chunks | Optional settings below |
lib3ds turns the lens into a field of view as 2400 ÷ lens degrees, and
uses 45° when the lens is 0.
| ID | Name | Data | Meaning |
|---|---|---|---|
4710 | CAM_SEE_CONE | None (flag) | Show the camera’s cone in the editor |
4720 | CAM_RANGES | 2 floats | Near and far range |