Problems with wheels

Posted By: 3run

Problems with wheels - 09/27/11 12:53

I use PhysX to make vehicle, and I faced strange problem with wheels behavior (same I found in kings on wheels from samples folder). Wheels aren't changing they position smoothly (in Z coordinates), so if you drive on low-poly map (made with model) you can see some strange behavior, like jerking while adapting to slopes and surface angles.. I can provide demo, video and better explanation if needed, but I really want this to be fixed, so it will act smoothly as it used to in ODE.

EDIT: got some mistakes..
Posted By: jcl

Re: Problems with wheels - 09/27/11 16:36

Wheel behavior is determined by inertia, lateral and longitudinal friction, and suspension parameters. That's what you should check at first. A wrong z value can be caused by a bad set up suspension. The wheel must not touch the chassis when the suspension is fully compressed.

Just to be sure: Are you just using the PhysX car or making one yourself? Obviously making a car is more difficult than just driving it.
Posted By: 3run

Re: Problems with wheels - 09/27/11 17:34

I just tried to get "knights on wheels" work with different level and I got the problems I've explained above. Same I've faced while making my own car physics, so I don't think I've made something wrong. I didn't use any other car model, used same as in knights on wheels.
Posted By: 3run

Re: Problems with wheels - 09/28/11 06:08

So, should I provide something like video or demo?
Posted By: jcl

Re: Problems with wheels - 09/28/11 08:51

Not for me. I hope you understand that I don't have the possibility to individually help all users with their projects.

I can just advise that physics vehicles require a certain smoothness of the surface, and won't drive well on raw triangles. Use terrain for the ground. Also look in the manual about adjusting the car and suspension parameters. If you want to make your own car, you might get much more help on the nVidia PhysX forum - that was at least very helpful for me.
Posted By: 3run

Re: Problems with wheels - 09/28/11 09:48

Ohh, sorry but you misunderstood me jcl. I don't want you to help me individually with my project (I wont dare). I think I found possible bug, thats all I wanted to tell, I've asked here cause I was thinking that may be this is problem from my side. Anyway just to make things (and explanation as well) clear I'll upload video with problem I've faced.
Posted By: 3run

Re: Problems with wheels - 09/28/11 09:48

Ohh, sorry but you misunderstood me jcl. I don't want you to help me individually with my project (I wont dare). I think I found possible bug, thats all I wanted to tell, I've asked here cause I was thinking that may be this is problem from my side. Anyway just to make things (and explanation as well) clear I'll upload video with problem I've faced.
Posted By: jcl

Re: Problems with wheels - 09/28/11 11:16

Maybe there's some fundamental misunderstanding about the physics engine. You posted many times here with always similar problems. Please understand two things. We haven't made PhysX and can't fix its "bugs". And what you've told does not sound like a bug anyway.

Physics engines are not perfect, and problems like jerking wheels on low-poly ground are typical and must be addressed by the game developer. We've provided a simple car and a demo to show how to use it. You can just make your game from that demo and won't have problems with jerking wheels. But if you're more ambitious and want more realistic car behavior, you're free to create you own car, maybe with ball joints for the wheels as in ODE. But then you have to dig into the matter and address the same problems like any other game developer who uses car physics.
Posted By: 3run

Re: Problems with wheels - 09/28/11 15:49

Thats the thing jcl, there is same jerking behavior in knights on wheels from samples folder as well... My own physics based on it... Thats why I think that its implementation bug.
Posted By: 3run

Re: Problems with wheels - 09/28/11 16:49

OK, so first, here is the video, which I've made with knights on wheels:
Youtube link
And here is the demo project, to show you the problem:
Download link
Posted By: Quad

Re: Problems with wheels - 09/28/11 17:15

It all looks fine to me from the video.
Posted By: 3run

Re: Problems with wheels - 09/28/11 17:35

OMG... Are you serious? How can't you see that wheels don't move on surface smoothly, they simply jump on the top of the higher surface!!!
It moves smoothly from higher surface back to the ground one! Am I the only one who faced that problem!?
Posted By: FlorianP

Re: Problems with wheels - 09/28/11 19:44

If I drive up a curbstone with my car thats pretty much how it behaves.
Posted By: Quad

Re: Problems with wheels - 09/28/11 19:53

I drove up a curbstone with my car and this is what happened : http://dl.dropbox.com/u/4979264/kaza.jpg
Posted By: Superku

Re: Problems with wheels - 09/28/11 20:07

I think it looks pretty good, too, but here's a workaround:
Make wheels invisible, create visible but passable copies. Now set the position of the visible tires as follows:

vec_set(invisible.pan,visible.pan);
invisible.x = visible.x;
invisible.y = visible.y;
if(invisible.z > visible.z) invisible.z = visible.z; // high to low surface works smoothly
else invisible.z += (visible.z-invisible.z)*time_step;
Posted By: 3run

Re: Problems with wheels - 09/28/11 20:56

OK... I gave up, as I see you aren't interested in helping out... Just posting silly jokes around... That behavior isn't realistic, I know that all physical engines aren't perfect, but such behavior isn't acceptable! And this isn't physX problem or bug, you won't see anything similar in UNITY or UDK... This is problem with implementation of it in GS! I've made clear video which shows how wheels are jerking up, that will never happens with ODE, and you'll never see such behavior in other game engines which are using physX, I wonder why?! But OK leave it as it is if it's good enough for you guys. But I still don't see any reason to make high poly race track to make movement smooth and to update vehicles tilt and roll smoothly and realistic, not as if I used trace to get normals and then just simply change tilt and roll of model, at least thats how it looks at the moment... I wonder who even tried to run demo I've posted above... I'm pretty sure none of you did.

EDIT: Superku thank you for trying to help. At least someone tried to help.
Posted By: Quad

Re: Problems with wheels - 09/28/11 21:15

I actually did run the demo, open up gta4 and get near slowly to a pavement and same thing happens.

Also check what happens on the Visual Debugger. I understand your point but you are looking for solution on the wrong place, it does not really look like an implementation bug, and as a lot people said that's what most expect from the physx. you can always smooth between the values you get from physx engine as superku stated. (actually you SHOULD do it for physx objects with critical impact on gameplay, because sudden FPS drops/jumps can result in physx doing crazy things.)
Posted By: jcl

Re: Problems with wheels - 09/29/11 12:20

3run: I think you just have somehow the wrong approach. You're permanently complaining about problems in your game and expect that other people fix that for you. Instead you should just learn to use your tools.

All raycast cars determine the ground distances by casting rays from the wheel centers to the ground. The wheel will move upwards immediately when its center goes over a 90 degrees border, because then the distance changes suddenly. This is just logical and has nothing to do with a "bug". You can see this in hundreds of games. In a few games you won't see this because they don't use raycast cars or the level designer has hidden that effect with a solution as suggested by Superku.

Either be content with the current solution, or go and learn and improve it. With merely complaining you won't achieve anything.
Posted By: ventilator

Re: Problems with wheels - 09/29/11 12:40

i don't know about physx but other physics engines like newton and bullet can cast rays with any of the supported convex collision shapes. not just as an actual ray without any thickness. this way the problem can be avoided but of course this also takes more performance.
Posted By: 3run

Re: Problems with wheels - 09/29/11 13:56

Why not making shapes for rays? Or is it same problem with PhysX?
Posted By: jcl

Re: Problems with wheels - 09/29/11 14:16

Rays have no thickness in PhysX. I'm no expert for Bullet or Newton, but AFAIK the Bullet raycast car has no thick rays either, and Newton has no raycast car at all, at least not when I last checked - you had to program it manually.
© 2024 lite-C Forums