Skip to main content

Procedural models (models.yaml)

models.yaml defines simple 3D models built from boxes, with material slots and box colliders. Studio uses them to preview actors (preview.model), in the Model viewer and in the Model Animation editor. The game engine doesn't load them automatically; your BT code can read the file to build its own meshes, as the starter FPS sample does.

Register the file in the asset registry under files with the name models.

Example​

models:
- name: gun
material_slots:
- name: body
material: fps.blue
- name: barrel
material: fps.metal
primitives:
- name: body
shape: box
material_slot: body
position: [0.0, 0.0, 0.0]
scale: [0.28, 0.30, 0.72]
- name: barrel
shape: box
material_slot: barrel
parent: body
position: [0.0, 0.01, -0.6]
scale: [0.14, 0.14, 0.58]
colliders:
- name: hitbox
shape: box
position: [0.0, -0.2, -0.26]
size: [0.27, 0.77, 1.38]

Fields​

FieldTypeDefaultDescription
formatmapnoneOptional file format version; see File format versions.
modelslistemptyYour models.

models[]​

FieldTypeDefaultDescription
namestringModel NName used by actors (preview.model), rigs and motion clips. Must be unique.
material_slotslistemptyNamed materials the parts use.
primitiveslistemptyThe visible parts.
colliderslistemptyCollision boxes.

material_slots[]​

FieldTypeDefaultDescription
namestringSlot NSlot name, unique within the model.
materialstring—Required. Material asset name.

primitives[]​

FieldTypeDefaultDescription
namestringPart NPart name, unique within the model. Motion clips animate parts by this name.
shapestringboxOnly box is supported; other shapes are skipped with a warning.
parentstringnoneAnother part. This part then moves with it, and its transform is relative to the parent.
material_slotstringnoneSlot from material_slots.
paletteinteger0Preview color (0–5) Studio uses when the part has no material.
position[x, y, z][0, 0, 0]Position.
rotation[x, y, z][0, 0, 0]Rotation in radians.
scale[x, y, z][1, 1, 1]Box size.

colliders[]​

FieldTypeDefaultDescription
namestringCollider NName, unique within the model.
shapestringboxbox.
parentstringnoneA part the collider follows.
position[x, y, z][0, 0, 0]Center.
rotation[x, y, z][0, 0, 0]Rotation in radians.
size[x, y, z][1, 1, 1]Box size.

Write vectors as one-line lists ([x, y, z]) so Studio can edit them. Studio's edits keep your comments, ordering and extra keys.

Errors​

Studio shows these in the model view or in Problems:

MessageCause
models.yaml: `version: 1` is no longer usedDelete the version line (an older file).
models.yaml uses format version X; this cTurtle reads format …The file was written for a newer cTurtle; see File format versions.
Duplicate part name: XTwo parts share a name, or a part has no name.
Missing parent part: X, Missing collider parent: Xparent names a part that doesn't exist.
Parent cycle or more than 128 levelsParts are parented in a loop or too deep.
Duplicate model, slot or collider namesMake names unique.
Missing materialA slot names a material that isn't registered.
Missing material slotA part names a slot that doesn't exist.

See also​