Page 1 of 1

Sphere rolling inside arc tube - performance

Posted: Fri Jan 08, 2010 12:27 am
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

Re: Sphere rolling inside arc tube - performance

Posted: Fri Jan 08, 2010 12:55 am
by Krones
Sorry, wrong forum. This should go to "General Discussion about Collision Detection and Physics R&D". My bad

Re: Sphere rolling inside arc tube - performance

Posted: Fri Jan 08, 2010 2:17 am
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

Re: Sphere rolling inside arc tube - performance

Posted: Fri Jan 08, 2010 2:45 am
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