Hi everyone,
I just started with bullet and made some tests.
I created 220 cuboid rigid bodies in the air and let them fall down on a plane.
While the bodies are moving, the frame rates drops quite hard, depending on the stepSimulation settings the frame rate goes down to 30fps or even lower.
Is this normal, or am I doing something wrong?
I saw this vid: http://www.youtube.com/watch?v=J9HaT23b ... re=related
I'm not sure if this somulation was done in realtime, but I used 220 bodies and there it is over 5000, so I don't think that is it normal to have bad performance with 220 bodies.
What might cause the problems?
I can post some code if you want.
I'm using ogre3d for rendering, but I also deactivated rendering for a test, which does not make a noticeable difference.
Thanks for your answers in advance!
Is this normal (low framerates)
-
- Posts: 237
- Joined: Tue Jun 29, 2010 10:27 pm
Re: Is this normal (low framerates)
That youtube video may or may not be recorded in real time, who knows. So I wouldn't compare your performance to that necessarily. And of course it also depends on your particular machine. I did some tests a while back on my 2.66GHz quad-core - I don't exactly remember what my results were, but I think I got a few hundred boxes dropping on a plane before it dipped below 30fps, so I'd guess your results aren't too abnormal. Are you doing any custom processing on the boxes? Or is it basically a simple hello-world style app where you just create the rigid bodies and let them go? Perhaps it could be related to your stepSimulation parameters (deltaT, etc). I am not too familiar with how they affect simulation performance, as ours is fixed and I've never really touched it. We use:
Also, if you instantiate all the boxes in the exact same location at the start, then for a short time (until they separate) there will be a very large number of contacts to resolve, which can definitely slow things down momentarily.
Code: Select all
dynamicsWorld->stepSimulation(1/30.f, 2);
-
- Posts: 3
- Joined: Wed Sep 28, 2011 3:52 pm
Re: Is this normal (low framerates)
I used my laptop for this with dual core, don't remember the exact values.
It's just as in hello world.
At the start the boxes are side by side.
I used
dynamicsWorld->stepSimulation(deltaMillis, 10);
but i also tried it with
dynamicsWorld->stepSimulation(deltaMillis, 1);
I think I don't need a fixed timestep because bullet automaticully uses a fixed timestep (60 steps per second default).
I'm not rly sure, what it does if the second parameter is set to 1.
It might be that if deltaMillis is 180 milliseconds then 3 steps would be expected, but then the world woudl maybe just do 1 step. The question is if it would make 1 very big step (3 steps merged to 1), or 1 normal step and just discard the others.
It's just as in hello world.
At the start the boxes are side by side.
I used
dynamicsWorld->stepSimulation(deltaMillis, 10);
but i also tried it with
dynamicsWorld->stepSimulation(deltaMillis, 1);
I think I don't need a fixed timestep because bullet automaticully uses a fixed timestep (60 steps per second default).
I'm not rly sure, what it does if the second parameter is set to 1.
It might be that if deltaMillis is 180 milliseconds then 3 steps would be expected, but then the world woudl maybe just do 1 step. The question is if it would make 1 very big step (3 steps merged to 1), or 1 normal step and just discard the others.
-
- Posts: 3
- Joined: Wed Sep 28, 2011 3:52 pm
Re: Is this normal (low framerates)
Oooops!
I just recognized that I only tried in debug mode...
Just started release and have more than 400 fps
I just recognized that I only tried in debug mode...
Just started release and have more than 400 fps

-
- Posts: 168
- Joined: Tue Jan 04, 2011 11:47 pm
Re: Is this normal (low framerates)
This is interesting...I don't notice about it before...P@u1 wrote:Oooops!
I just recognized that I only tried in debug mode...
Just started release and have more than 400 fps
-
- Posts: 237
- Joined: Tue Jun 29, 2010 10:27 pm
Re: Is this normal (low framerates)
Yes, good to know! I generally work in debug mode..haven't used release mode in ages. Nice to know there can be a noticeable improvement. I should try my stuff in release mode again...I may be presently surprised. 

-
- Posts: 4
- Joined: Sun Oct 02, 2011 10:07 am
Re: Is this normal (low framerates)
The difference between Debug and Release is amazing.
When I got this working (and switched to Release) I was psyched!
When I got this working (and switched to Release) I was psyched!