Docs menu · Parameters & expressions

Documentation

Parameters & expressions

The parameter panel

Select a node to see its parameters in the right panel. Every parameter has a description: hover the name, or expand the node documentation at the top of the panel. Changes apply immediately and re-cook the node and everything downstream; each change is one undo step. Parameters that differ from their default are marked with a dot.

Parameter types

TypeControlExample
floatNumber field with drag-to-scrub; plus a slider when the parameter has a minimum and maximumradius, amplitude
intWhole-number field (seeds, counts, iterations)seed, count
toggleCheckboxbottom_at_origin
vector 2 / 3Two or three number fields (X Y Z)size, translate
colourThree 0..1 fields plus a colour pickercolor, water_color
menuDrop-down of fixed optionsstyle, kind
stringText; also JSON lists such as sculpt strokesgroup, strokes
file pathText field for a file on diskfile on hf_export
graph nameName of another graph in the projectgraph on graph_ref
rampGradient preview with editable points (position + value or colour)color_ramp
codeMulti-line code editorcode on attrib_wrangle
listJSON listbuilding openings

The node reference lists every parameter of every node with its type, default and range.

Drag to scrub

Press inside any number field and drag sideways to change the value continuously. The viewport updates as you drag.

  • Hold Shift while dragging for fine steps (one tenth).
  • Hold Ctrl for coarse steps (ten times).
  • A plain click (without dragging) puts the cursor in the field so you can type a value.
  • A whole drag counts as one undo step.

Expressions

Any parameter can be an expression instead of a value. Click the = button next to a parameter, or type a value that starts with =. The rest is evaluated as a Python expression every time the node cooks. Vector parameters can have an expression per component.

VariableMeaning
FCurrent frame (integer)
FFCurrent frame as a float
TTime in seconds: (F - 1) / FPS
FPSFrames per second of the project
Examples
=sin(F*0.2)*2                      # oscillate between -2 and 2
=0.3 + 0.2*sin(T*3)                # time-based, independent of fps
=int(fit(F, 1, 120, 10, 500))      # count grows from 10 to 500 over frames 1-120
=ch("ground.size")[0] * 0.5        # half the X size of node "ground"
=rand(F) * 360                     # a different random angle every frame

An expression that uses F or T makes the node animate: press Play or scrub the timeline.

Expression functions

All functions from Python’s math module (sin, cos, pi, sqrt, floor, radians…), plus:

FunctionDoes
fit(v, a, b, c, d)Map v from the range a..b to c..d (clamped)
clamp(v, lo, hi)Limit v to lo..hi
lerp(a, b, t)Linear blend from a to b
smoothstep(a, b, x)Smooth 0..1 transition between a and b
rand(seed)Deterministic random number 0..1 for a seed
abs min max round int floatThe usual Python built-ins
npnumpy, for anything else
ch("node.param")The evaluated value of another node’s parameter (see below)

Referencing other parameters: ch()

ch("node.param") returns the current, evaluated value of a parameter on another node in the same graph (or ch("graph/node.param") for another graph). The referenced parameter can itself be an expression; circular references are reported as an error. Use it to drive several nodes from one control, for example a null you treat as a control panel, or to keep a roof as wide as its house.

# on roof.span:
=ch("house.depth") + 0.4

Ramps

A ramp maps a 0..1 input to a value or a colour: terrain colouring, particle colour over age, mask shaping. The panel shows a preview of the gradient (or curve) and one row per point with its position (0..1) and value or colour. Values between points are interpolated. In data a ramp is a list of [position, value] pairs, for example [[0, [0.1, 0.25, 0.08]], [1, [1, 1, 1]]].

Code parameters

Some nodes take code: attrib_wrangle, volume_wrangle, sdf_shapes and python. They are Tessera’s answer to VEX: vectorised numpy over all elements at once. In the editor, Tab inserts four spaces and Ctrl+Enter applies the code.

In attrib_wrangle every attribute of the chosen owner is an array (P is n×3, N, Cd, pscale…), with n, idx, F, T, geo, np, noise (fbm3, perlin3, curl3, worley3…), a seeded rng, ramp(t) and fit / clamp / smoothstep / lerp. Assign to a standard attribute name to write it; use attrs['name'] = … for new ones, delete = mask to remove elements and groups['top'] = mask for groups.

attrib_wrangle examples (owner: point)
P[:, 1] += 0.2 * np.sin(P[:, 0] * 3 + T)          # animated wave
pscale = rng.uniform(0.5, 1.5, n)                 # random scale per point
Cd = np.stack([P[:,1] / P[:,1].max(), np.zeros(n), 1 - P[:,1] / P[:,1].max()], 1)
delete = noise.fbm3(P, 2.0) > 0.3                 # delete points by noise