Unusual "jitter" while hit

AxeD
Posts: 36
Joined: Tue Jun 17, 2008 8:28 pm

Re: Unusual "jitter" while hit

Post by AxeD »

The one and only "feedback" of more internal substeps was higher CPU usage. I have notice one more thing that jitter occures when object was penetrated by other. Not just hit but penetrated. My current margin is 0.2f.
sparkprime
Posts: 508
Joined: Fri May 30, 2008 2:51 am
Location: Ossining, New York

Re: Unusual "jitter" while hit

Post by sparkprime »

I take it you mean both decreasing the size of the internal step, and increasing the number of iterations in the solver info did not improve it.

All collisions happen as a result of penetrations so I'm not sure what you mean.
AxeD
Posts: 36
Joined: Tue Jun 17, 2008 8:28 pm

Re: Unusual "jitter" while hit

Post by AxeD »

I mean "tunneling".
sparkprime
Posts: 508
Joined: Fri May 30, 2008 2:51 am
Location: Ossining, New York

Re: Unusual "jitter" while hit

Post by sparkprime »

Well if you have tunneling then things will never work out. You need make sure tunneling doesn't happen first. For that you need to pick a simulation step size that is small enough that collision shapes can't pass more than half way through each other in a single iteration. If you're using a compound shape then this applies to the components of the shape. This obviosuly depends on the velocities in the simulation so you may have to constrain them too. Use an internal step callback for that. Maybe maximum velocities should be a core bullet feature?
AxeD
Posts: 36
Joined: Tue Jun 17, 2008 8:28 pm

Re: Unusual "jitter" while hit

Post by AxeD »

ok, I will check with more substeps, but as far as I remember I have checked that, but cpu occupancy was to high. Any way I will letYou know
AxeD
Posts: 36
Joined: Tue Jun 17, 2008 8:28 pm

Re: Unusual "jitter" while hit

Post by AxeD »

And it failed. It not gave me correct result. Other thing is, that pins on Your video looks to real I need to have "pin explosion"
sparkprime
Posts: 508
Joined: Fri May 30, 2008 2:51 am
Location: Ossining, New York

Re: Unusual "jitter" while hit

Post by sparkprime »

You want the pins to get smashed around really fast? You will definitely need to clock the simulation much higher than 60hz in that case.

Did you reproduce this on the pc yet?
User avatar
John McCutchan
Posts: 133
Joined: Wed Jul 27, 2005 1:05 pm
Location: Berkeley, CA

Re: Unusual "jitter" while hit

Post by John McCutchan »

Hi AxeD,

Bullet is carefully tuned for small numbers. You should map 1 meter to 1 floating point number. Using gravity of 1000 m/s/s, and linear velocities of 700 m/s will almost surely break Bullet. You might also want to enable debug rendering to make sure that your render mesh is properly positioned with respect to the collision mesh.

Thanks,
John
AxeD
Posts: 36
Joined: Tue Jun 17, 2008 8:28 pm

Re: Unusual "jitter" while hit

Post by AxeD »

Hi All,
I can't (yet) reproduce it on PC. On aWii max frame rate is 60Hz. I'm trying stepsimulation (1/15, 4, 1/100) - much faster

John, yes i know, but i have this same with small pins (in meters). However there can be another issue. Bottom of a pin i really small. Is there debug drawing on a wii ?? Is there any way to "cut" a cone ?

Best regards
sparkprime
Posts: 508
Joined: Fri May 30, 2008 2:51 am
Location: Ossining, New York

Re: Unusual "jitter" while hit

Post by sparkprime »

It would be nice to have a collision shape called "ConeFrustum" or similar, which would be a cone with the top cut off, or alternatively, a cylinder whose ends are not the same size.

Then it would be easy to create compound shapes that represent "spun" objects like bowling pins,
AxeD
Posts: 36
Joined: Tue Jun 17, 2008 8:28 pm

Re: Unusual "jitter" while hit

Post by AxeD »

simulation now looks OK. However there is anotrher issue. When i set damping (0.3, 1.0f) to have a rotation damping it works but not so well. I mean pins which are collapsed are rolling and rolling and rolling..... Any idea ??
sparkprime
Posts: 508
Joined: Fri May 30, 2008 2:51 am
Location: Ossining, New York

Re: Unusual "jitter" while hit

Post by sparkprime »

AxeD
Posts: 36
Joined: Tue Jun 17, 2008 8:28 pm

Re: Unusual "jitter" while hit

Post by AxeD »

Thank You it helps. I hope some tweaks wiil help to finalize this issue
AxeD
Posts: 36
Joined: Tue Jun 17, 2008 8:28 pm

Re: Unusual "jitter" while hit

Post by AxeD »

Hi I'm back...
it looks it was not a solution for my problem. While stress test i have almost this same issue. However I think that this jitter is made by angular velocity, but object rotates so fast that it looks like jitter.
sparkprime
Posts: 508
Joined: Fri May 30, 2008 2:51 am
Location: Ossining, New York

Re: Unusual "jitter" while hit

Post by sparkprime »

You can print the angular velocity each frame to verify that

get it from the btRigidBody::getAngularVelocity