Scene values

The values that decide how a scene looks and is lit: cameras, lights, materials, environments, gradients and transforms, separate from the geometry itself.

Most of DNA's data describes shapes. Scene values describe everything around them. A camera frames them, lights and an environment illuminate them, materials give surfaces their look, and transforms place them in space.

Each flows along a wire like any other value, so they can be built with nodes, driven by Fields, and animated over time.

Cameras

A camera has a position and a target, the point it looks at, plus near and far limits setting how close and how far it can see.

Perspective cameras shrink things with distance like a real lens, set by focal length in millimetres on a 36mm full-frame equivalent. 16mm is wide and dramatic, 85mm tight and flattening, and the default is 28mm. Orthographic cameras hold everything at the same size, which is what technical and flat looks need.

There is also a fisheye family for wide, bulging views, plus space curvature and reverse perspective for surreal, non-photographic framing.

Lights

Four kinds:

Every light has a colour and an intensity. Shadows are off until you turn Cast Shadows on, and then they are ray-traced for every light type.

Environments

An environment is the light and backdrop wrapping the whole scene. It is an image, an HDRI photo lighting the scene with real-world light and reflections; a uniform constant radiance in every direction; or a procedural sky.

Controls are overall intensity, rotation for moving highlights around, and a colour tint. You choose whether it appears as the background behind the scene or only lights it.

An environment can light everything as a global floor, or be scoped to override the lighting of one scene. A scene with no environment of its own is still lit by the global one, so nothing renders pitch black by accident.

Materials

A material is the surface look applied to geometry. One flexible material covers most needs:

A material renders in one of four modes: PBR, the physically based default; Glass, a transmissive dielectric where index of refraction and absorption carry the look; Toon, cel-shaded into discrete bands; and Volume, participating media. Apply one material to a whole object, or give every point its own through the @material attribute.

A flat 2D fill you never gave a material to is the exception. It draws unlit, ignoring the lights and taking no shadows, because that is what a 2D fill almost always wants and lighting one is not free. Wire a Material node into it and it becomes a lit surface like anything else, shadows included. The behaviour follows the material, so this is a default rather than a switch to find.

Materials as a multi-channel field

Each property, base colour, metallic, roughness and the rest, can instead be driven by a field, so the look varies across the surface or through space. Bundle several of those together and you have a multi-channel field: one value on the wire carrying a named channel per material property, a PBR bundle rather than a flat material.

That is how you paint roughness from a texture, drive metallic with noise, or read colour from a raster, all at once. See Fields for what a multi-channel field is. The difference is one fixed material against a material calculated everywhere.

Gradients

A Gradient maps a value between 0 and 1 onto a smooth run of colours, defined by a set of colour stops. Use it to colour by a quantity, height, density or speed, instead of a single flat colour.

Gradients are common when colouring a Distance fields & volumes, where density maps onto colour and opacity to give smoke, fire and clouds their look.

Transforms

A transform bundles position, rotation and scale, often shortened to TRS. It places, turns and resizes things in space.

A transform travels along a wire like any other value, so passing one object's transform into another builds parenting and hierarchies. Move the parent and the children follow.

A bare position (Vec3) converts into a transform, filling in no rotation and a scale of 1. Use it when all you need is to move something.

See also