About Store Forum Documentation Contact



Post Reply 
Severe physics jitter on low fps
Author Message
para Offline
Member

Post: #1
Severe physics jitter on low fps
Hi, on EE 2.0 I get severe twitchy physics when ever the frame rate drops bellow 60fps..

This happens with SimpleVehicle class, when the game is running at 25fps:




But the same is happening with PhysX Vehicle and Chr classes!

I checked the Tutorials // 11 - Physics // 12 - Vehicle, same thing there, so it's not my convex body or vehicle setup acting weird.

I didn't notice any of this when using 1.0...?
(This post was last modified: 04-15-2013 03:21 PM by para.)
04-15-2013 03:12 PM
Visit this user's website Find all posts by this user Quote this message in a reply
Esenthel Offline
Administrator

Post: #2
RE: Severe physics jitter on low fps
Hello,

Yes I'm aware of the jittering with simple vehicle when in low fps, I've discovered that recently and I'm working on a fix for next release smile
04-15-2013 03:20 PM
Find all posts by this user Quote this message in a reply
para Offline
Member

Post: #3
RE: Severe physics jitter on low fps
Well, then you have my thanks in advance! smile
04-15-2013 03:50 PM
Visit this user's website Find all posts by this user Quote this message in a reply
Esenthel Offline
Administrator

Post: #4
RE: Severe physics jitter on low fps
Hello,

SimpleVehicle codes got improved and it should be ok in next release.

But you've also mentioned similar issue happens with Chr and Vehicle classes.

I'm testing Chr (Controller) and Vehicle classes now, but they seem to be working the same in 60fps and 24fps and 2000fps. Can you provide sample project reproducing the problem?
04-20-2013 11:10 AM
Find all posts by this user Quote this message in a reply
para Offline
Member

Post: #5
RE: Severe physics jitter on low fps
Vehicle class on low fps:



The car and wheel shaking is a bit hard to see at small size, but it's there..
Also, PhysX doesn't like a big difference in mass :( (using default mass and density values for both car and prop)


Chr controller sliding - From tutorial 14 - Camera modes:



I think this might not be the same issue here, as it happens to me regardless of frame rate, though it is amplified by a low fps rate. It think it's affected by really low angle slopes (near zero)

in summary:
- 100% flat terrain: no movement
- almost flat terrain: sliding
- low, medium, big slopes: no movement or sliding as expected


-edit:
Looks like EE is using QueryPerformanceCounter for timing, correct? Maybe one of these issues could be hardware/power management related, as I'm running this on my old laptop(more like craptop). I'll try running the same build on a proper desktop PC when I get the chance.
(This post was last modified: 04-20-2013 05:16 PM by para.)
04-20-2013 05:00 PM
Visit this user's website Find all posts by this user Quote this message in a reply
Esenthel Offline
Administrator

Post: #6
RE: Severe physics jitter on low fps
SimpleVehicle will have even better stability in next release.

Controller sliding on almost flat terrain will be removed in next release smile just fixed it.

As for the Vehicle class please try this after physics creation : Physics.timestep(PHYS_TIMESTEP_VARIABLE);
If that still won't work please provide sample project to reproduce the issue (perfectly 2.0 project) so I could test it (because my tests with PHYS_TIMESTEP_VARIABLE did not have jittering issues).

Thank you!
04-22-2013 10:52 AM
Find all posts by this user Quote this message in a reply
ZeroByte Offline
Member

Post: #7
RE: Severe physics jitter on low fps
@Esenthel, looking forward to next release, i'm really liking this simple vehicle class great job! I still have the jitter on low fps 24 to 26, i'm running it on my nexus 10, i get 60 fps when i disable bloom, clouds don't look as nice though smile I Tried "Physics.timestep(PHYS_TIMESTEP_VARIABLE);", it seemed to help at first,
but when i started driving it was bouncing all over.

So, no jitter at 60 fps, but still for me a lot of jitter at 24 fps... thank's!
04-23-2013 12:32 AM
Find all posts by this user Quote this message in a reply
gwald Offline
Member

Post: #8
RE: Severe physics jitter on low fps
(04-23-2013 12:32 AM)ZeroByte Wrote:  @Esenthel, looking forward to next release, i'm really liking this simple vehicle class great job! I still have the jitter on low fps 24 to 26, i'm running it on my nexus 10, i get 60 fps when i disable bloom, clouds don't look as nice though smile I Tried "Physics.timestep(PHYS_TIMESTEP_VARIABLE);", it seemed to help at first,
but when i started driving it was bouncing all over.

