Divooka Reference

Staging

49 nodes

On this page 49

Add To Scene

Function

The scene with more elements in it.

Signature
AddToScene -> Scene Description
    scene: Scene Description
    elements: Scene Element Array
SceneDescription AddToScene(
    SceneDescription scene,
    SceneElement[] elements)

Parameters

nametypedefaultdescription
sceneScene Description—
elementsScene Element Array—

Returns

resultScene Description
Ships with
Divooka ExploreDivooka Compute
Graph kinds
Flows Function Events Routine Constructs StateMachineState
Declared by
Staging
Package
Computer Graphics

Animate

Function

The element moving through keys: at each key's moment it is where the key says, and between them it is eased from one to the next.

Signature
Animate -> Scene Element
    element: Scene Element
    keys: Motion Key Array
    easing: Motion Easing
    loop: Truth
SceneElement Animate(
    SceneElement element,
    MotionKey[] keys,
    MotionEasing easing = MotionEasing.Smooth,
    bool loop = false)

Parameters

nametypedefaultdescription
elementScene Element—What moves.
keysMotion Key Array—The keys, in any order; they are put in time order.
easingMotion EasingSmoothHow it goes from key to key: smoothly, at a steady pace, or in steps.
loopTruthFalseWhether it starts again from the first key after the last.

Returns

resultScene Element
Ships with
Divooka ExploreDivooka Compute
Graph kinds
Flows Function Events Routine Constructs StateMachineState
Declared by
Staging
Package
Computer Graphics

Animate Setting

Function

A setting of a light or a camera changing through keys over the run: a light fading up or flickering, a zoom, a focus pull. Replaces any track the element had for that setting.

Signature
AnimateSetting -> Scene Element
    element: Scene Element
    setting: Animated Setting
    keys: Setting Key Array
    easing: Motion Easing
    loop: Truth
SceneElement AnimateSetting(
    SceneElement element,
    AnimatedSetting setting,
    SettingKey[] keys,
    MotionEasing easing = MotionEasing.Smooth,
    bool loop = false)

Parameters

nametypedefaultdescription
elementScene Element—A light, for Intensity and Exposure; a camera, for Focal Length, Focus Distance and F Stop.
settingAnimated Setting—Which setting changes.
keysSetting Key Array—The keys, in any order; they are put in time order.
easingMotion EasingSmoothHow it goes from key to key.
loopTruthFalseWhether it starts again from the first key after the last.

Returns

resultScene Element
Ships with
Divooka ExploreDivooka Compute
Graph kinds
Flows Function Events Routine Constructs StateMachineState
Declared by
Staging
Package
Computer Graphics

Area Light

Function

A glowing rectangle at a point, facing another: a softbox, a window.

Signature
AreaLight -> Light Element
    x: Number
    y: Number
    z: Number
    targetX: Number
    targetY: Number
    targetZ: Number
    width: Number
    height: Number
    intensity: Number
    color: Optional Color
LightElement AreaLight(
    double x,
    double y,
    double z,
    double targetX = 0,
    double targetY = 0,
    double targetZ = 0,
    double width = 1,
    double height = 1,
    double intensity = 5,
    ColorElement? color)

Parameters

nametypedefaultdescription
xNumber—
yNumber—
zNumber—
targetXNumber0
targetYNumber0
targetZNumber0
widthNumber1
heightNumber1
intensityNumber5
colorOptional Color—

Returns

resultLight Element
Ships with
Divooka ExploreDivooka Compute
Graph kinds
Flows Function Events Routine Constructs StateMachineState
Declared by
Staging
Package
Computer Graphics

Box

Function

A box, centred on its origin.

Signature
Box -> Shape Element
    width: Number
    depth: Number
    height: Number
    name: Text
ShapeElement Box(
    double width = 1,
    double depth = 1,
    double height = 1,
    string name = "")

Parameters

nametypedefaultdescription
widthNumber1
depthNumber1
heightNumber1
nameText—

Returns

resultShape Element
Ships with
Divooka ExploreDivooka Compute
Graph kinds
Flows Function Events Routine Constructs StateMachineState
Declared by
Staging
Package
Computer Graphics

Camera

Function

A camera at a point, looking at another, in focus there.

Signature
Camera -> Camera Element
    x: Number
    y: Number
    z: Number
    targetX: Number
    targetY: Number
    targetZ: Number
    focalLength: Number
    fStop: Number
    name: Text
CameraElement Camera(
    double x,
    double y,
    double z,
    double targetX = 0,
    double targetY = 0,
    double targetZ = 0,
    double focalLength = 35,
    double fStop = 0,
    string name = "Camera")

Parameters

