[SOLVED] bouncing on joints = EXPLOSION

A place to discuss everything related to Newton Dynamics.

Moderators: Sascha Willems, walaber

Re: bouncing on joints = EXPLOSION

Postby Dave Gravel » Mon May 07, 2018 5:57 pm

Very nice for the Gyro effect.
For my part I use my personal engine.
Black_Bird use Unity.

I have test with any joint solver the effect is the same or with very little differences.
You can see a big difference with the world solver 8, but it happen only 1 time on 10.
I think it happen with other world solver too, but the reduction is higher with solver 8.

You can see at 4:00min I set the world solver to 8, and you can see sometimes the bounce on joint is not present. With other solver it happen too but the reduction is more little and it is less visible.

https://www.youtube.com/watch?v=S6awpje2evw
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: bouncing on joints = EXPLOSION

Postby Julio Jerez » Mon May 07, 2018 6:21 pm

It is possible for me to get a executable that link to the newton DLL, so that I can debug it?

If so can you remove all the other demos and leave only the repro.
Julio Jerez
Moderator
Moderator
 
Posts: 12249
Joined: Sun Sep 14, 2003 2:18 pm
Location: Los Angeles

Re: bouncing on joints = EXPLOSION

Postby Dave Gravel » Mon May 07, 2018 8:09 pm

Here a demo from my personal engine.
Download:
http://www.mediafire.com/file/7x3xjpg7hti811k/OX_EngineV5_Experimental_test.zip

I have build a release and debug version for the test.
Just to open the editor mainEngine.exe
Press the play button or press the eye button.
If you press the eye button you need to choice the demo bounceJoint.ini in the list.
If you press play it start directly with the bounceJoint.ini demo.

Edited:
When the demo is started you can use the mouse to rotate the view and the mouse wheel for zoom.
You can press U to give force on the body or just to use the mouse.
F1 Hide the GUI, If you change a newton world option just to press reset scene.

If you use the debug exe when the 3d window is open place it in the corner,
Because if newton give a assert error the error is hide by the 3d window, because it is stay on top.

If you get any other error sorry, I'm currently work on it for arrange and fix stuff.
It's surely better to make this test in newton demo, but i'm a bit lost for now with all new changes.
I never have test this engine in a other computer or video card, sorry again if it don't work or something.

Edited:
You can change the material collision on the Cube5 wall, and the front part box.
(soft,elast,sfric0,kfric0,sfric1,kfric1)

bLiftFour.SetMaterialCollision(0.01,0.01,0.5,0.5,0.5,0.5)
bLiftFour.InitNewton()

Cube5.SetMaterialCollision(0.01,0.01,0.5,0.5,0.5,0.5)
Cube5.InitNewton()

PS:
If you try other demos, if exemple the vehicle go ouside the world it can generate a error.
Or if you change the script in the editor and if you make a error, It can generate a error in the engine.
I have add many new objects in the base script, the customjoints dll and more.
I don't have finish to add it in the garbage list when a error happen in the script to clear it without problem.

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: bouncing on joints = EXPLOSION

Postby blackbird_dream » Tue May 08, 2018 3:14 am

Thks a lot for your great job. I hope you managed to fix the troubles.
I'm using Unity at the present time. But Dave was so kind he implemented the demo within his own engine.
User avatar
blackbird_dream
 
Posts: 354
Joined: Wed Jun 07, 2006 3:08 pm
Location: France

Re: bouncing on joints = EXPLOSION

Postby blackbird_dream » Wed May 09, 2018 4:42 pm

it's strange that it seems not determinist
User avatar
blackbird_dream
 
Posts: 354
Joined: Wed Jun 07, 2006 3:08 pm
Location: France

Re: bouncing on joints = EXPLOSION

Postby blackbird_dream » Tue May 22, 2018 6:12 am

Julio
do you need my test demo under Unity ?
User avatar
blackbird_dream
 
Posts: 354
Joined: Wed Jun 07, 2006 3:08 pm
Location: France

Re: bouncing on joints = EXPLOSION

Postby Julio Jerez » Fri May 25, 2018 8:40 am

Ok the change to deal with gyro torque is going to take longwe than I estimated.
I restored the engine to an older version, with the changes that do not relate to gyro calculation.
I now got the new Unity and I am updating the plugin .

I though you posted those repro demos that show the bug but I do not see them now, can you save them some where were I can get them?
blackbird_dream wrote:config 1:
Image
here the test :
https://www.youtube.com/watch?v=QQBbRZiL-j4

config 2:
Image
https://www.youtube.com/watch?v=c76UyksFStk

But the 2 demos should behave exactly the same
Julio Jerez
Moderator
Moderator
 
Posts: 12249
Joined: Sun Sep 14, 2003 2:18 pm
Location: Los Angeles

Re: bouncing on joints = EXPLOSION

Postby Julio Jerez » Fri May 25, 2018 9:26 am

