Exception in dNewton::OnCompoundSubCollisionAABBOverlap

A place to discuss everything related to Newton Dynamics.

Moderators: Sascha Willems, walaber

Re: Exception in dNewton::OnCompoundSubCollisionAABBOverlap

Postby Julio Jerez » Tue Nov 06, 2018 8:37 am

ah ok, when you get that let me know, try to make is simple so that I do not have to debug lot of stuff.
Julio Jerez
Moderator
Moderator
 
Posts: 11048
Joined: Sun Sep 14, 2003 2:18 pm
Location: Los Angeles

Re: Exception in dNewton::OnCompoundSubCollisionAABBOverlap

Postby Slick » Tue Nov 06, 2018 10:08 am

Ok I created a version that links to the latest debug dll. I added you on bitbucket to see it.
Slick
 
Posts: 266
Joined: Sat Feb 07, 2004 7:24 pm
Location: Los Angeles

Re: Exception in dNewton::OnCompoundSubCollisionAABBOverlap

Postby Julio Jerez » Tue Nov 06, 2018 10:36 am

hwo do I get it?
Julio Jerez
Moderator
Moderator
 
Posts: 11048
Joined: Sun Sep 14, 2003 2:18 pm
Location: Los Angeles

Re: Exception in dNewton::OnCompoundSubCollisionAABBOverlap

Postby Slick » Tue Nov 06, 2018 10:41 am

Sent you a message.
Slick
 
Posts: 266
Joined: Sat Feb 07, 2004 7:24 pm
Location: Los Angeles

Re: Exception in dNewton::OnCompoundSubCollisionAABBOverlap

Postby Julio Jerez » Thu Nov 08, 2018 6:28 pm

ok if you sync, I believed the bug is now fixed.
this was a bug on the newton side when using the dNewton cpp wrapper.
Julio Jerez
Moderator
Moderator
 
Posts: 11048
Joined: Sun Sep 14, 2003 2:18 pm
Location: Los Angeles

Re: Exception in dNewton::OnCompoundSubCollisionAABBOverlap

Postby Slick » Fri Nov 09, 2018 5:13 am

Yes I don't get the crash anymore. Thanks

I'm getting some weird collisions between my mesh and predefined objects but maybe that it my mesh parsing code. I will investigate.
Slick
 
Posts: 266
Joined: Sat Feb 07, 2004 7:24 pm
Location: Los Angeles

Re: Exception in dNewton::OnCompoundSubCollisionAABBOverlap

Postby Julio Jerez » Fri Nov 09, 2018 7:08 am

when I shot a ball I see it landing on the box on the floor, but is bounce very strangely, I am sure that no right, but if has for me to see what is going on because the box is so huge, and the moment I touch the mouse the entire scene flight out of the windows.

I see an wire frame that outline the shapes but that does not seems the newton debug display, because the ball does no looks like that,

also it look like the ball is buried into the box, you need to implement debug display some is really wrong with the shapes.
Julio Jerez
Moderator
Moderator
 
Posts: 11048
Joined: Sun Sep 14, 2003 2:18 pm
Location: Los Angeles

Re: Exception in dNewton::OnCompoundSubCollisionAABBOverlap

Postby Slick » Fri Nov 09, 2018 7:20 am

The debug display on the terrain is the Newton coordinates from the mesh from the debug draw callback. The sphere is a newtoncollsionsphere. The mouse is for moving the camera plus wasd. For some reason the ball display only renders part of the ball (also the render is at the origin not where the ball is :shock: ) - probably more of a problem with the debug renderer on my side.

I will do more testing.
Slick
 
Posts: 266
Joined: Sat Feb 07, 2004 7:24 pm
Location: Los Angeles

Re: Exception in dNewton::OnCompoundSubCollisionAABBOverlap

Postby Julio Jerez » Fri Nov 09, 2018 8:00 am

when I checked more closely, I see that the ball hit two parallel planes that form a thin layer.

the ball is 0.5 in radius by when is approached the floor is going at 26 m/s that make take a very large time step and is tunneling the first plane and colliding with the secund. them as is bounced is keep rebounding between the two planes, this is telling me that the mesh winding is incorrect, and the floor is inside out.
I trace the order in which you pass the aces but see you are doing on your side already,
They seemsright for what I can see,try to pass only the top face that is triangle 6 and 7

Parsing starting...
Vertex count: 24
Index count: 36
Face count: 12
….
Face: 6
Point x: 75.4375 Point y: 0.352051 Point z: 75.4375
Point x: -75.4375 Point y: 0.352051 Point z: 75.4375
Point x: 75.4375 Point y: 0.352051 Point z: -75.4375
Face: 7
Point x: 75.4375 Point y: 0.352051 Point z: -75.4375
Point x: -75.4375 Point y: 0.352051 Point z: 75.4375
Point x: -75.4375 Point y: 0.352051 Point z: -75.4375

that will make the ball only collide with the top face and show if is tunneling, because I see the ball some how bouncing between the top and bottom faces, and seem is going a 26 m/s maybe is possible that is just tunneling and colliding wit the bottom face, it does not makes sence but I see normal facing up and normal facing down.

you can also just make the box thinker, or the ball radio 1 instead of 0.25 or 0.5
until you get what is wrong
Julio Jerez
Moderator
Moderator
 
Posts: 11048
Joined: Sun Sep 14, 2003 2:18 pm
Location: Los Angeles

Re: Exception in dNewton::OnCompoundSubCollisionAABBOverlap

Postby Slick » Fri Nov 09, 2018 8:11 am

Yep I have been doing tons of debugging and that is some of my output.

How should I pass the triangle vertices to Newton so that the winding is correct?

I will make the ball go slower for testing. Right now each ball is a variable speed so I could test that the balls bounce off each other without crashing (they always worked ok).
Slick
 
Posts: 266
Joined: Sat Feb 07, 2004 7:24 pm
Location: Los Angeles

Re: Exception in dNewton::OnCompoundSubCollisionAABBOverlap

Postby Slick » Fri Nov 09, 2018 8:13 am

I will try your suggestion on faces 6 and 7.
Slick
 
Posts: 266
Joined: Sat Feb 07, 2004 7:24 pm
Location: Los Angeles

Re: Exception in dNewton::OnCompoundSubCollisionAABBOverlap

Postby Slick » Fri Nov 09, 2018 8:32 am

It does seem to be a winding issue. The ball goes through the flat surface but doesn't when shooting from underneath.

My mesh info is right handed Y is up.

I'm not sure what the answer is yet. I think the mesh parsing is correct but maybe I am feeding it to Newton in the wrong order.
Slick
 
Posts: 266
Joined: Sat Feb 07, 2004 7:24 pm
Location: Los Angeles

Re: Exception in dNewton::OnCompoundSubCollisionAABBOverlap

Postby Julio Jerez » Fri Nov 09, 2018 11:40 am

you just pass the vertices in reverse order.
for each triangle instead of passing v0, v1, v2, you pass v2, v1, v0
Julio Jerez
Moderator
Moderator
 
Posts: 11048
Joined: Sun Sep 14, 2003 2:18 pm
Location: Los Angeles

Re: Exception in dNewton::OnCompoundSubCollisionAABBOverlap

Postby Slick » Fri Nov 09, 2018 4:23 pm

Yes that seems to be working better. I need to do more testing.
Slick
 
Posts: 266
Joined: Sat Feb 07, 2004 7:24 pm
Location: Los Angeles

Previous

Return to General Discussion

Who is online

Users browsing this forum: No registered users and 7 guests

cron