nametypedefaultdescription
xNumber—Where it stands.
yNumber—Where it stands.
zNumber—Where it stands: 1.6 is eye height.
targetXNumber0What it looks at.
targetYNumber0What it looks at.
targetZNumber0What it looks at.
focalLengthNumber35The lens in millimetres on a full-frame sensor: 24 is wide, 35 normal, 85 a portrait lens.
fStopNumber0The aperture for depth of field, or 0 for everything sharp.
nameTextCameraIts name, which a scene picks it by.

Returns

resultCamera Element
Ships with
Divooka ExploreDivooka Compute
Graph kinds
Flows Function Events Routine Constructs StateMachineState
Declared by
Staging
Package
Computer Graphics

Cone

Function

A cone standing along Z, point up, centred on its origin.

Signature
Cone -> Shape Element
    diameter: Number
    height: Number
    name: Text
ShapeElement Cone(
    double diameter = 1,
    double height = 1,
    string name = "")

Parameters

nametypedefaultdescription
diameterNumber1
heightNumber1
nameText—

Returns

resultShape Element
Ships with
Divooka ExploreDivooka Compute
Graph kinds
Flows Function Events Routine Constructs StateMachineState
Declared by
Staging
Package
Computer Graphics

Cylinder

Function

A cylinder standing along Z, centred on its origin.

Signature
Cylinder -> Shape Element
    diameter: Number
    height: Number
    name: Text
ShapeElement Cylinder(
    double diameter = 1,
    double height = 1,
    string name = "")

Parameters

nametypedefaultdescription
diameterNumber1
heightNumber1
nameText—

Returns

resultShape Element
Ships with
Divooka ExploreDivooka Compute
Graph kinds
Flows Function Events Routine Constructs StateMachineState
Declared by
Staging
Package
Computer Graphics

Export Usd

Function

Saves a scene as USD: .usda or .usdc referencing its assets where they are, or .usdz with everything packed in.

Signature
ExportUsd(scene: Scene Description, path: Text) -> Text
string ExportUsd(SceneDescription scene, string path)

Parameters

nametypedefaultdescription
sceneScene Description—
pathText—

Returns

resultText
Ships with
Divooka ExploreDivooka Compute
Graph kinds
Flows Function Events Routine Constructs StateMachineState
Declared by
Staging
Package
Computer Graphics

Group

Function

Elements gathered into one, which moves, turns and is painted as one.

Signature
Group -> Group Element
    elements: Scene Element Array
    name: Text
GroupElement Group(SceneElement[] elements, string name = "")

Parameters

nametypedefaultdescription
elementsScene Element Array—
nameText—

Returns

resultGroup Element
Ships with
Divooka ExploreDivooka Compute
Graph kinds
Flows Function Events Routine Constructs StateMachineState
Declared by
Staging
Package
Computer Graphics

Hdri

Function

An HDRI around the scene, lighting it and seen behind it: a file, a URL or polyhaven:<id>.

Signature
Hdri -> Environment Description
    source: Text
    intensity: Number
    rotation: Number
    visible: Truth
EnvironmentDescription Hdri(
    string source,
    double intensity = 1,
    double rotation = 0,
    bool visible = true)

Parameters

nametypedefaultdescription
sourceText—The image, latitude-longitude.
intensityNumber1How bright.
rotationNumber0How far it is turned about Z, in degrees, to bring the sun round.
visibleTruthTrueWhether the camera sees it, or it only lights the scene.

Returns

resultEnvironment Description
Ships with
Divooka ExploreDivooka Compute
Graph kinds
Flows Function Events Routine Constructs StateMachineState
Declared by
Staging
Package
Computer Graphics

Key

Function

One moment of a motion: where the element is then, how it is turned and how big, relative to where it was placed.

Signature
Key -> Motion Key
    seconds: Number
    x: Number
    y: Number
    z: Number
    turnX: Number
    turnY: Number
    turnZ: Number
    size: Number
MotionKey Key(
    double seconds = 0,
    double x = 0,
    double y = 0,
    double z = 0,
    double turnX = 0,
    double turnY = 0,
    double turnZ = 0,
    double size = 1)

Parameters

nametypedefaultdescription
secondsNumber0When, in seconds from the start.
xNumber0How far it has moved along X, in metres.
yNumber0Along Y.
zNumber0Along Z.
turnXNumber0How far it is turned about X, in degrees.
turnYNumber0About Y.
turnZNumber0About Z, its heading: from 0 to 360 is a whole turn.
sizeNumber1How big it is: 1 as made.

Returns

resultMotion Key
Ships with
Divooka ExploreDivooka Compute
Graph kinds
Flows Function Events Routine Constructs StateMachineState
Declared by
Staging
Package
Computer Graphics

