Kinematic Cylinder Collision size problem.

Report any bugs here and we'll post fixes

Moderators: Sascha Willems, Thomas

Re: Kinematic Cylinder Collision size problem.

Postby Julio Jerez » Fri Sep 13, 2019 8:38 pm

I think I have fix now, please try again.
Julio Jerez
Moderator
Moderator
 
Posts: 11039
Joined: Sun Sep 14, 2003 2:18 pm
Location: Los Angeles

Re: Kinematic Cylinder Collision size problem.

Postby Dave Gravel » Fri Sep 13, 2019 10:09 pm

It is strange, In the newton sdk demo it look like fixed.
When I try in my engine I get again the same error.
The cylinder seen to work a lot better now, But I get again the crash at same place when I delete a body.
Is it possible that the static lib loaded by the demo have difference with the newton dll build ?
You search a nice physics solution, if you can read this message you're at the good place :wink:
OrionX3D Projects & Demos:
https://www.facebook.com/dave.gravel1
http://orionx3d.googlepages.com/
https://www.youtube.com/user/EvadLevarg/videos
User avatar
Dave Gravel
 
Posts: 713
Joined: Sat Apr 01, 2006 9:31 pm
Location: Quebec in Canada.

Re: Kinematic Cylinder Collision size problem.

Postby Julio Jerez » Fri Sep 13, 2019 10:20 pm

they should be the same, there may be some other bug that work on but can fail on othe projects.
can you make the test and send to me for debug later.
Julio Jerez
Moderator
Moderator
 
Posts: 11039
Joined: Sun Sep 14, 2003 2:18 pm
Location: Los Angeles

Re: Kinematic Cylinder Collision size problem.

Postby Dave Gravel » Fri Sep 13, 2019 10:34 pm

Here the demo:
https://www.mediafire.com/file/lusrjolk ... _Crash.zip

If I reset the scene when the box is on air it seen to always work good.
If the box touch the floor the error start to happen.

I have add two exe's in the zip, One with the kinematic cylinder and one with only the box.
Sometimes the box don't seen to sleep and the error happen anyway.
I have try to debug the exe with visual studio and it show me again the same place.
You search a nice physics solution, if you can read this message you're at the good place :wink:
OrionX3D Projects & Demos:
https://www.facebook.com/dave.gravel1
http://orionx3d.googlepages.com/
https://www.youtube.com/user/EvadLevarg/videos
User avatar
Dave Gravel
 
Posts: 713
Joined: Sat Apr 01, 2006 9:31 pm
Location: Quebec in Canada.

Re: Kinematic Cylinder Collision size problem.

Postby Julio Jerez » Sat Sep 14, 2019 10:01 am

you were right there was a big bug, my first fix did not cover all cases but I beleive this one does now.
please try again.
I need to do the same thing for joints, but let us see if thsi work for you too.
I tested it in exe ox3D_PureGL_Crash.exe

I can see hwo you have a work around by calling invalidatecashe, but you do no nee to do it any more.
that function is quite expensive to be called each time a body is deleted, and is not meant to be called from with in an update either.
Julio Jerez
Moderator
Moderator
 
Posts: 11039
Joined: Sun Sep 14, 2003 2:18 pm
Location: Los Angeles

Re: Kinematic Cylinder Collision size problem.

Postby Dave Gravel » Sat Sep 14, 2019 11:21 am

Yes nice this fix look to work good for me now :) Thanks you!!
You search a nice physics solution, if you can read this message you're at the good place :wink:
OrionX3D Projects & Demos:
https://www.facebook.com/dave.gravel1
http://orionx3d.googlepages.com/
https://www.youtube.com/user/EvadLevarg/videos
User avatar
Dave Gravel
 
Posts: 713
Joined: Sat Apr 01, 2006 9:31 pm
Location: Quebec in Canada.

Re: Kinematic Cylinder Collision size problem.

Postby Julio Jerez » Sat Sep 14, 2019 11:47 am

On the first bug the colder collision on the side.
The problem is the the cylinder is an implicit surface.
The algorithm can only generate a point or edge collision.
But if the cylinder is very big, the the edge start to look like a flat surface that can only generate and edge contact.
So if a fast moving small object land on the side it will always be unstable because it will role around the edge.
This does not happen with small cylinders because the curvature is bigger and the rolling does not penetrate the cylinder surface.

We should not fix that because we have convex Hull to emulate large surfaces like that.

They using a convex Hull for large surfaces the may look flat.
Is kind of like a flat Earth thing
Julio Jerez
Moderator
Moderator
 
Posts: 11039
Joined: Sun Sep 14, 2003 2:18 pm
Location: Los Angeles

Re: Kinematic Cylinder Collision size problem.

Postby Dave Gravel » Sat Sep 14, 2019 11:56 am

Yes no problem for me, Like I have say before my need is only with the top collision.
I understand that is a complex collision situation and it can cost so much to get it perfecly.
The top collision seen to work very good for my need now.
Thanks again.
You search a nice physics solution, if you can read this message you're at the good place :wink:
OrionX3D Projects & Demos:
https://www.facebook.com/dave.gravel1
http://orionx3d.googlepages.com/
https://www.youtube.com/user/EvadLevarg/videos
User avatar
Dave Gravel
 
Posts: 713
Joined: Sat Apr 01, 2006 9:31 pm
Location: Quebec in Canada.

Re: Kinematic Cylinder Collision size problem.

Postby Julio Jerez » Sat Sep 14, 2019 1:24 pm

it will be ok as long as the small box does not moves very fast hitting the edge.
is like a box try to sit on top of a large sphere.

this will happen for all implicit shape (spheres, capsule, cylinder and) they can not support othe object resting on them because the do not generate plane contacts.

maybe one day we can add a feature the check teh curvature and it is too small the is polygamize it to a patch. but for now this is not a big problem.

I am now adding more work to my robot test.
Julio Jerez
Moderator
Moderator
 
Posts: 11039
Joined: Sun Sep 14, 2003 2:18 pm
Location: Los Angeles

Previous

Return to Bugs and Fixes

Who is online

Users browsing this forum: No registered users and 0 guests

cron