Skip to main content

Scene Graph

note

Work in progress — expand as the scene loader evolves.

Overview

The scene graph is built by loading a JSON scene file (scenes://name.json). Each node in the file maps to a SceneObject in the C++ graph.

Node hierarchy

Children accumulate their parent's world transform top-down. A group node is a pure transform container — it has no geometry of its own.

Node types handled by the loader

JSON typeC++ handling
modelLoads a model descriptor, creates a mesh scene object
groupCreates a transform-only node, recurses into children
lightCreates a light scene object (directional / point / spot)
cameraSets the active camera
skydomeLoads a skydome model descriptor
probeCreates a reflection probe capture point
markerNamed logical point, no visual
triggerInvisible volume, fires Lua events

Model descriptor dispatch

When a model node is loaded, the descriptor type field decides the mesh source:

Descriptor typeMesh source
gltfglTF 2.0 file from disk
glitter_geometryProcedural primitive generated at load time
glitter_skydomeUV sphere for sky rendering

See the Model Descriptors page for the full descriptor format.