Collision Volumes
Collision Volumes
Collision meshes are simplified, invisible versions of objects that help things like avatars and items interact with each other. Instead of using the detailed, visible version of the object (which could slow things down), these simplified meshes make interactions faster and smoother, especially for things like physics or when objects collide in a scene. They improve performance by reducing the complexity of calculations when objects need to touch or interact with each other.
Viewing Collision Volumes
During edit mode you can view the collision volumes of objects individually or the entire scene, currently you cannot preview animated collision volumes as these do not play during edit mode.
Each volume type has a color associated with it's Motion Type to help identify them
Grey - Static objects
Yellow - Dynamic objects
Cyan - Keyframed objects
Black - Unknown type (Dev test assets) rarely seen
Viewing selected objects collisions
With your objects selected
Right click your objects.
Select Structure from the context menu.
If your object contains a collision it should display as 'Volume' by default but the symbol can be used to identify the collision if it has been renamed. Left click this and it should now display the volume on your object.
Note: with this selected the adjustment gizmo will affect the volume allowing you to make some changes to its position.
Viewing the entire scenes collision volumes
Its possible to see the entire scenes collision volumes in one go to get a quick idea of how everything is working for visitors to your scene compared to the visual mesh.
In edit mode, at the top left click the EYE 'visibily' symbol
select 'Physics Shapes'
It is quite common to see flickering of the collision mesh overlapping the render mesh this is generally seen as fine and a close matching collision. While in this mode you should see if any collision volumes could be removed or simplified to help with optimization.
Using Collision Volumes
To optimize performance in Sansar and avoid issues when adding collision meshes to your objects, follow these best practices:
Avoid using your "render" mesh as a collision mesh. The render mesh is the detailed version that’s seen in the scene, but it’s too complex for fast physics calculations.
Keep collision meshes simple and low-polygon. They should be basic "convex cages" that cover the areas you don’t want avatars to pass through. Collision meshes should always be as light as possible to minimize strain on the system.
Opt for basic shapes when possible. For smaller objects like tables, chairs, or props, consider using basic shapes like cuboids, spheres, or capsules for the collision mesh. This keeps the calculation simple and reduces unnecessary complexity.
Triangulate your collision before import, this is done automatically if not and can create issues
Important Note: For performance reasons, dynamic objects (objects that can move or be interacted with) have their collision meshes automatically converted into simplified convex hulls during the experience. This ensures faster calculations when players are interacting with them. However, the original collision mesh will still be preserved in your inventory and while you're editing your scene.
When not to use collision meshes
you are able to remove a collision volume from an objects structure panel as part of your scene optimization by right clicking the volume from the structure menu and select delete.
reasons to remove a volume or not use one
If the collision volume seems really complex for your objects needs replace it with a simpler volume.
If an item is a background/distant object.
Something is small and not intended to be interacted with.
Decorative wall items or ground clutter.
many large objects in a small space makes it hard to navigate the area removing some may help players get around.
Importing collision volumes
Please see Importing Collision Volumes on how to import and add volumes to objects.
Last updated