Newton 3.14 vehicle problem

Report any bugs here and we'll post fixes

Moderators: Sascha Willems, Thomas

Re: Newton 3.14 vehicle problem

Postby e3dalive » Mon Feb 08, 2016 1:57 pm

almost a week has passed :)
i have more debugging info
the way car get's send into space is directly influenced by the fact that car loses it's wheel[distance from wheel to car is very high] that causes some internal calculations get's messed up. I suggest some way to reset wheel joint or limit max distance from joint to place where you attach the joint to prevent that condition or at least to limit it. How are you doing on the jumping bug any progress?
e3dalive
 
Posts: 87
Joined: Thu Feb 05, 2015 5:20 am

Re: Newton 3.14 vehicle problem

Postby Julio Jerez » Mon Feb 08, 2016 6:58 pm

that funny I was going to make a post like that last night.
Yes I found that out while fixing the collision bug and I am fixing that first.
this is in fact the most important bug, it will take few more day to fix.
in 3.13 that was no happening because the kinematics did not let the spring pass their limit, by in 3.14 I took that out, and I see that is really does need it, if a tire pass the limit the toque is apply to the vehicle can be quite high I the suspension if too strong.
I am working the bug now.

that was a really good find, it too me a lot of debugging to figure it out. :D
I have to undo a week of work, because I was working some that was not broken.

The jump bug I believe I have fix but I have not tested because I was try to fix the other tire limit bug.
Julio Jerez
Moderator
Moderator
 
Posts: 11044
Joined: Sun Sep 14, 2003 2:18 pm
Location: Los Angeles

Re: Newton 3.14 vehicle problem

Postby e3dalive » Tue Feb 09, 2016 4:49 am

That's good news to hear.
Can you commit the code so i can test that the jump bug is fixed?
I will be waiting :)
e3dalive
 
Posts: 87
Joined: Thu Feb 05, 2015 5:20 am

Re: Newton 3.14 vehicle problem

Postby Julio Jerez » Tue Feb 09, 2016 10:47 am

I am still writing the function to fix the problem. It will be by this Friday at most.
Julio Jerez
Moderator
Moderator
 
Posts: 11044
Joined: Sun Sep 14, 2003 2:18 pm
Location: Los Angeles

Re: Newton 3.14 vehicle problem

Postby Julio Jerez » Tue Feb 09, 2016 3:37 pm

here is a question, I see that you have very cool meshes, it is possible I can borrow a small sample mesh to use as a arena to test the vehicle?
I have two samples by the cool looking one was give to me long time ago, and is very corrupt file because if full of double side faces, the second one is a sample form a height map so is a rolling terrain that does not reflect typical map.
Julio Jerez
Moderator
Moderator
 
Posts: 11044
Joined: Sun Sep 14, 2003 2:18 pm
Location: Los Angeles

Re: Newton 3.14 vehicle problem

Postby e3dalive » Tue Feb 09, 2016 3:54 pm

here I've serialized it into bin file for you https://www.dropbox.com/s/tp8vvjlknzwbc ... e.bin?dl=0 it's the same map i usually record videos with new newton physics
e3dalive
 
Posts: 87
Joined: Thu Feb 05, 2015 5:20 am

Re: Newton 3.14 vehicle problem

Postby Julio Jerez » Sun Feb 14, 2016 12:22 pm

Ok please try that.
to expose the engine info I have to make a interface change. you have to make that change

The vehicle now can be front wheel drive, rear wheel drive and four wheel drive, for this it has to axel that you initialize top the tire that will do the driving.
if is two wheel drive then the second axel is initialized to point NULL wheel.
the tire now have strong hard limit, so the should no move out of the suspension limit, (no withstanding numerical error).

The biggest change is the fix for the edge contacts, for this I have to add the custom collision call back to the material system.
tire contact are very different that rigid body contacts, the are can't be discrete contact or continues collision contacts. they are a mix of the two. but the engine does not support that form the NewtonUpdate, in only support as a engine collision function.

My mistake was that I was letting the engine compute a contact, and the remove so that I calculate the new convex cast contact, this in addition to be slow, it also wrong because the contact is already in penetration.
The only way to fix is by let the engine calculate the correct soft tire contact at the proper time, so I added the call back to support that.
this functionality actually open Newton for a to third part collision system.

I test is on a texelated mesh, and I saw no major problems. by the mesh is flat
Please give a try and let me know how it works for you.

There are some feature I nee to add like the down force drag, because at almost 180 kmh the vehicle is stable by hard to control. here we nee to add down force aerodynamics drag.

I will next do the thread vehicle.
Julio Jerez
Moderator
Moderator
 
Posts: 11044
Joined: Sun Sep 14, 2003 2:18 pm
Location: Los Angeles

Re: Newton 3.14 vehicle problem

Postby Julio Jerez » Sun Feb 14, 2016 12:38 pm

In my machine an old intel I7-2600 3.4 ghz
I can place 100 wheel cars with about 200 bodies and is runs under 10 ms, in one thread.
with two thread it take about 7 ms.
however a large portion of the cost in no in the engine, is in the code that calculates the steering value to drive the NPC cars. so the actual physic code is about 8 ms for 100 regular cars.
Julio Jerez
Moderator
Moderator
 
Posts: 11044
Joined: Sun Sep 14, 2003 2:18 pm
Location: Los Angeles

Re: Newton 3.14 vehicle problem

Postby e3dalive » Mon Feb 15, 2016 7:23 am

Hello, it's been a week)) It's still jumping :( I've uploaded the video and also dumped the torque values that i sent to engine, check them maybe they are too high https://www.dropbox.com/s/oprm632srwjvci2/dump.txt?dl=0 video here https://youtu.be/qPgkvAdh5Z0
the good thing that car seems to no longer explode!
did you try to load serialized scene from the post above?
e3dalive
 
Posts: 87
Joined: Thu Feb 05, 2015 5:20 am

Re: Newton 3.14 vehicle problem

Postby Julio Jerez » Mon Feb 15, 2016 9:41 am

um it look very bad, are you sure you god the later.
I made a large change to fix the contact bug, this is the same collision code that was used in 3.13 only that I added the call back for the engine to handle as oppose to what was doing in 3.13.
Maybe there is still a bug.

I guess I need to test it wit a better mesh, all my demo mesh are too regular to expose the bug that you show me.

The problem with the serialized mesh is that I can not extract part of a serialized mesh to use with a different demo because they are binary dump.
I could write an utility to do that but I do not want to spend time on that.

I was think of some mesh sample in a FBX format that can expert to the forma I use in the demos
do you have a small sample mesh of rod that reproduce that bug that you can share.
The meshes I have do not have the kind of revelation you are using. an dis hard for me to find place when the bug exactly happens.
Julio Jerez
Moderator
Moderator
 
Posts: 11044
Joined: Sun Sep 14, 2003 2:18 pm
Location: Los Angeles

Re: Newton 3.14 vehicle problem

Postby e3dalive » Mon Feb 15, 2016 10:56 am

My update from your git/svn doesn't work it just says error, so i downloaded latest version from github directly, i think it's the latest one, because car jumping is much different then in previous version.
I have uploaded few
here's few meshes for you https://www.dropbox.com/s/wx7o7jxx9n1zv ... R.rar?dl=0 and https://www.dropbox.com/s/mvbjm6xmnx06i ... R.rar?dl=0
when loading them ignore all meshes that start with AI_ that way you get pure data. How i position them, i compute BBox from the mesh and do a tight fitting so there would be no distance between 2 meshes.Position them like this [][][][][][][] 8meter ones and try it
e3dalive
 
Posts: 87
Joined: Thu Feb 05, 2015 5:20 am

Re: Newton 3.14 vehicle problem

Postby Julio Jerez » Mon Feb 15, 2016 11:52 am

Thank you tonight, I will load in Max and see what I can clean up, that I will try with a mesh.
I will only use a small fraction that let me detect the bug.
Julio Jerez
Moderator
Moderator
 
Posts: 11044
Joined: Sun Sep 14, 2003 2:18 pm
Location: Los Angeles

Re: Newton 3.14 vehicle problem

Postby Julio Jerez » Mon Feb 15, 2016 12:01 pm

I quickly open them up in Max , and to me the streets are just tow big flat triangles.
are you saying that in the flat mesh the tire are bouncing all over the place like in eh video?
Julio Jerez
Moderator
Moderator
 
Posts: 11044
Joined: Sun Sep 14, 2003 2:18 pm
Location: Los Angeles

Re: Newton 3.14 vehicle problem

Postby e3dalive » Mon Feb 15, 2016 4:46 pm

The car is moving on a flat mesh plane, it's bouncing off when it's between mesh#1 and mesh#2, the whole road is basicly road meshes stuck together with 0 gaps, at that point the car is bouncing. You can see the 0 gap between meshes in this video https://www.youtube.com/watch?v=gwh4WJnC0-8 at 0:39
i've also upload various front road meshes in max format for you https://www.dropbox.com/s/7dsl8rsx3pd1u ... 2.rar?dl=0 hope that will help.
e3dalive
 
Posts: 87
Joined: Thu Feb 05, 2015 5:20 am

Re: Newton 3.14 vehicle problem

Postby Julio Jerez » Mon Feb 15, 2016 5:21 pm

isn't this https://www.youtube.com/watch?v=gwh4WJnC0-8 and older build?
I think I know what My mistake was.

when the tire were doing discrete collision, the collision assume a 1.0/32.0 of penetration.
this allowed for the collision to move smooth form frame to frame.

Now I change the to be continue Collison by doing a convex sweep, what this does is that the tire now have a zero penetration.
by doing this is possible that the tire may be very close to eh ground and the collision return a failure
and report zero, then the tire is under the influence of the spring only and sync the spring is very strung is get pushed down.

The in turn cause a deep penetration which the solve need to resolver by pushing the tire up with a constant velocity for a few frames until is clear the ground, and the it the effect repeat again.

actually as bad as this video looks, https://youtu.be/qPgkvAdh5Z0
is very realistic, unwanted but realistic.
This is what happen when a car has a super inflated tire, or when the shock absolver are damaged.
basically the ground at as a high stiff spring and tire keep bounce off the ground.

The solution Is that I need to allow for the tire deflation. Basically this is the value that the tire is allow to deform when I hit the ground and allow for contact continuity form frame to frame.

I will fix it tonight.
Julio Jerez
Moderator
Moderator
 
Posts: 11044
Joined: Sun Sep 14, 2003 2:18 pm
Location: Los Angeles

PreviousNext

Return to Bugs and Fixes

Who is online

Users browsing this forum: No registered users and 2 guests