Look Through

Function

The scene seen through another camera, by name.

Signature
LookThrough -> Scene Description
    scene: Scene Description
    camera: Text
SceneDescription LookThrough(
    SceneDescription scene,
    string camera)

Parameters

nametypedefaultdescription
sceneScene Description—
cameraText—

Returns

resultScene Description
Ships with
Divooka ExploreDivooka Compute
Graph kinds
Flows Function Events Routine Constructs StateMachineState
Declared by
Staging
Package
Computer Graphics

Material

Function

A material of one colour.

Signature
Material -> Material Description
    color: Color
    roughness: Number
    metallic: Number
    opacity: Number
    glow: Number
    name: Text
MaterialDescription Material(
    ColorElement color,
    double roughness = 0.5,
    double metallic = 0,
    double opacity = 1,
    double glow = 0,
    string name = "")

Parameters

nametypedefaultdescription
colorColor—Its colour, as picked: sRGB.
roughnessNumber0.50 for a mirror, 1 for chalk.
metallicNumber00 for paint and plastic, 1 for metal.
opacityNumber11 for solid, 0 for invisible.
glowNumber0How brightly it gives off its own colour, 0 for not at all.
nameText—Its name.

Returns

resultMaterial Description
Ships with
Divooka ExploreDivooka Compute
Graph kinds
Flows Function Events Routine Constructs StateMachineState
Declared by
Staging
Package
Computer Graphics

Mesh

Function

A polygon mesh from its points and faces: each face is Face Sizes corners long, read in turn from Face Corners.

Signature
Mesh -> Mesh Element
    points: Number Array
    faceSizes: Integer Array
    faceCorners: Integer Array
    name: Text
MeshElement Mesh(
    double[] points,
    int[] faceSizes,
    int[] faceCorners,
    string name = "")

Parameters

nametypedefaultdescription
pointsNumber Array—The points, three numbers each: x, y, z.
faceSizesInteger Array—How many corners each face has.
faceCornersInteger Array—Each face's corners as point numbers, from zero, face after face.
nameText—Its name.

Returns

resultMesh Element
Ships with
Divooka ExploreDivooka Compute
Graph kinds
Flows Function Events Routine Constructs StateMachineState
Declared by
Staging
Package
Computer Graphics

Model

Function

A model from a file, a URL, a Poly Haven id or a library id: USD, glTF, GLB or OBJ.

Signature
Model -> Model Element
    source: Text
    name: Text
    unitScale: Number
ModelElement Model(
    string source,
    string name = "",
    double unitScale = 1)

Parameters

nametypedefaultdescription
sourceText—Where it is: chair.glb, https://…/chair.usdz, polyhaven:Barrel_01.
nameText—Its name in the scene; empty to name it after its file.
unitScaleNumber1A scale to bring it to metres: 0.01 for a model in centimetres.

Returns

resultModel Element
Ships with
Divooka ExploreDivooka Compute
Graph kinds
Flows Function Events Routine Constructs StateMachineState
Declared by
Staging
Package
Computer Graphics

Motion Blur

Function

The scene with motion blur: the camera's shutter stays open for part of each frame, and what moves while it is open is smeared along its path, as in a film. Costs render time only where something moves.

Signature
MotionBlur -> Scene Description
    scene: Scene Description
    shutter: Number
SceneDescription MotionBlur(
    SceneDescription scene,
    double shutter = 0.5)

Parameters

nametypedefaultdescription
sceneScene Description—The scene.
shutterNumber0.5How long the shutter is open, as a fraction of a frame: 0.5, a film camera's usual, blurs half a frame's movement; 0 turns motion blur off.

Returns

resultScene Description
Ships with
Divooka ExploreDivooka Compute
Graph kinds
Flows Function Events Routine Constructs StateMachineState
Declared by
Staging
Package
Computer Graphics

Move

Function

The element moved by the given distances, in its group's frame.

Signature
Move -> Scene Element
    element: Scene Element
    x: Number
    y: Number
    z: Number
SceneElement Move(
    SceneElement element,
    double x = 0,
    double y = 0,
    double z = 0)

Parameters

nametypedefaultdescription
elementScene Element—
xNumber0
yNumber0
zNumber0

Returns

resultScene Element
Ships with
Divooka ExploreDivooka Compute
Graph kinds
Flows Function Events Routine Constructs StateMachineState
Declared by
Staging
Package
Computer Graphics

No Environment

Function

Nothing around the scene: black, and only its own lights light it.

Signature
NoEnvironment() -> Environment Description
EnvironmentDescription NoEnvironment()

Returns

