• Hi Guest!

    We are extremely excited to announce the release of our first Beta for VaM2, the next generation of Virt-A-Mate which is currently in development.
    To participate in the Beta, a subscription to the Entertainer or Creator Tier is required. Once subscribed, download instructions can be found here.

    Click here for information and guides regarding the VaM2 beta. Join our Discord server for more announcements and community discussion about VaM2.
CustomCollider

Plugins + Scripts CustomCollider

Download [0.03 MB]
This plugin lets you easily add as many CPU and/or GPU colliders to your scene as you want.
shapes_crop.png


Does the scene asset you would like to use lack colliders somewhere? Add CPU colliders, which collide with other rigid body objects such as the person body model.

Do you have characters with long hair or clothes and they keep clipping through the furniture in the poses you would like to use? Add GPU colliders, those collide with simulated hair and clothes.

Usage​

Add CustomCollider.cslist to any atom in the scene. The collider will be placed relative to that atom's position. If you want to freely place a collider in the scene, the best choice is to use the Empty atom from VAM's Misc category.

Then configure the collider in the plugin's settings.

If you want to, you can add multiple instances of the plugin to the same object, one for each collider.

Shape​

tab_shape.png

This is where all the collider's properties are configured. The supported shapes are:
  • Sphere
  • Capsule (cylinder with sphere caps, oriented along one of the three local axes of the object)
  • Box
  • Plane
Below the Shape choice, you can configure the size properties relevant for the selected shape. The collider will also automatically scale with the parent object's global scale.

You can enable CPU and/or GPU collisions for the colliders. CPU colliders interact with other rigid physical objects, such as character bodies. GPU colliders interact with simulated hair and clothes.

Box Notes:

VAM does not natively support GPU box colliders. If GPU Collider is enabled for the Box Shape, the plugin will approximate the shape by filling it with capsules. The box's height defines the diameter of the capsules, so keep that relatively low. You can choose the orientation in which the capsules will be placed inside the box:
  • Auto: Automatically choose between Width or Length, depending on which is higher. This way the lowest possible amount of capsules will be used to fill the box, which is in general good for performance. But it might not necessarily achieve the best behavior for your scene and pose.
  • Length: The capsules will be oriented along the forward (blue) axis of the object.
  • Width: The capsules will be oriented along the right (red) axis of the object.
  • Length+Width: Capsules in both directions will be used to fill the box.
The Overlap slider controls the density of the capsules. It's recommended to go with lower values for performance reasons, as long as the results look good.

Plane Notes:

The plane collider is not supported as a CPU collider, ticking that checkbox will do nothing. Be aware that the Plane GPU collider is infinite. While for visualization purposes it's rendered as a square, it stretches into infinity. Any cloth or hair crossing the in-front/behind plane's boundaries will collide with the plane. The front of the plane is indicated by the object's up axis (green).

It's a good choice for a room's floor, as long as there are no levels below it. Or even for walls/ceiling, assuming you need GPU colliders there at all. In most cases, it's not a good choice for the top of a sofa or a bed, since it will also collide with any hair and cloth that's next to the furniture, if it crosses its above/below boundary. Consider using the box emulated by capsules for objects like beds instead. But the plane might look and perform better and cause no issues in your scene, if all the hair/cloth action happens only on top of the furniture item.

Position​

The Position tab lets you move and rotate the collider relative to the atom it's attached to.

Visualization​

Each collider is visualized in two ways:
  • Wireframe: white lines, can be seen through other objects. Let's you see where the collider is placed even if it's inside another object.
  • Solid: blue shape, respecting visibility. Let's you see where the collider protrudes out of visual geometry.
On this tab, you can choose which visualization type is show when. By default the wireframe is drawn when the atom containing this plugin is selected, and the solid is drawn when the plugin's UI is active.

In addition to that, the collider's axes are drawn when the Position tab is active. If there is no local position, these will align with the object's controller graphics, so you might not even notice them.

Triggers​

Most of the collider settings are exposed and can be controlled from VAM's trigger system. Disabling the whole plugin can be also used to disable its collider.

GPU box warning: Changing any of the size properties of a Box shape collider leads to all the internal capsules being recreated, if the box has GPU collisions enabled. For performance reasons, avoid animating those properties.[/SPOILER]

More resources from Foost

Share this resource

Latest reviews

Positive
Version: 1
So you're telling me that my subscene of 30 capsules arranged side by side to add a collide-able surface to a table or bed is no longer needed!?!?!.... Good! ^_^
Upvote 0
Positive
Version: 1
This is super useful, and I suggest to add a function to enable the collision with the floor when set a object's position off and physics on, thus this plugin will be much more widely used for other purposes, like a pair of glasses falling to ground, etc.
Foost
Foost
Thanks. But I don't really understand the request. What floor? Do you mean when you use a CUA environment asset that does not even have a mesh collider so stuff falls through the floor? Just put a Box CPU collider there (or VAM's slate floor and hide it).
Upvote 0
Positive
too
Version: 1
Wonderful !
Upvote 0
Back
Top Bottom