So, no jitter at 60 fps, but still for me a lot of jitter at 24 fps... thank's!

Same here on build v24, I Tried "Physics.timestep(PHYS_TIMESTEP_VARIABLE);" too but it's unusable under 20fps - bounces/shakes crazily.


Can you recommend anything else for lower 15-20fps?
Cheers

EDIT: Not using server just added a 32x32 level to the tutorial.
I guess improving frame rate is a solution grin
(This post was last modified: 05-30-2013 04:48 AM by gwald.)
05-30-2013 04:33 AM
Visit this user's website Find all posts by this user Quote this message in a reply
Esenthel Offline
Administrator

Post: #9
RE: Severe physics jitter on low fps
In addition to Physics.timestep(PHYS_TIMESTEP_VARIABLE)
you can try either Physics.precision(1) or Physics.precision(1000)
06-03-2013 12:07 PM
Find all posts by this user Quote this message in a reply
cat555 Offline
Member

Post: #10
RE: Severe physics jitter on low fps
(06-03-2013 12:07 PM)Esenthel Wrote:  In addition to Physics.timestep(PHYS_TIMESTEP_VARIABLE)
you can try either Physics.precision(1) or Physics.precision(1000)

Hi, i'm experiencing the same issue here... of course that PHYS_TIMESTEP_VARIABLE timestep helps a lot, as said by others, but under 30fps the problem is still there.

Unfortunately, also using Physics.precision(1) or Physics.precision(1000) is basically the same issue with no difference at all :(

Any idea to improve the actual behavior? I'm using the Vehicle class.

Thanks!
(This post was last modified: 09-03-2014 11:51 AM by cat555.)
09-03-2014 11:36 AM
Find all posts by this user Quote this message in a reply
Esenthel Offline
Administrator

Post: #11
RE: Severe physics jitter on low fps
Hi,

I think that PhysX Vehicle class uses some internally managed timesteps.
09-03-2014 01:32 PM
Find all posts by this user Quote this message in a reply
cat555 Offline
Member

Post: #12
RE: Severe physics jitter on low fps
Hmm, Ok! So in that case, without controlling that timesteps, improving the framerate it's the solution... it can be tricky for mobiles, since 25-30fps is very good on mobiles... but with the vehicle not :(

Thanks!
09-03-2014 02:43 PM
Find all posts by this user Quote this message in a reply
cat555 Offline
Member

Post: #13
RE: Severe physics jitter on low fps
I'm now using a quick workaround for the jitter at low fps... basically, i'm setting suspension damping to a smaller value:

Code:
suspDamping(2000); // default is 4500

If this does not affect too much the needed configuration for the car, this is a quick and dirty workaround that we can use... not perfect (since we may want to use higher damping values for the suspension), but at least the jitter disappear smile
09-10-2014 10:41 AM
Find all posts by this user Quote this message in a reply
cat555 Offline
Member

Post: #14
RE: Severe physics jitter on low fps
Hi, now that i own source license i've been investigating an making some tests with PhysX vehicle.

I've just found the internally timesteps that @Esenthel refers some post ago, can be set through wheels sim data - PxVehicleWheelsSimData::setSubStepCount.

In this case, we can set them using (for example):
Code:
wheels_sim_data->setSubStepCount(1,9,9); // default values are 5,3,1

Please refer to:

http://docs.nvidia.com/gameworks/content...3b5b37053b

Code:
void PxVehicleWheelsSimData::setSubStepCount    (    const PxReal     thresholdLongitudinalSpeed,
const PxU32     lowForwardSpeedSubStepCount,
const PxU32     highForwardSpeedSubStepCount    
)

This is one of the recommendations from NVidia, forjittery vehicle problems... please check out here - http://docs.nvidia.com/gameworks/content...icles.html (search by Jittery Vehicles)

My tests by using PxVehicleWheelsSimData::setSubStepCount, did elimitated jitter smile

@Esenthel, it will be possible for you to allow the set of PxVehicleWheelsSimData in Esenthel side... or at least the PxVehicleWheelsSimData::setSubStepCount... so devs can override the default values.

Thanks!
09-20-2014 06:07 PM
Find all posts by this user Quote this message in a reply
Esenthel Offline
Administrator

Post: #15
RE: Severe physics jitter on low fps
Hi,

That's no problem, you can expect this in the next release.
09-26-2014 01:19 AM
Find all posts by this user Quote this message in a reply
Post Reply