About joints.

Report any bugs here and we'll post fixes

Moderators: Sascha Willems, Thomas

About joints.

Postby Dave Gravel » Tue Jun 26, 2018 11:21 am

Hi Julio, what can cause this problem ?
It is again related with the gyro force ?
Or something go wrong with the local matrix ?
When the objects touch the floor it don't seen to cause problem.
The problem appear when you move the jointed objects in air.
I have pretty much the same problem with my vehicle when it is in air or on the top side.

https://www.youtube.com/watch?v=GU1T8mxcohQ


Other video:
https://www.youtube.com/watch?v=qw8dtHydC2s

Thanks...
You search a nice physics solution, if you can read this message you're at the good place :wink:
OrionX3D Projects & Demos:
https://orionx3d.sytes.net
https://www.facebook.com/dave.gravel1
https://www.youtube.com/user/EvadLevarg/videos
User avatar
Dave Gravel
 
Posts: 800
Joined: Sat Apr 01, 2006 9:31 pm
Location: Quebec in Canada.

Re: About joints.

Postby Julio Jerez » Tue Jun 26, 2018 12:07 pm

Oh wow that looks bad, just to make sure you are not in build with some work in progress hack, can you sync to later and recreate the same bug, then tell me what to do to make it on my side.

One of the problem that is still pending is that the code that calculated gyro acceleration in the pass was removed in favor of a more general one.
I thought I put back until after I finish the parallel solver, but may be I forget something.

Is time to get that fix now.
Julio Jerez
Moderator
Moderator
 
Posts: 12249
Joined: Sun Sep 14, 2003 2:18 pm
Location: Los Angeles

Re: About joints.

Postby Dave Gravel » Tue Jun 26, 2018 12:32 pm

With the sync I get same problem.
The problem have appear when you have work about the gyro.
It is why I have talk about it.
I don't have report it before because at this time you worked on other problems.
Maybe it come from a bad setup i'm not sure, but I get similar problem with my vehicle in my script engine.

In the standardjoint demo let's only the AddCylindrical
Add some mass to make it no static and try to move it with the mouse.

Edited with sync :
https://www.youtube.com/watch?v=HIUYw63VYE8

Thanks.
You search a nice physics solution, if you can read this message you're at the good place :wink:
OrionX3D Projects & Demos:
https://orionx3d.sytes.net
https://www.facebook.com/dave.gravel1
https://www.youtube.com/user/EvadLevarg/videos
User avatar
Dave Gravel
 
Posts: 800
Joined: Sat Apr 01, 2006 9:31 pm
Location: Quebec in Canada.

Re: About joints.

Postby Julio Jerez » Tue Jun 26, 2018 3:05 pm

Dave Gravel wrote:Maybe it come from a bad setup i'm not sure, but I get similar problem with my vehicle in my script engine.


Oh no you are not doing anything wrong, this is part of a work in progress for the joint system.
I am now start integration the joint with the parallel solver, and that problem will be take care off.

I is long and uninteresting to explain, I will try later, but believe of no this is a step of the right direction for the engine, what you see there is the behavior I expect, the problem is that there are three parts to get the Gyro torques right and only one is implemented,
the second is commented out and the third, in the joints ahs no been implemented yet.

But I will work on that fix this weekend.
that's a good repro case that you added.
Julio Jerez
Moderator
Moderator
 
Posts: 12249
Joined: Sun Sep 14, 2003 2:18 pm
Location: Los Angeles

Re: About joints.

Postby Dave Gravel » Tue Jun 26, 2018 3:49 pm

Good I can continue my vehicle tests.
In my vehicle the projection tire matrix help to not explode the joints, I can work and test my stuff without so much trouble.
No prob about the explanation :P , I see what, or I can imagine.
Good about the 3 gyro parts, and I understand how complex it is with multithreading and overall in the engine.

Thanks Julio.
You search a nice physics solution, if you can read this message you're at the good place :wink:
OrionX3D Projects & Demos:
https://orionx3d.sytes.net
https://www.facebook.com/dave.gravel1
https://www.youtube.com/user/EvadLevarg/videos
User avatar
Dave Gravel
 
Posts: 800
Joined: Sat Apr 01, 2006 9:31 pm
Location: Quebec in Canada.

Re: About joints.

Postby Dave Gravel » Thu Aug 30, 2018 5:14 am

Hi Julio, I get again the problem with my vehicle tire.

The problem seen to come from the cylinderchamfer shape rotation.
I can reproduce the problem by using the mouse.
You can watch In the video at 2:00, 2:26, 3:06 mins.

I can reproduce it on the vehicle tire, with the vehicle it seen to happen faster.
Surely because the tire joint receive more force from the main body and spring.
With the vehicle the problem seen to happen when the tire is on the air and when it touch nothing.
You can watch In the video at 4:00, 4:20, 16:45 mins.

I can reproduce the same cylinderchamfer rotation problem without joint too.
You can watch In the video at 9:30, 11:50, 31:15 mins.

From the cylinderchamfer again I get something strange from the collision material.
When I set the friction to 0 some parts of the cylinderchamfer seen to have different friction.
You can watch In the video at 6:42 mins.

I get a other problem with my mesh, When the tire roll over some edges the tire seen to get some glue and it can stop the vehicle on place.
It don't happen all times but it is frequente.
You can watch In the video at 15:24, 17:50, 29:40 mins.

The friction seen to behave differently now, Because in older newton with friction set to around 1.7 and more on the tires the car go easy on the top when it turn.
Now I need to go over 2.0 of friction to get the car on the top when it turn.
You can watch In the video at 22:36 mins.

Video:
https://www.youtube.com/watch?v=b9xAYTrFkhk


Thanks.
You search a nice physics solution, if you can read this message you're at the good place :wink:
OrionX3D Projects & Demos:
https://orionx3d.sytes.net
https://www.facebook.com/dave.gravel1
https://www.youtube.com/user/EvadLevarg/videos
User avatar
Dave Gravel
 
Posts: 800
Joined: Sat Apr 01, 2006 9:31 pm
Location: Quebec in Canada.

Re: About joints.

Postby Julio Jerez » Thu Aug 30, 2018 2:15 pm

wooo, that looks quiet wrong.
Let me get to an stable point with the last tow optimization I am making to the collision system, and I will switch to the Joints again.

I am thinking to make a new vehicle with all the knowledge that I have accumulated.
we now have an exact solve that we can use to plug many part to a vehicles.
In the pass this was very slow because is was a direct solver, but now is work on linear time.

however there are still some problem when making the vehicle as a general reduce coordinate system articulated body so ta is can work with solver.
we already have the articulated class that can be use for that to make any kind of generator vehicle that can be simulated form a linearization of the state of the vehicle is reduce system.

however once a vehicle goes at high speed the equation are too not linear and the must be solve in generalize coordinate system, the rigid body solver can't do that very well.

It is better to implement the vehicle like we have in the pass, as a generalize coordinate system articulated body, and the all the forces are added as external forces.
The problems in the pass was that this was always very expensive to simulate because the solve was expensive, that problem does not exist anymore.

Next week let us start a new vehicle that will include all the knowledge that we have learned form all previous tries.
This will be a vehicle that will be specialized for motion at high speed wit no too many complications.

we will keep the existing one, and only of the new we is clearly better will removed the old, and we will try to keep the same interface.
Julio Jerez
Moderator
Moderator
 
Posts: 12249
Joined: Sun Sep 14, 2003 2:18 pm
Location: Los Angeles

Re: About joints.

Postby Dave Gravel » Thu Aug 30, 2018 5:03 pm

Thanks Julio.

At the begin I have think it coming from the Joint, After many tests i'm pretty sure it coming from the cylinderchamfer and I can reproduce it without joint. Maybe my vehicle setup is not the best and I use a very old method, but in general the vehicle is really stable.
Currently all forces is done and apply from the SimulationPreListener.
My vehicle joint can work without projection tricking, but the tire is not stable when the vehicle turn or at high speed. I need to use the tire projection to get the tire stable at high speed or when it turn. If I don't use the projection the tire do some wobble because it trying to correct the joint tire errors.
In both setup with or without projection the tire do the rotation problem like I show in the video.
The vehicle simulation work very nice if the tire always touch the floor, surely because the tire rotation is more limited in this case.

I'm not sure but I think the chamfer rotation problem have start when you have remove the NewtonBodySetMaxRotationPerStep.

I'm able to run this vehicle simulation at 1/60, it is a lot better at 1/120 but for a multibody joint I find it very good to can run it at 1/60.

The main goal of my video is to show the rotation problem with the cylinderchamfer. I don't have test the same rotation problem over all objects shape but it don't seen to happen with box for exemple.
The cylinderchamfer rotation problem is more easy to reproduce if the material friction is high on the chamfer.
The other important problem is about the tire contact glued to the edges mesh. This problem is pretty new because I don't get it from older newton 1 or 2 months before.

I'm all yes for a new vehicle, Just the method that I use is very easy to implement a quick vehicle simulation with pretty good result. It have always work on older newton version and continue to work very good with the newer version. The only real problem for now is about the tire cylinderchamfer shape rotation, I'm not 100% sure but very close hehe.
Maybe I can try to use other tire shapes just for test how it behave, I can try it tonight and see if the tire do same rotating problem.

Thanks again, I back here later with my test result about using other tire shape.
Like I have say i'm open for test a new vehicle setup, but for me this method is very easy and simple to code in pascal and work good for me from a longtime already. The joint in self seen pretty stable, For now just the chamfer rotation and the material friction seen to behave a bit differently.
You search a nice physics solution, if you can read this message you're at the good place :wink:
OrionX3D Projects & Demos:
https://orionx3d.sytes.net
https://www.facebook.com/dave.gravel1
https://www.youtube.com/user/EvadLevarg/videos
User avatar
Dave Gravel
 
Posts: 800
Joined: Sat Apr 01, 2006 9:31 pm
Location: Quebec in Canada.

Re: About joints.

Postby Dave Gravel » Fri Aug 31, 2018 2:27 am

Hi Julio.
About the rotation problem:
Finally I have get the times to do more tests about the problem.
I have make my tire with all rounded shapes to see if the rotation problem is present with all.
The answer is yes all shape get the same result, It seen to happen when the rotation go over the physics limitation I suppose. I have test and find a quick hack for fix the problem in my vehicle joint.
The most important the problem is not the shape cylinderchamfer or any other shapes.
Maybe it can affect more the cylinderchamfer because the friction on the side, but it is not the problem.
The cylinderchamfer seen to behave differently about the material contact when it is on the side or in up position or on the edge side. All sides don't give the same material friction result, but maybe it is normal because how it is shaped.

The quick hack seen to fix good the rotation problem.
Maybe i'm totally wrong to use this way, maybe a better method exist, but for now it is the only working solution that I have find.

Video: Quick hack to fix the rotation.
https://www.youtube.com/watch?v=_HII3mU4Wa0


About the mesh gluted edges:
I have test the edges with all shapes too.
The sphere, cylinderchamfer, capsule all this shapes get the edges problem.
The cylinder don't seen to get this problem, Or it is very lower affected.
The capsule get the problem because the both spherical sides.

Video: Mesh edges collision problem.
https://www.youtube.com/watch?v=UIOisYlK3M4


Thanks.
You search a nice physics solution, if you can read this message you're at the good place :wink:
OrionX3D Projects & Demos:
https://orionx3d.sytes.net
https://www.facebook.com/dave.gravel1
https://www.youtube.com/user/EvadLevarg/videos
User avatar
Dave Gravel
 
Posts: 800
Joined: Sat Apr 01, 2006 9:31 pm
Location: Quebec in Canada.

Re: About joints.

Postby Julio Jerez » Fri Aug 31, 2018 10:13 am

Is this a new problem or has that always been there?
it seem very eassy to mak eit happens.

do yo have a test demo? with onle the car or soem object that reproduce it?
Julio Jerez
Moderator
Moderator
 
Posts: 12249
Joined: Sun Sep 14, 2003 2:18 pm
Location: Los Angeles

Re: About joints.

Postby Dave Gravel » Fri Aug 31, 2018 11:18 am

The edge problem seen new for me because I don't get this from older version, My last tests with this scene is around when you have make all changes for the engine and bounce joint problem.
I have update newton and it have start to happen.

I can remake a demo for this scene with only the car and the loop mesh, I need to clean some stuff from the engine and I comeback with the download link for the demo test.
I'm just not sure if my engine work good on other computer, I am the only tester for now hehe.
You search a nice physics solution, if you can read this message you're at the good place :wink:
OrionX3D Projects & Demos:
https://orionx3d.sytes.net
https://www.facebook.com/dave.gravel1
https://www.youtube.com/user/EvadLevarg/videos
User avatar
Dave Gravel
 
Posts: 800
Joined: Sat Apr 01, 2006 9:31 pm
Location: Quebec in Canada.

Re: About joints.

Postby Julio Jerez » Fri Aug 31, 2018 1:12 pm

Dave Gravel wrote:I have update newton and it have start to happen.

I can remake a demo for this scene with only the car and the loop mesh, I need to clean some stuff from the engine and I comeback with the download link for the demo test.

please do that and give the link so that I t can be debug, There has been so many tweaks and tuning that this may happens.
Julio Jerez
Moderator
Moderator
 
Posts: 12249
Joined: Sun Sep 14, 2003 2:18 pm
Location: Los Angeles

Re: About joints.

Postby Dave Gravel » Fri Aug 31, 2018 3:00 pm

Here the demo:

The demo need a video card compatible OpenGL 4.5, 4.6

Just for make sure that you don't get error from the sound system.
Go in folder Requirements\ and install the OpenAL dll oalinst.exe

You have 4 exe in the zip
mainEngine_release.exe - this exe use tire cylinderchamfer with newton release dll
mainEngine_release_cylinder_tire.exe - this exe use tire cylinder with newton release dll
mainEngine_debug_engine_only.exe - this exe use debug for the engine only and newton release dll
mainEngine_debug_dll.exe this exe use debug engine + newton debug dll

When you run the exe, It is supposed to open the script editor with the default demo script.
You can start the demo script by pressing the blue button with the arrow looking like a play button.

If all going good the 3d scene is supposed to open and start the simulation.

Use w,a,s,d for drive the car and spacebar for break.
With e you can add some wood fracture.

In the editor you can scrolldown in the script and find the lines 370,371,372,373
BVeh0.SetTireMaterial() for modify the tire material.
Save close the 3d window and press the play button again.

In the editor again you can modify the tire torque too, at this lines 509,510,511,512
vehicle01.SetTireTorque()
Save close the 3d window and press the play button again.

If you like to get the simulation time faster to get car sim at full speed.
In the 3D window, Inside the imgui Newton Options set the engine loop to 2.
You can adjust the TimeSlice to the desired simulation speed that you prefer for the car.
The precision is not good when you change the time value in my imgui menu, I need to fix it.

If you like to test the demo with stack fracture box too.
In the editor go at lines 344,345,346 and uncomment the pyramid save close the 3d window and press play.

If you like to change the mesh loop position go at line 338 in the editor.
Save close the 3d window and press play again.

Download link:
https://www.mediafire.com/file/k3ghqp83 ... gineV5.zip

Edited:
The camera is a bit crazy to setup I currently work on it, For my vehicle simulation.
Updated version with the current newton version 2018-09-04
New Download link:
https://www.mediafire.com/file/gcmeboaf ... dTest2.zip

Let's me know if something don't work.
Or if you need to test a other thing.

PS: In this demo build I use my hack in the joint to avoid the tire rotation problem.
The edge problem is present without the hack too.
I have try to change the tire soft or elastic material but it don't seen to help.

Thanks.
Last edited by Dave Gravel on Tue Sep 04, 2018 6:01 pm, edited 4 times in total.
You search a nice physics solution, if you can read this message you're at the good place :wink:
OrionX3D Projects & Demos:
https://orionx3d.sytes.net
https://www.facebook.com/dave.gravel1
https://www.youtube.com/user/EvadLevarg/videos
User avatar
Dave Gravel
 
Posts: 800
Joined: Sat Apr 01, 2006 9:31 pm
Location: Quebec in Canada.

Re: About joints.

Postby Julio Jerez » Fri Aug 31, 2018 3:29 pm

ok I will check it out tomorrow morning,
Hey David, I just committed the last optimization to the solve and collision.

assuming they are bug can you check it out with you 8 core ryzen.

last time you mention that was below 60, and am hopping these optimization provide that extra kick to make that 60 fps stable. at least I hope that the case.

anyway I am now going to focus on closing all these pending issue before start on he new vehicle.
Julio Jerez
Moderator
Moderator
 
Posts: 12249
Joined: Sun Sep 14, 2003 2:18 pm
Location: Los Angeles

Re: About joints.

Postby Julio Jerez » Fri Aug 31, 2018 3:46 pm

In my test I can see still deeps to the 30, 35 but a lot less than on this video


and it recover very quickly and states over 50 whe the stack are partially up, and when they collapse is way over 60.

I try :twisted: :evil: :lol: 8) with a 40 x 40 to see what happen and now the 40 x 40 is not much worse that the first video. :mrgreen: :mrgreen:

Let use see what if your result are also positive and then I will make a compare video tonight so that we can keep track of progress.
Julio Jerez
Moderator
Moderator
 
Posts: 12249
Joined: Sun Sep 14, 2003 2:18 pm
Location: Los Angeles

Next

Return to Bugs and Fixes

Who is online

Users browsing this forum: No registered users and 11 guests

cron