ok I got the new unity and the plugin is updated to latest version.

let us forget all the other stuff at the begining of the thread and start over.
can you upload the test demos in the video somewhere, so that we test the same thing you are doing?

The videos seems like a simple problem, and it is what I have been trying to solve for a long time, at that mass ratios it seems the solver should be able to solve as if they were a compound collision shape.
This was working before therefore the should be either a bug or a good explanation for that behavior.
Julio Jerez
Moderator
Moderator
 
Posts: 12249
Joined: Sun Sep 14, 2003 2:18 pm
Location: Los Angeles

Re: bouncing on joints = EXPLOSION

Postby blackbird_dream » Mon May 28, 2018 4:45 am

I uploaded the basic unity demo here :
https://ufile.io/81syc
Hope nothing's missing
User avatar
blackbird_dream
 
Posts: 354
Joined: Wed Jun 07, 2006 3:08 pm
Location: France

Re: bouncing on joints = EXPLOSION

Postby Sweenie » Mon May 28, 2018 8:58 am

Here is a simple test case(not Unity but a custom .NET engine) as well demonstrating the problem in case debugging with Unity is problematic. It uses the dll version of Newton.
http://www.svenberra.net/bounce.zip

Just run the exe and hit space to give the green cube some velocity. A red smaller box is attached to the green box with a slider actuator(can be controlled with up and down arrows). Rotate the camera by holding the right mouse button. Move camera with WASD keys.
Red box mass = 1.0 and green box mass = 50.0.

The joints seems to be stiff again(compared to a couple of days ago), but the excessive bounce force due to mass ratios is still there. But I understood that is an issue that's been there for some time.
Sweenie
 
Posts: 498
Joined: Mon Jan 24, 2005 7:59 am
Location: Sweden

Re: bouncing on joints = EXPLOSION

Postby blackbird_dream » Mon May 28, 2018 10:15 am

exactly.
It's clear with your demo too the energy restored is higher than the initial energy.
User avatar
blackbird_dream
 
Posts: 354
Joined: Wed Jun 07, 2006 3:08 pm
Location: France

Re: bouncing on joints = EXPLOSION

Postby Julio Jerez » Mon May 28, 2018 10:36 am

Ok I now got Sweeney demo.
It reproduce quite clear, let us see what is wrong, and testing with that now.
Julio Jerez
Moderator
Moderator
 
Posts: 12249
Joined: Sun Sep 14, 2003 2:18 pm
Location: Los Angeles

Re: bouncing on joints = EXPLOSION

Postby Julio Jerez » Mon May 28, 2018 11:16 am

Sweeney when I try to debug it I get a crash in this function

Code: Select all
void NewtonMeshApplyBoxMapping(const NewtonMesh* const mesh, int front, int side, int top, const dFloat* const aligmentMatrix)
{
   TRACE_FUNCTION(__FUNCTION__);
   dgMatrix matrix(aligmentMatrix);
   dgMeshEffect* const meshEffect = (dgMeshEffect*) mesh;
   meshEffect->BoxMapping (front, side, top);
}


no sure how it got there, there is not call stack.
> newton.dll!NewtonMeshApplyBoxMapping(const NewtonMesh * const mesh, int front, int side, int top, const float * const aligmentMatrix) Line 7819 C++
[External Code]

are you using an older version of the engine?

I will try to load blackbird demo and if I can no debug it I will tyr to recreate the demo in the sandbox.
Julio Jerez
Moderator
Moderator
 
Posts: 12249
Joined: Sun Sep 14, 2003 2:18 pm
Location: Los Angeles

Re: bouncing on joints = EXPLOSION

Postby Sweenie » Mon May 28, 2018 12:50 pm

Hmm, strange that it crashes.
That function is called in my demo though because I use a box collision to create the cube primitive and newtonmesh to generate vertexdata and the uv coords.
The function is called from c# though so that might explain why you cant see the callstack.
I cloned and built the dlls today so it should be the lastest version.
X64 release version.

It should be easy to setup in the sandbox though.
Just attach two boxes with any joint since it's not specific to the slider actuator. Got the same result with a hinge joint.
Make one body have a mass of 1 and the other 50. Then push the heavy body against a static wall making sure the lighter body hits the wall first.
Sweenie
 
Posts: 498
Joined: Mon Jan 24, 2005 7:59 am
Location: Sweden

Re: bouncing on joints = EXPLOSION

Postby Julio Jerez » Mon May 28, 2018 1:59 pm

let us not worry about that I can run it an see what is does, I can recreated in teh sand box.
This are case whe an exporter can come handy.
anyway le me see what I find.
Julio Jerez
Moderator
Moderator
 
Posts: 12249
Joined: Sun Sep 14, 2003 2:18 pm
Location: Los Angeles

PreviousNext

Return to General Discussion

Who is online

Users browsing this forum: No registered users and 15 guests

cron