Skip to content

Search

Documentation

light3d

A 3D light placed and aimed by the node. kind is directional, point or spot; the first light3d in a scene retires the engine's default key light.

本頁內容

3d · render · 9 properties · 3D

A 3D light placed and aimed by the node. kind is directional, point or spot; the first light3d in a scene retires the engine's default key light.

In a scene, light3d is the node key that applies it. A script reaches each property below as a field on node.light3d: reading one asks the running component, and assigning one leaves the rest alone. The whole table is node.light3d.get() and node.light3d.set(table).

Properties

property type default description
color color [1,1,1,1] Light colour, as channel floats or #rrggbb / #rrggbbaa
inner_angle_degrees float 20 Half-angle of a spot light's full-brightness cone, in degrees Range 0–179.
intensity float 3 Brightness multiplier; over 1 blows past white At least 0.
kind enum directional A point light fades to nothing at range, a directional one lights the whole scene, a spot one throws a cone the node aims One of directional, point, spot.
light_layers int -1 Light-layer bitmask; a node is lit when its own light_layers share a bit with these. -1 is every layer
outer_angle_degrees float 35 Half-angle a spot light fades to nothing at, in degrees Range 0–179.
range float 30 How far a point or spot light reaches, in world units At least 0.
shadow_enabled bool true Whether this light casts shadows from the nodes that say they cast
source_radius float 0 Radius of the sphere the light shines from, in world units, which softens its shadows. Read by the path tracer only; the rasterizer's edge is environment.shadow_softness At least 0.