Sphere rolling inside arc tube - performance

Post Reply
Krones
Posts: 10
Joined: Tue Sep 22, 2009 4:46 pm

Sphere rolling inside arc tube - performance

Post by Krones »

Hi,
I have a scenario in which a sphere rolls inside an arc tube similar to the picture:
Image
The radius of the sphere is a bit smaller than the side of the square that makes its sides. In Bullet, I've set up the arc as a static trimesh, part of a bigger trimesh that represents the environment in which the sphere rolls on.
When the sphere rolls inside the arc, CPU consumption raises dramatically. When over any other part of the trimesh surface, the performance is good, as most of it is quite simple. Even if it rolls against the outside part of the tube there is no considerable performance drawback.
How could I improve performance? Would that be a case for convex decomposition of the arc?
Thanks in advance,
Krones
Krones
Posts: 10
Joined: Tue Sep 22, 2009 4:46 pm

Re: Sphere rolling inside arc tube - performance

Post by Krones »

Sorry, wrong forum. This should go to "General Discussion about Collision Detection and Physics R&D". My bad
User avatar
Erwin Coumans
Site Admin
Posts: 4221
Joined: Sun Jun 26, 2005 6:43 pm
Location: California, USA
Contact:

Re: Sphere rolling inside arc tube - performance

Post by Erwin Coumans »

Can you share the .blend file?
(zipped attachment)

Likely there are too many vertices in the collision shape. Can you simplify it?
Cheers,
Erwin
Krones
Posts: 10
Joined: Tue Sep 22, 2009 4:46 pm

Re: Sphere rolling inside arc tube - performance

Post by Krones »

Indeed! The model shape was NURBS based which generated quite a lot of vertices. But went from 3mb to 300k just by converting the NURBS tube shape to a simpler line square and reducing the curve resolution, generating pretty much the same visual effect. Works much faster now, thanks a lot :D
Is the older model still of any use? I can post if if it helps on anything.
Thanks,
Krones
Post Reply