resultEnvironment Description
Ships with
Divooka ExploreDivooka Compute
Graph kinds
Flows Function Events Routine Constructs StateMachineState
Declared by
Staging
Package
Computer Graphics

Orbit

Function

The element carried round a point in a circle about the vertical, keeping its own heading towards the centre: a camera circling what it looks at, a moon round a planet.

Signature
Orbit -> Scene Element
    element: Scene Element
    centerX: Number
    centerY: Number
    centerZ: Number
    secondsPerTurn: Number
    clockwise: Truth
SceneElement Orbit(
    SceneElement element,
    double centerX = 0,
    double centerY = 0,
    double centerZ = 0,
    double secondsPerTurn = 8,
    bool clockwise = false)

Parameters

nametypedefaultdescription
elementScene Element—What goes round; a camera that looks at the centre keeps looking at it all the way round.
centerXNumber0The centre's X.
centerYNumber0The centre's Y.
centerZNumber0The centre's Z.
secondsPerTurnNumber8Seconds a whole circle takes.
clockwiseTruthFalseWhether it goes clockwise seen from above.

Returns

resultScene Element

Remarks

The element is put in a group whose origin is the centre and the group is spun, so it keeps its own name and a camera is still looked through by it.

Ships with
Divooka ExploreDivooka Compute
Graph kinds
Flows Function Events Routine Constructs StateMachineState
Declared by
Staging
Package
Computer Graphics

Paint

Function

The element with a material over whatever it and everything in it had.

Signature
Paint -> Scene Element
    element: Scene Element
    material: Material Description
SceneElement Paint(
    SceneElement element,
    MaterialDescription material)

Parameters

nametypedefaultdescription
elementScene Element—
materialMaterial Description—

Returns

resultScene Element
Ships with
Divooka ExploreDivooka Compute
Graph kinds
Flows Function Events Routine Constructs StateMachineState
Declared by
Staging
Package
Computer Graphics

Place

Function

The element put at a place, facing a heading (degrees about Z) at a size, whatever its transform was.

Signature
Place -> Scene Element
    element: Scene Element
    x: Number
    y: Number
    z: Number
    heading: Number
    size: Number
SceneElement Place(
    SceneElement element,
    double x = 0,
    double y = 0,
    double z = 0,
    double heading = 0,
    double size = 1)

Parameters

nametypedefaultdescription
elementScene Element—
xNumber0
yNumber0
zNumber0
headingNumber0
sizeNumber1

Returns

resultScene Element
Ships with
Divooka ExploreDivooka Compute
Graph kinds
Flows Function Events Routine Constructs StateMachineState
Declared by
Staging
Package
Computer Graphics

Plane

Function

A flat rectangle facing up, in the plane of its origin: a floor, a table top, a backdrop.

Signature
Plane(width: Number, depth: Number, name: Text) -> Shape Element
ShapeElement Plane(
    double width = 10,
    double depth = 10,
    string name = "")

Parameters

nametypedefaultdescription
widthNumber10
depthNumber10
nameText—

Returns

resultShape Element
Ships with
Divooka ExploreDivooka Compute
Graph kinds
Flows Function Events Routine Constructs StateMachineState
Declared by
Staging
Package
Computer Graphics

Point Light

Function

A small light at a point, shining every way.

Signature
PointLight -> Light Element
    x: Number
    y: Number
    z: Number
    intensity: Number
    color: Optional Color
    radius: Number
LightElement PointLight(
    double x,
    double y,
    double z,
    double intensity = 20,
    ColorElement? color,
    double radius = 0.1)

Parameters

nametypedefaultdescription
xNumber—
yNumber—
zNumber—
intensityNumber20
colorOptional Color—
radiusNumber0.1

Returns

resultLight Element
Ships with
Divooka ExploreDivooka Compute
Graph kinds
Flows Function Events Routine Constructs StateMachineState
Declared by
Staging
Package
Computer Graphics

Poly Haven Material

Function

A Poly Haven texture set as a material, by its id: brick_wall_001, wood_floor_deck.

Signature
PolyHavenMaterial -> Material Description
    ID: Text
    resolution: Text
    tiling: Number
MaterialDescription PolyHavenMaterial(
    string id,
    string resolution = "1k",
    double tiling = 1)

Parameters

nametypedefaultdescription
IDText—The texture set's id on polyhaven.com.
resolutionText1k1k, 2k, 4k or 8k.
tilingNumber1How many times it repeats across the surface.

Returns

resultMaterial Description
Ships with
Divooka ExploreDivooka Compute
Graph kinds
Flows Function Events Routine Constructs StateMachineState
Declared by
Staging
Package
Computer Graphics

Rename

Function

The element under another name.

Signature
Rename(element: Scene Element, name: Text) -> Scene Element
SceneElement Rename(SceneElement element, string name)

