Scene Rendering
6 nodes
On this page 6
Assign Object Material
FunctionOverload 1 of 2
AssignObjectMaterial -> Preview Geometry
geometry: N-gon Geometry
color: Color
gloss: Number
glow: NumberPreviewNGonGeometryInstance AssignObjectMaterial(
NGonFaceIndexMesh geometry,
ColorElement color,
double gloss = 0.3,
double glow = 0)Makes a mesh an object in a colour that may shine: Gloss catches the lights as highlights, Glow makes it shine of itself.
Parameters
| name | type | default | description |
|---|---|---|---|
| geometry | N-gon Geometry | — | The mesh. |
| color | Color | — | Its colour. |
| gloss | Number | 0.3 | From 0, matte like chalk, to 1, polished like a billiard ball. |
| glow | Number | 0 | From 0, lit only by the lights, to 1, as bright as its colour in the dark. |
Returns
| Object | Preview Geometry |
Overload 2 of 2
AssignObjectMaterial -> Preview Geometry
object: Preview Geometry
color: Color
gloss: Number
glow: NumberPreviewNGonGeometryInstance AssignObjectMaterial(
PreviewNGonGeometryInstance object,
ColorElement color,
double gloss = 0.3,
double glow = 0)Gives an object a colour that may shine: Gloss catches the lights as highlights, Glow makes it shine of itself.
Parameters
| name | type | default | description |
|---|---|---|---|
| object | Preview Geometry | — | The object. |
| color | Color | — | Its colour. |
| gloss | Number | 0.3 | From 0, matte like chalk, to 1, polished like a billiard ball. |
| glow | Number | 0 | From 0, lit only by the lights, to 1, as bright as its colour in the dark. |
Returns
| Object | Preview Geometry |
- Ships with
- Divooka ExploreDivooka Compute
- Graph kinds
- Flows Function Events Routine Constructs StateMachineState
- Declared by
- Scene Rendering
- Package
- Procedural Generation
Camera
FunctionA camera at a point, looking at another.
Camera -> Preview Camera
position: Vector3d
target: Vector3d
fieldOfView: NumberPreviewCamera Camera(
Vector3d position,
Vector3d target,
double fieldOfView = 40)Parameters
| name | type | default | description |
|---|---|---|---|
| position | Vector3d | — | Where the camera stands. |
| target | Vector3d | — | What it looks at, at the middle of the picture. |
| fieldOfView | Number | 40 | How much of the scene the picture's height takes in, in degrees: about 40 is a normal lens. |
Returns
| Camera | Preview Camera |
- Ships with
- Divooka ExploreDivooka Compute
- Graph kinds
- Flows Function Events Routine Constructs StateMachineState
- Declared by
- Scene Rendering
- Package
- Procedural Generation
Lamp
FunctionLight from a point in the scene, weaker the farther it travels: a lamp.
Lamp -> Preview Light
position: Vector3d
color: Color
intensity: Number
range: NumberPreviewLight Lamp(
Vector3d position,
ColorElement color,
double intensity = 1,
double range = 10)Parameters
| name | type | default | description |
|---|---|---|---|
| position | Vector3d | — | Where the lamp is. |
| color | Color | — | Its colour. |
| intensity | Number | 1 | How bright it is close by: 1 lights a surface facing it fully. |
| range | Number | 10 | The distance at which its light has fallen to half. |
Returns
| Light | Preview Light |
- Ships with
- Divooka ExploreDivooka Compute
- Graph kinds
- Flows Function Events Routine Constructs StateMachineState
- Declared by
- Scene Rendering
- Package
- Procedural Generation
Pose
FunctionA model posed at a moment of one of its animations: a skinned model's skin follows its skeleton as the animation has it then, a stick figure mid-stride.
Pose -> Preview Scene
model: Native Model
time: Number
animation: TextSimplePreviewScene Pose(
NativeModel model,
double time = 0,
string animation)Parameters
| name | type | default | description |
|---|---|---|---|
| model | Native Model | — | The model, as Import Animated Model or Get Library Animated Model reads one. |
| time | Number | 0 | The moment, in seconds; an animation that loops wraps it round, so a time that only grows plays the animation over and over, and one that falls plays it backwards. |
| animation | Text | — | Which of its animations, by name; none for its first. |
Returns
| Scene | Preview Scene |
Remarks
Round 26. A model is drawn as the file has it - a glTF's Y up and +Z its front - turned into the preview scene's Z up with its front along +X, so a figure walks along its heading when Place turns it.
- Ships with
- Divooka ExploreDivooka Compute
- Graph kinds
- Flows Function Events Routine Constructs StateMachineState
- Declared by
- Scene Rendering
- Package
- Procedural Generation
Render Scene
FunctionA picture of the scene, taken by the camera under the lights.
RenderScene -> Pixel Image
scene: Preview Scene
camera: Preview Camera
lights: Preview Light Array
width: Integer
height: Integer
sky: Optional Color
horizon: Optional Color
smoothEdges: TruthPixelImage RenderScene(
SimplePreviewScene scene,
PreviewCamera camera,
PreviewLight[] lights,
int width = 960,
int height = 540,
ColorElement? sky,
ColorElement? horizon,
bool smoothEdges = true)Parameters
| name | type | default | description |
|---|---|---|---|
| scene | Preview Scene | — | What to render: the objects, in their colours and places. |
| camera | Preview Camera | — | Where the picture is taken from. |
| lights | Preview Light Array | — | The lights; with none, the sky alone lights the scene. |
| width | Integer | 960 | The picture's width, in pixels. |
| height | Integer | 540 | The picture's height, in pixels. |
| sky | Optional Color | — | The sky overhead, which also lights what faces up. |
| horizon | Optional Color | — | The sky at eye level, which distant things fade into. |
| smoothEdges | Truth | True | Whether edges are smoothed, at four times the work. |
Returns
| Picture | Pixel Image |
- Ships with
- Divooka ExploreDivooka Compute
- Graph kinds
- Flows Function Events Routine Constructs StateMachineState
- Declared by
- Scene Rendering
- Package
- Procedural Generation
Sun
FunctionLight from very far away, the same direction everywhere: the sun.
Sun -> Preview Light
direction: Vector3d
color: Color
intensity: Number
castsShadows: TruthPreviewLight Sun(
Vector3d direction,
ColorElement color,
double intensity = 1,
bool castsShadows = true)Parameters
| name | type | default | description |
|---|---|---|---|
| direction | Vector3d | — | Where the sun is, as a direction from the scene: (0, 0, 1) is straight overhead, (1, 1, 1) high to one side. |
| color | Color | — | Its colour. |
| intensity | Number | 1 | How bright it is: 1 lights a surface facing it fully. |
| castsShadows | Truth | True | Whether what it lights throws shadows. |
Returns
| Light | Preview Light |
- Ships with
- Divooka ExploreDivooka Compute
- Graph kinds
- Flows Function Events Routine Constructs StateMachineState
- Declared by
- Scene Rendering
- Package
- Procedural Generation