Scene serialization uses the YAML 1.2 spec
scene:
- camera: <Camera>
# alias 'cam', 'c'
- shapes:
# alias 'shape', 'objects', 'object', 'objs', 'obj', 's'
- <Shape>
- lights:
# alias 'light', 'l'
- <Light>
- materials:
# alias 'material', 'mats', 'mat', 'm'
<Material id>: <Material>
- environment_tex:
# alias 'environment', 'env_tex', 'env', 'e'
<Resource id> # allowed: jpg, png, hdr
resources:
# Mapping of all resources with an identifier id and its path,
# the id is used to refer to them
# the path can be relative to the scene file or
# relative to the application binary or absolute
<Resource id>: <path>
transform: <Transform>
fov: <float degrees>
near: <float x>0 >
far: <float x>0 >
!plane
name: "Display name"
transform: <Transform>
material: <Material id> # allowed samplers: color, texture
!sphere
name: "Display name"
transform: <Transform>
material: <Material id> # allowed samplers: color, texture
!cube
name: "Display name"
transform: <Transform>
material: <Material id> # allowed samplers: color, texture
!voxel
name: "Display name"
transform: <Transform>
material: <Material id> # allowed samplers: color, palette
voxel_grid: <Resource id> # allowed: .vox
!directional
color: <Color>
intensity: <float>
direction: <Vector>
!point
color: <Color>
intensity: <float>
position: <Vector>
name: "Display name"
color: <Sampler>
ambient: <float 0-1>
diffuse: <float 0-1>
specular: <float 0-1>
reflection: <float 0-1>
!color
color: <Color>
!texture
texture: <Resource id> # allowed: png, jpg, hdr
filter: <Enum> # values: nearest, linear
wrap: <Enum> # values: repeat, mirrored_repeat, clamp
!palette
palette: <Resource id> # allowed: .vox
position: <Vector>
rotation: <Quaternion>
scale: <Vector>
r: <float 0-1>
g: <float 0-1>
b: <float 0-1>
# Same as:
{r: <float 0-1>, g: <float 0-1>, b: <float 0-1>}
or
- <float 0-1> # r
- <float 0-1> # g
- <float 0-1> # b
# Same as:
[<float 0-1>, <float 0-1>, <float 0-1>]
or
<binary 3 bytes>
# example: 0x1C00FF
# example: 1835263
x: <float>
y: <float>
z: <float>
# Same as:
{ x: <float>, y: <float>, z: <float> }
or
- <float> # x
- <float> # y
- <float> # z
# Same as:
[<float>, <float>, <float>]
x: <float>
y: <float>
z: <float>
w: <float>
# Same as:
{ x: <float>, y: <float>, z: <float>, w: <float> }
or
- <float> # x
- <float> # y
- <float> # z
- <float> # w
# Same as:
[<float>, <float>, <float>, <float>]