Documentation
Docs/en/reference/model-format/composition.md
Model Composition
Generated reference. Do not edit directly. Update
BuildTools/ModelFormatInterface.json, then runpython BuildTools/docs_model_format.py --write.
| Index | Syntax | Tokens | Composition | Assets | Animation | Validation | Canonical JSON | Guide |
Runtime composition starts from the default Root data, then activates links whose Layer and Value match the current model-layer array.
Layer composition flow
- Copy the project-provided layer array.
- Apply exact
AnimLayerValueoverrides for the requested animation. - Apply default Root transforms, materials, effects, disables, and cuts.
- Activate matching layer Root entries and child/particle attachments.
- Remove children and particles whose links are no longer active.
- Regenerate combined meshes when composition, materials, effects, or cuts changed.
Composition directives
| Directive | Context | Authoring contract | Runtime effect | Source |
|---|---|---|---|---|
Root |
description or selected Layer/Value |
Selects the default root modifier when no Layer was selected, or creates a layer/value root modifier when Layer and non-zero Value are active. | The selected modifier can transform the model, change speed/materials/effects, disable meshes/layers, and apply cuts without creating a child. | Source/Tools/ModelInfoBaker.cpp |
Attach |
selected Layer/Value |
Creates a layer-selected child-model link. The path is relative to the file containing the directive. | With Link, the child is attached to one parent bone. Without Link, same-named child and parent bones are paired for a shared-skeleton attachment. A direct FBX/OBJ child has no description-level scale correction, so its static extent must stay within Baking.ModelAttachmentMinExtent and Baking.ModelAttachmentMaxExtent. | Source/Tools/ModelInfoBaker.cpp, Source/Client/ModelInstance.cpp |
AttachParticles |
selected Layer/Value |
Creates a layer-selected baked-particle link. The resource path is stored verbatim rather than relative to the description. | The client creates the particle on the Link bone and removes it when the activating layer value is no longer selected. | Source/Tools/ModelInfoBaker.cpp, Source/Client/ModelInstance.cpp |
Link |
current layer link |
Sets the parent bone for the current non-default link. It is ignored while the parser points at the default or dummy link. | A child model attaches as one object to this bone; particles require this bone. Empty child-model links do not consume it at runtime. | Source/Tools/ModelInfoBaker.cpp |
Cut |
current link |
Adds one or more baked cut volumes to selected composed-mesh layers. Hyphen separates layer and shape lists; - omits unskin fields and ~ reverses the unskin shape. | Combined geometry inside or outside the authored cut shapes is removed; optional paired bones drive unskin handling. | Source/Tools/ModelInfoBaker.cpp, Source/Client/ModelInstance.cpp |
RotX, RotY, RotZ, MoveX, MoveY, MoveZ, ScaleX, ScaleY, ScaleZ, Speed |
current link |
Sets one transform axis or playback-speed multiplier on the current link. Rotation values are authored in degrees. | Non-zero values multiply the model transform or speed chain. Zero means no contribution at runtime. | Source/Tools/ModelInfoBaker.cpp, Source/Client/ModelInstance.cpp |
Scale |
current link |
Sets ScaleX, ScaleY, and ScaleZ to the same authored value. | A non-zero value contributes a uniform scale transform. | Source/Tools/ModelInfoBaker.cpp |
RotX+, RotY+, RotZ+, MoveX+, MoveY+, MoveZ+, ScaleX+, ScaleY+, ScaleZ+, Speed+ |
current link |
Adds to one transform or speed field. When the current field is zero, the operand becomes the initial value. | Includes can layer additive adjustments without requiring a preceding base assignment. | Source/Tools/ModelInfoBaker.cpp |
Scale+ |
current link |
Applies the additive rule to all three scale axes. | Provides a uniform additive scale adjustment for templates and selected links. | Source/Tools/ModelInfoBaker.cpp |
RotX*, RotY*, RotZ*, MoveX*, MoveY*, MoveZ*, ScaleX*, ScaleY*, ScaleZ*, Speed* |
current link |
Multiplies one transform or speed field. When the current field is zero, the operand becomes the initial value. | Includes can apply proportional adjustments while preserving zero as the runtime identity sentinel. | Source/Tools/ModelInfoBaker.cpp |
Scale* |
current link |
Applies the multiplicative rule to all three scale axes. | Provides a uniform proportional scale adjustment for templates and selected links. | Source/Tools/ModelInfoBaker.cpp |
DisableLayer |
current link |
Adds layer indices to the current link’s disabled-layer set. Every value is range checked. | When the link is active, matching layer slots are skipped for that model instance. | Source/Tools/ModelInfoBaker.cpp, Source/Client/ModelInstance.cpp |
DisableMesh |
current link |
Adds drawable mesh names to the current link’s disabled set. All stores the empty wildcard. | When the link is active, matching meshes in that model instance are omitted from combined geometry. | Source/Tools/ModelInfoBaker.cpp, Source/Client/ModelInstance.cpp |
Texture |
current link and Mesh selector |
Overrides one texture slot on the selected mesh or all meshes. Non-Parent names resolve relative to the current model mesh; Parent copies the active parent texture from an attached-model context. | The override participates in mesh batching and texture-atlas coordinate adjustment. | Source/Tools/ModelInfoBaker.cpp, Source/Client/ModelInstance.cpp |
Effect |
current link and Mesh selector |
Overrides the draw effect on the selected mesh or all meshes. Parent copies the active parent effect from an attached-model context. | Meshes with different effects cannot share one combined draw batch. | Source/Tools/ModelInfoBaker.cpp, Source/Client/ModelInstance.cpp |
DisableShadow |
description |
Disables shadow rendering for every instance of the description. | The model-level flag combines with the per-instance shadow toggle. | Source/Tools/ModelInfoBaker.cpp, Source/Client/ModelInstance.cpp |
Attachment choice
- Use
Attach child.fo3dwhen the child needs its own model description, layers, materials, cuts, or animation declarations. - Use
Attach child.fbxorAttach child.objfor a direct baked hierarchy. - Add
Link Boneto place the complete child under one parent bone. - Omit
Linkonly when parent and child intentionally share same-named bones and the child should follow the parent skeleton. - Use
AttachParticles ... Link Bone; the runtime requires a target bone.