Parameters

nametypedefaultdescription
elementScene Element—
nameText—

Returns

resultScene Element
Ships with
Divooka ExploreDivooka Compute
Graph kinds
Flows Function Events Routine Constructs StateMachineState
Declared by
Staging
Package
Computer Graphics

Render

Function

Renders a scene with Cycles.

Signature
Render -> Pixel Image
    scene: Scene Description
    width: Integer
    height: Integer
    samples: Integer
    exposure: Number
    timeLimit: Number
    transparent: Truth
PixelImage Render(
    SceneDescription scene,
    int width = 1280,
    int height = 720,
    int samples = 64,
    double exposure = 0,
    double timeLimit = 0,
    bool transparent = false)

Parameters

nametypedefaultdescription
sceneScene Description—The scene.
widthInteger1280Width in pixels.
heightInteger720Height in pixels.
samplesInteger64Samples per pixel: 16 for a look, 128 for a still, 512 for a clean one.
exposureNumber0Brightness in stops.
timeLimitNumber0Seconds the render may take, or 0 for as long as the samples need.
transparentTruthFalseWhether the background is left transparent.

Returns

resultPixel Image
Ships with
Divooka ExploreDivooka Compute
Graph kinds
Flows Function Events Routine Constructs StateMachineState
Declared by
Staging
Package
Computer Graphics

Render Animation

Function

Renders a scene's run and saves it as a looping animated GIF, to play in a browser, a chat or a slide.

Signature
RenderAnimation -> Text
    scene: Scene Description
    path: Text
    width: Integer
    height: Integer
    samples: Integer
    exposure: Number
string RenderAnimation(
    SceneDescription scene,
    string path,
    int width = 480,
    int height = 270,
    int samples = 16,
    double exposure = 0)

Parameters

nametypedefaultdescription
sceneScene Description—The scene.
pathText—Where to save it; .gif is added when it has no extension.
widthInteger480Width in pixels.
heightInteger270Height in pixels.
samplesInteger16Samples per pixel.
exposureNumber0Brightness in stops.

Returns

resultText
Ships with
Divooka ExploreDivooka Compute
Graph kinds
Flows Function Events Routine Constructs StateMachineState
Declared by
Staging
Package
Computer Graphics

Render Frame

Function

Renders a scene at a moment of its run.

Signature
RenderFrame -> Pixel Image
    scene: Scene Description
    seconds: Number
    width: Integer
    height: Integer
    samples: Integer
    exposure: Number
PixelImage RenderFrame(
    SceneDescription scene,
    double seconds = 0,
    int width = 1280,
    int height = 720,
    int samples = 64,
    double exposure = 0)

Parameters

nametypedefaultdescription
sceneScene Description—The scene.
secondsNumber0The moment, in seconds from the start.
widthInteger1280Width in pixels.
heightInteger720Height in pixels.
samplesInteger64Samples per pixel.
exposureNumber0Brightness in stops.

Returns

resultPixel Image
Ships with
Divooka ExploreDivooka Compute
Graph kinds
Flows Function Events Routine Constructs StateMachineState
Declared by
Staging
Package
Computer Graphics

Render Frames

Function

Renders every frame of a scene's run, from the first to the one before it would begin again.

Signature
RenderFrames -> Pixel Image Array
    scene: Scene Description
    width: Integer
    height: Integer
    samples: Integer
    exposure: Number
PixelImage[] RenderFrames(
    SceneDescription scene,
    int width = 640,
    int height = 360,
    int samples = 16,
    double exposure = 0)

Parameters

nametypedefaultdescription
sceneScene Description—The scene.
widthInteger640Width in pixels.
heightInteger360Height in pixels.
samplesInteger16Samples per pixel: few, since a moving picture hides grain that a still shows.
exposureNumber0Brightness in stops.

Returns

resultPixel Image Array
Ships with
Divooka ExploreDivooka Compute
Graph kinds
Flows Function Events Routine Constructs StateMachineState
Declared by
Staging
Package
Computer Graphics

Render Usd

Function

Renders a USD file as it is, through its own camera or framed whole.

Signature
RenderUsd -> Pixel Image
    source: Text
    camera: Text
    width: Integer
    height: Integer
    samples: Integer
PixelImage RenderUsd(
    string source,
    string camera = "",
    int width = 1280,
    int height = 720,
    int samples = 64)

Parameters

nametypedefaultdescription
sourceText—The file, a URL or an id: anything Staging.Model takes.
cameraText—A camera prim path, or empty to frame the whole stage.
widthInteger1280Width in pixels.
heightInteger720Height in pixels.
samplesInteger64Samples per pixel.

Returns

resultPixel Image
Ships with
Divooka ExploreDivooka Compute
Graph kinds
Flows Function Events Routine Constructs StateMachineState
Declared by
Staging
Package
Computer Graphics

Render Video

Function

Renders a scene's run and saves it as an MP4 video, H.264 in managed code, to play in any player or upload anywhere: smaller and smoother than a GIF, which has only 256 colours a frame.

Signature
RenderVideo -> Text
    scene: Scene Description
    path: Text
    width: Integer
    height: Integer
    samples: Integer
    exposure: Number
    quality: Number
string RenderVideo(
    SceneDescription scene,
    string path,
    int width = 640,
    int height = 360,
    int samples = 16,
    double exposure = 0,
    double quality = 0.7)

Parameters

nametypedefaultdescription
sceneScene Description—The scene.
pathText—Where to save it; .mp4 is added when it has no extension.
widthInteger640Width in pixels; rounded up to an even number, as the video's colour format needs.
heightInteger360Height in pixels; rounded up to an even number.
samplesInteger16Samples per pixel.
exposureNumber0Brightness in stops.
qualityNumber0.7From 0 to 1: higher is sharper and a bigger file.

Returns

resultText
Ships with
Divooka ExploreDivooka Compute
Graph kinds
Flows Function Events Routine Constructs StateMachineState
Declared by
Staging
Package
Computer Graphics

Rotate

Function

The element turned about its own origin by degrees about X, then Y, then Z.

Signature
Rotate -> Scene Element
    element: Scene Element
    x: Number
    y: Number
    z: Number
SceneElement Rotate(
    SceneElement element,
    double x = 0,
    double y = 0,
    double z = 0)

Parameters

nametypedefaultdescription
elementScene Element—
xNumber0
yNumber0
zNumber0

Returns

resultScene Element
Ships with
Divooka ExploreDivooka Compute
Graph kinds
Flows Function Events Routine Constructs StateMachineState
Declared by
Staging
Package
Computer Graphics

Scale

Function

The element scaled about its own origin; a factor of 1 leaves an axis as it is.

Signature
Scale -> Scene Element
    element: Scene Element
    factor: Number
    x: Number
    y: Number
    z: Number
SceneElement Scale(
    SceneElement element,
    double factor = 1,
    double x = 1,
    double y = 1,
    double z = 1)

Parameters

nametypedefaultdescription
elementScene Element—
factorNumber1
xNumber1
yNumber1
zNumber1

Returns

resultScene Element
Ships with
Divooka ExploreDivooka Compute
Graph kinds
Flows Function Events Routine Constructs StateMachineState
Declared by
Staging
Package
Computer Graphics

Scatter On Grid

Function

An element repeated on a grid, each copy nudged, turned and sized at random within the limits given: a crowd, a forest, a car park.

Signature
ScatterOnGrid -> Scatter Element
    element: Scene Element
    columns: Integer
    rows: Integer
    spacing: Number
    jitter: Number
    randomTurn: Truth
    sizeVariation: Number
    seed: Integer
    name: Text
ScatterElement ScatterOnGrid(
    SceneElement element,
    int columns = 5,
    int rows = 5,
    double spacing = 2,
    double jitter = 0.3,
    bool randomTurn = true,
    double sizeVariation = 0.2,
    int seed = 1,
    string name = "")

Parameters

nametypedefaultdescription
elementScene Element—What is repeated.
columnsInteger5How many along X.
rowsInteger5How many along Y.
spacingNumber2Metres between neighbours.
jitterNumber0.3How far a copy may stray from its grid point, as a share of the spacing.
randomTurnTruthTrueWhether each copy is turned about Z at random.
sizeVariationNumber0.2How much a copy's size may differ, as a share: 0.2 is 80% to 120%.
seedInteger1The random seed: the same seed lays the same field.
nameText—Its name.

Returns

resultScatter Element
Ships with
Divooka ExploreDivooka Compute
Graph kinds
Flows Function Events Routine Constructs StateMachineState
Declared by
Staging
Package
Computer Graphics

Scene

Function

A scene of the given elements, in an environment, seen through a named camera.

Signature
Scene -> Scene Description
    elements: Scene Element Array
    environment: Environment Description
    camera: Text
    name: Text
SceneDescription Scene(
    SceneElement[] elements,
    EnvironmentDescription environment,
    string camera = "",
    string name = "Scene")

Parameters

nametypedefaultdescription
elementsScene Element Array—What is in it, lights and cameras included.
environmentEnvironment Description—What surrounds it; a soft grey studio when not given.
cameraText—The camera to render through, by name; the first one when empty.
nameTextSceneIts name.

Returns

