Skip to content

Import collision shapes from glTF instead of rebuilding them at runtime #321

Open

Description

@bdero

Offline import drops any collision authoring in the source file, so a collision mesh built alongside the model cannot reach a .fsceneb. Consumers rebuild one at runtime from the render mesh instead, which is the wrong geometry (render meshes carry more triangles than a collider needs and are split at UV seams) and costs a load-time walk of the whole subtree.

Teach the offline importer to emit collider components. ColliderCodec and encodePhysicsShape already handle storage, including the bulk vertex and index payloads, so this is import-side work only.

Two conventions are worth supporting. OMI_physics_shape and OMI_physics_body are the standards-track glTF extensions and carry the shape type, its dimensions, and the body kind explicitly. A node-name marker (a suffix that turns a mesh into a collider, with a variant that also drops it from the render tree) needs no exporter support and covers tools that cannot write extensions.

Prefer the extension when a node carries both.

Activity

  1. added
    importerPertains to the importer
    roadmapPlanned long-horizon work owned by maintainers.
    on Aug 17, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    importerPertains to the importerroadmapPlanned long-horizon work owned by maintainers.

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions