Collider Ingestion User Guide
Collider ingestion allows asset creators to define custom collision shapes in the FBX file for a mesh asset. When these colliders are ingested into Horizon they become collider entities, these are a new type of entity in Horizon that is only used for collision.
Collider entities have collision, physics, and grabbable components but no renderable mesh component. Collider entities can be ingested with mesh assets or spawned directly from the Creator User Interface (CUI). By grouping collider entities with mesh entities, creators are able to create visually complex objects with performant collision. These collider entities are viewable with the collision debug view but otherwise be invisible.
Types of Collider Entities
Collider entities can either be primitives (box, sphere, capsule) or meshes. Primitives have significant performance advantages, but mesh colliders allow for more precise collision.
Type | Source | Description |
---|
Box | CUI or Ingested | Primitive box collider. Uses Unity’s BoxCollider component. |
Sphere | CUI or Ingested | |
Capsule | CUI or Ingested | |
Mesh | Ingested Only | A mesh ingested from an asset. Uses Unity’s MeshCollider component. Can represent a convex hull or a concave mesh. |
Ingesting Collider Entities
When importing 3D models made in a DCC tool (Digital Content Creation) into horizon we provide a way for creators to designate a custom collider setup. Mesh names saved out from the DCC tool define which meshes represent colliders and what type of colliders they are.
The colliders should be attached to the visible geometry in the DCC tool, so they’re grouped together when spawned in Horizon.
This same mesh name-based custom collider approach is used by Unreal, Houdini, and Unity (via plugin).
Type | Mesh Prefix Naming | Requirements |
---|
Box | UBX_[VisibleMesh]_## | A Box must be created using a regular rectangular 3D object. You cannot move the vertices around or deform it in any way to make it something other than a rectangular prism, or else it will not work. |
Sphere | USP_[VisibleMesh]_## | A Sphere does not need to have many segments (8 is a good number) at all because it is converted into a true sphere for collision. Like boxes, you should not move the individual vertices around. |
Capsule | UCP_[VisibleMesh]_## | A Capsule must be a cylindrical object capped with hemispheres. The capsule is expected to be vertical in local space. It does not need to have many segments (8 is a good number) at all because it is converted into a true capsule for collision. Like boxes, you should not move the individual vertices around. |
Convex Hull | UCX_[VisibleMesh]_## | A Convex object can be any completely closed convex 3D shape. |
Concave Mesh | UCC_[VisibleMesh]_## | Any concave mesh. This is the most flexible type of collider but is also the least performant. Unity will generate a convex hull if it is marked as dynamic. |
The geometry for primitive colliders (box, sphere, capsule) is expected to have its pivot at the center. This restriction does not apply to convex or concave mesh colliders.
This screenshot from Blender shows a visible mesh (RingTarget) with a number of primitive colliders defined for it.
Demo - Ingested Colliders Spawned in Horizon
Spawning Collider Entities from the CUI
Collider entities are also available for World Creators in the CUI. Spawning them is similar to spawning a primitive shape, but there will be no visible geometry. Only primitive colliders (box, sphere, capsule) are available from the CUI, just as only primitive shapes are available in the CUI. Collider entities can be grouped with visible meshes to define custom collision for those meshes, or used on their own to add collision volumes to the world.
We automatically enter Colliders view mode when the creator spawns a collider entity from the CUI.
Demo - Spawning Colliders from the Creator User Interface