resultScene Description
Ships with
Divooka ExploreDivooka Compute
Graph kinds
Flows Function Events Routine Constructs StateMachineState
Declared by
Staging
Package
Computer Graphics

Setting Key

Function

A setting's value at a moment, for Animate Setting.

Signature
SettingKey(seconds: Number, value: Number) -> Setting Key
SettingKey SettingKey(double seconds = 0, double value = 1)

Parameters

nametypedefaultdescription
secondsNumber0When, in seconds from the start.
valueNumber1The value then: a light's intensity or exposure in stops, a camera's focal length in millimetres, its focus distance in metres, or its f-number.

Returns

resultSetting Key
Ships with
Divooka ExploreDivooka Compute
Graph kinds
Flows Function Events Routine Constructs StateMachineState
Declared by
Staging
Package
Computer Graphics

Show

Function

The element shown or hidden.

Signature
Show(element: Scene Element, visible: Truth) -> Scene Element
SceneElement Show(SceneElement element, bool visible = true)

Parameters

nametypedefaultdescription
elementScene Element—
visibleTruthTrue

Returns

resultScene Element
Ships with
Divooka ExploreDivooka Compute
Graph kinds
Flows Function Events Routine Constructs StateMachineState
Declared by
Staging
Package
Computer Graphics

Sky Color

Function

A plain colour around the scene, lighting it evenly.

Signature
SkyColor -> Environment Description
    color: Color
    intensity: Number
    visible: Truth
EnvironmentDescription SkyColor(
    ColorElement color,
    double intensity = 0.3,
    bool visible = true)

Parameters

nametypedefaultdescription
colorColor—
intensityNumber0.3
visibleTruthTrue

Returns

resultEnvironment Description
Ships with
Divooka ExploreDivooka Compute
Graph kinds
Flows Function Events Routine Constructs StateMachineState
Declared by
Staging
Package
Computer Graphics

Sphere

Function

A sphere, centred on its origin.

Signature
Sphere(diameter: Number, name: Text) -> Shape Element
ShapeElement Sphere(double diameter = 1, string name = "")

Parameters

nametypedefaultdescription
diameterNumber1
nameText—

Returns

resultShape Element
Ships with
Divooka ExploreDivooka Compute
Graph kinds
Flows Function Events Routine Constructs StateMachineState
Declared by
Staging
Package
Computer Graphics

Spin

Function

The element turning steadily about its own vertical axis, where it stands: a turntable, a windmill's head, a lighthouse lamp.

Signature
Spin -> Scene Element
    element: Scene Element
    secondsPerTurn: Number
    clockwise: Truth
    startAngle: Number
SceneElement Spin(
    SceneElement element,
    double secondsPerTurn = 4,
    bool clockwise = false,
    double startAngle = 0)

Parameters

nametypedefaultdescription
elementScene Element—What turns.
secondsPerTurnNumber4Seconds a whole turn takes.
clockwiseTruthFalseWhether it turns clockwise seen from above, rather than anticlockwise.
startAngleNumber0Where the turn starts, in degrees.

Returns

resultScene Element
Ships with
Divooka ExploreDivooka Compute
Graph kinds
Flows Function Events Routine Constructs StateMachineState
Declared by
Staging
Package
Computer Graphics

Spin About

Function

The element turning steadily about an axis of your choosing through its own origin: a wheel about X, a door about its hinge.

Signature
SpinAbout -> Scene Element
    element: Scene Element
    axisX: Number
    axisY: Number
    axisZ: Number
    secondsPerTurn: Number
SceneElement SpinAbout(
    SceneElement element,
    double axisX = 1,
    double axisY = 0,
    double axisZ = 0,
    double secondsPerTurn = 4)

Parameters

nametypedefaultdescription
elementScene Element—What turns.
axisXNumber1The axis's X, in the element's own frame.
axisYNumber0The axis's Y.
axisZNumber0The axis's Z.
secondsPerTurnNumber4Seconds a whole turn takes; negative to turn the other way.

Returns

resultScene Element
Ships with
Divooka ExploreDivooka Compute
Graph kinds
Flows Function Events Routine Constructs StateMachineState
Declared by
Staging
Package
Computer Graphics

Spot Light

Function

A spot light at a point, aimed at another.

Signature
SpotLight -> Light Element
    x: Number
    y: Number
    z: Number
    targetX: Number
    targetY: Number
    targetZ: Number
    coneAngle: Number
    intensity: Number
    color: Optional Color
LightElement SpotLight(
    double x,
    double y,
    double z,
    double targetX = 0,
    double targetY = 0,
    double targetZ = 0,
    double coneAngle = 30,
    double intensity = 100,
    ColorElement? color)

Parameters

