Recipes
Imported and uploaded 3D models in the world
A creator brings their own character, vehicle, or prop mesh (a glb or gltf) and wants it in the scene. That is a model ASSET shown through a
RenderableComponent. This is distinct from building geometry in-engine from primitives (see model-authoring-parametric-csg).engine v1.0.234since component-field-contract ecs.component-field-contract.v1, action-catalog.v1.0.232, rendering.v1, mutation.v1Copy for LLM
Use this for
using an uploaded or imported 3D model as a character or prop; placing a custom mesh asset on an entity; assigning materials to a model; playing a rigged model's animation clips
Not for
building a mesh from primitives and CSG in-engine (see model-authoring-parametric-csg); primitive box or sphere renderables with no asset (see physics-colliders-rigidbodies); terrain meshes (see terrain-and-heightmaps)
Pairs with: Model authoring parametric primitives and CSG for custom meshes, Animation clips walk run attack idle and poses, Materials and looks PBR surfaces color metalness and textures, Asset acquisition strategy
The recipe
- Get the asset in: an uploaded or imported model becomes a project model asset. Create or register it with
project_create_asset(project.asset.create), or pick one already in the catalog (see asset-acquisition-strategy). The SDK authoring path isProjectAuthoringHost.uploadAssetfor a file upload. - Show it on an entity: attach a
RenderableComponent{ "type":"RenderableComponent", "visible": true, "shape":"mesh", "assetId": <model asset id>, "renderSpace":"world" }.shapeMUST bemeshfor a model asset;box/sphere/capsuleare primitive shapes with no asset. - Materials: assign looks through
materialSlots(or amaterialRef) so the model uses your project materials (see materials-and-looks) instead of its embedded defaults. - Animate a rigged model: attach an
AnimationStateComponentand play a clip byclipKey(see animation-clips-and-poses); the clip keys come from inside the model asset. - Give it presence: add a
ColliderComponentsized to the model so it blocks or is hittable (the mesh render alone has no collision).
Pitfalls
shapemust bemeshandassetIdset to the model asset; a mesh renderable with no asset shows nothing, and a primitive shape ignores the asset.- Importing a model is NOT a semantic-patch op; the asset comes in through the asset create or upload path, then the renderable references it.
- The render is a look, not a body; collision, triggers, and hits still need a
ColliderComponent(see physics-colliders-rigidbodies). - Animation clips are whatever the asset ships; a
clipKeythat the model does not contain plays nothing (see animation-clips-and-poses).
Verify
qa_capture_renderer_viewport(qa.renderer.viewport.capture) to confirm the model renders with its materials.project_get_graph_snapshotto confirm theRenderableComponentshape:"mesh"andassetIdresolved.