Skip to main content

light3d

3d · render · 8 properties · 3D

A 3D light: the node's position places it and its rotation aims it. A scene with no light3d keeps the engine's own key light, so nothing draws dark until a scene starts placing its own; the first one added retires it. Turn one off with the node's visible, not by deleting it.

In a scene, light3d is the node key that applies it. A script reaches the same properties through node.light3d.get() and node.light3d.set(table).

Properties

propertytypedefaultdescription
colorcolor[1,1,1,1]Light colour, as channel floats or #rrggbb / #rrggbbaa
innerfloat20Half-angle of a spot light's full-brightness cone, in degrees Range 0–179.
intensityfloat3Brightness multiplier; over 1 blows past white At least 0.
kindenumdirectionalA point light fades to nothing at radius, a directional one lights the whole scene, a spot one throws a cone the node aims One of directional, point, spot.
layersint-1Light-layer bitmask; a node is lit when its own layers share a bit with these. -1 is every layer
outerfloat35Half-angle a spot light fades to nothing at, in degrees Range 0–179.
radiusfloat30How far a point or spot light reaches, in world units At least 0.
shadowsbooltrueWhether this light casts shadows from the nodes that say they cast