nametypedefaultdescription
xNumber—
yNumber—
zNumber—
targetXNumber0
targetYNumber0
targetZNumber0
coneAngleNumber30
intensityNumber100
colorOptional Color—

Returns

resultLight Element
Ships with
Divooka ExploreDivooka Compute
Graph kinds
Flows Function Events Routine Constructs StateMachineState
Declared by
Staging
Package
Computer Graphics

Stop Motion

Function

The element standing still: every motion it had taken away.

Signature
StopMotion(element: Scene Element) -> Scene Element
SceneElement StopMotion(SceneElement element)

Parameters

nametypedefaultdescription
elementScene Element—

Returns

resultScene Element
Ships with
Divooka ExploreDivooka Compute
Graph kinds
Flows Function Events Routine Constructs StateMachineState
Declared by
Staging
Package
Computer Graphics

Sun

Function

The sun: light from far away, from a direction given as elevation above the horizon and azimuth from +X towards +Y.

Signature
Sun -> Light Element
    elevation: Number
    azimuth: Number
    intensity: Number
    color: Optional Color
    softness: Number
LightElement Sun(
    double elevation = 45,
    double azimuth = 135,
    double intensity = 1,
    ColorElement? color,
    double softness = 0.53)

Parameters

nametypedefaultdescription
elevationNumber45Degrees above the horizon.
azimuthNumber135Degrees around from +X towards +Y.
intensityNumber1How bright: 1 reads as a clear day beside an HDRI of intensity 1. Cycles takes a distant light's UsdLux intensity four times over as irradiance, as its upstream Hydra delegate does, so 1 is Blender's sun strength 4.
colorOptional Color—Its colour, sRGB; white when not given.
softnessNumber0.53Its apparent size in degrees, which softens its shadows: the real sun is 0.53.

Returns

resultLight Element
Ships with
Divooka ExploreDivooka Compute
Graph kinds
Flows Function Events Routine Constructs StateMachineState
Declared by
Staging
Package
Computer Graphics

Textured Material

Function

A material read from image files: a colour map, and optionally roughness, normal and metallic maps.

Signature
TexturedMaterial -> Material Description
    colorMap: Text
    roughnessMap: Text
    normalMap: Text
    metallicMap: Text
    tiling: Number
    name: Text
MaterialDescription TexturedMaterial(
    string colorMap,
    string roughnessMap = "",
    string normalMap = "",
    string metallicMap = "",
    double tiling = 1,
    string name = "")

Parameters

nametypedefaultdescription
colorMapText—The base colour image.
roughnessMapText—A roughness image, or empty.
normalMapText—A tangent-space normal map in the OpenGL convention, or empty.
metallicMapText—A metallic image, or empty.
tilingNumber1How many times the images repeat across the surface.
nameText—Its name.

Returns

resultMaterial Description
Ships with
Divooka ExploreDivooka Compute
Graph kinds
Flows Function Events Routine Constructs StateMachineState
Declared by
Staging
Package
Computer Graphics

Timeline

Function

The scene's run: how many seconds it lasts and how many frames a second it is drawn and saved at.

Signature
Timeline -> Scene Description
    scene: Scene Description
    seconds: Number
    framesPerSecond: Number
SceneDescription Timeline(
    SceneDescription scene,
    double seconds = 0,
    double framesPerSecond = 24)

Parameters

nametypedefaultdescription
sceneScene Description—The scene.
secondsNumber0How long it runs; 0 to play its longest motion through once.
framesPerSecondNumber24Frames a second.

Returns

resultScene Description
Ships with
Divooka ExploreDivooka Compute
Graph kinds
Flows Function Events Routine Constructs StateMachineState
Declared by
Staging
Package
Computer Graphics

Torus

Function

A ring lying flat around Z.

Signature
Torus -> Shape Element
    diameter: Number
    thickness: Number
    name: Text
ShapeElement Torus(
    double diameter = 1,
    double thickness = 0.25,
    string name = "")

Parameters

nametypedefaultdescription
diameterNumber1
thicknessNumber0.25
nameText—

Returns

resultShape Element
Ships with
Divooka ExploreDivooka Compute
Graph kinds
Flows Function Events Routine Constructs StateMachineState
Declared by
Staging
Package
Computer Graphics

To Usda

Function

The scene as .usda text, to read or to diff.

Signature
ToUsda(scene: Scene Description) -> Text
string ToUsda(SceneDescription scene)

Parameters

nametypedefaultdescription
sceneScene Description—

Returns

resultText
Ships with
Divooka ExploreDivooka Compute
Graph kinds
Flows Function Events Routine Constructs StateMachineState
Declared by
Staging
Package
Computer Graphics