I create a scene with a bunch of spheres (balls):
- Create Physics Scene
- Add Ground Plane
- Create some cubes to serve as a container
- Import Pipe from IClone
- Added 512 spheres, than duplicated them so 1,024.
Every prop in the scene before being duplicated:
Add Physics > Rigid Body with Colliders Preset.
Everything works as expected (although slower than the timeline should be), except Omniverse treats the inside of the pipe as though it is solid.
Here is a short video demonstrating the problem:
there are few things to resolve here.
- Perf problem can be resolved by using omni.physx.flatcache extension, by default we write to USD and its not great for perf. If you dont need to access the transformations from python or in the UI you can enable omni.physx.flatcache extension from the extension manager. This will get the transformations more directly to the render.
- If you apply on the pipe the rigid body and colliders preset it expects that the pipe is a dynamic rigid body, dynamic rigid bodies have by default convex hull aproximation, so it wont create a hole. You have two options:
a) the pipe does not have to be a dynamic body, then remove the RigidBodyAPI - in the property window press the x next to the rigid body part, then in the collision properties section change the approximation to triangle mesh.
b) leave the pipe as a dynamic body and change the collision approximation as a convex decomposition. There are many parameters to tweak here, so you might need to play a bit to get the collision good enough for your case. You can display the collisions through the eye icon:
Here ideal solution is to make the pipe a static collision and set the approximation to triangle mesh, then directly the triangles from the pipe will be used. But I dont know if you need the pipe to be dynamic or not.
Thanks for the reply. I do not think I am awake enough to understand all this yet.
I do not need the pipe dynamic, I just wanted to see if the balls would roll down it.
I will try your suggestions. I tried a NVidia Asset, and it was the same result, but as you explained I had selected Add > Physics > Dynamic Body with Colliders Preset again.
I can’t find this RigidBodyAPI in the properties window you mention. Do you have a screenshot please?
Yes, of course here is the x that you can press:
Or you can also disable the rigid body - Rigid Body Enabled unchecked.
Just a knowledge I have learned since I posted this, I learned just selecting Colliders Preset, works.