Penetrating terrain

A place to discuss everything related to Newton Dynamics.

Moderators: Sascha Willems, walaber

Penetrating terrain

Postby Leadwerks » Mon May 31, 2010 5:51 pm

One user has demonstrated a problem where grenades with swept collision enabled consistently pass through the terrain without hitting it. Should this be possible with swept collision enabled? Is there anything he can do, besides decreasing the velocity of the grenade body?
User avatar
Leadwerks
 
Posts: 569
Joined: Fri Oct 27, 2006 2:54 pm

Re: Penetrating terrain

Postby Julio Jerez » Mon May 31, 2010 5:57 pm

not that should not happens, but I never tested anything like that. In the test I run it worked.

For sweep collsion to be active the two bodies have to have sweep collsion on pluss the material, I think.
Julio Jerez
Moderator
Moderator
 
Posts: 12426
Joined: Sun Sep 14, 2003 2:18 pm
Location: Los Angeles

Re: Penetrating terrain

Postby Leadwerks » Mon May 31, 2010 6:09 pm

I tried setting the terrain swept collision mode to 1. The results are the same.

I sent a demo to you via private message. You can consistently fire a grenade at certain angles, and it will pass through the ground.
User avatar
Leadwerks
 
Posts: 569
Joined: Fri Oct 27, 2006 2:54 pm

Re: Penetrating terrain

Postby Julio Jerez » Mon May 31, 2010 9:04 pm

I see they works on the cillinders but they are failing on the terrain.
I see what I can do.

Can you make the same demo with only the terrain and the Granades? The cilinders are in the way and make it much harder to debug.
Julio Jerez
Moderator
Moderator
 
Posts: 12426
Joined: Sun Sep 14, 2003 2:18 pm
Location: Los Angeles

Re: Penetrating terrain

Postby Julio Jerez » Mon May 31, 2010 9:33 pm

I think I found the problem, It seems to be a Bug is the SIMD version of the collision solver.

I hacked it to run in x87 mode and the granade always hit the gruond an dteh barrels.
that narrow the problem a lot more, but it is still to hard to debug because the cilynders also have CC on and it is diffcutl to know what is a
small cilynder Granade from what is a Big Cilynder barrel. Please make the demo with without the Big cilynders.

In the mean time you can run with hardware level 0 and it will work.


note:
Hey I did realize but when a Granade in on teh floor you can hit a granade with another granade.
The CC really work. :D
I just need to find what the BUG is when SIMD is on. Plase make the demo like I said.
Julio Jerez
Moderator
Moderator
 
Posts: 12426
Joined: Sun Sep 14, 2003 2:18 pm
Location: Los Angeles

Re: Penetrating terrain

Postby Julio Jerez » Mon May 31, 2010 11:08 pm

Ok Bug is fixed, It was a stupid mistake in one of the Simd version of polygon interception function,
the x87 version has a test that check the winding of the faces before clipping, by dotting the face normal with the collison plane normal,
if both points in the same direction then the face is clipped, if they point in opposit directions then face winding is inverted before clipped.
In the Simd version I was dotting the Face normal with the Face normal, so the face was never inverted.
wow this Bug also goes to fix problems with convex casting in simd mode when sweep ia at sharp angles, This was a good find.
Julio Jerez
Moderator
Moderator
 
Posts: 12426
Joined: Sun Sep 14, 2003 2:18 pm
Location: Los Angeles

Re: Penetrating terrain

Postby Julio Jerez » Tue Jun 01, 2010 12:23 am

download 2.21 SDK, there are not interface or behavior changes relative to 2.20
Julio Jerez
Moderator
Moderator
 
Posts: 12426
Joined: Sun Sep 14, 2003 2:18 pm
Location: Los Angeles

Re: Penetrating terrain

Postby Leadwerks » Tue Jun 01, 2010 1:36 pm

Sweet, thanks!
User avatar
Leadwerks
 
Posts: 569
Joined: Fri Oct 27, 2006 2:54 pm

Re: Penetrating terrain

Postby macklebee » Wed Jun 02, 2010 1:21 am

Still able to do it consistently when the cam rotation is between ~49.5 and 52 degrees. I used the Newton.DLL that was in SDK 2.21.

Any suggestions? Do you wish another demo?
macklebee
 
Posts: 9
Joined: Sat Jan 31, 2009 5:17 am

Re: Penetrating terrain

Postby Julio Jerez » Wed Jun 02, 2010 1:54 am

Is this the same demo?
Julio Jerez
Moderator
Moderator
 
Posts: 12426
Joined: Sun Sep 14, 2003 2:18 pm
Location: Los Angeles

Re: Penetrating terrain

Postby macklebee » Wed Jun 02, 2010 11:58 am

essentially yes. but I was going to remove the large cylinders from the scene and add the camera rotation value so you could see at what angle I am seeing them consistently go through the terrain.
macklebee
 
Posts: 9
Joined: Sat Jan 31, 2009 5:17 am

Re: Penetrating terrain

Postby Julio Jerez » Wed Jun 02, 2010 1:29 pm

OK do that and post it again.

and yes remove the large cilinders because they are just in the way and do not contribute to the debuging.
Julio Jerez
Moderator
Moderator
 
Posts: 12426
Joined: Sun Sep 14, 2003 2:18 pm
Location: Los Angeles

Re: Penetrating terrain

Postby macklebee » Wed Jun 02, 2010 4:16 pm

Ok, I removed the cylinders along with explosions. Notice that the penetration occurs around 32 and 51 degrees. Also added a second script that doesn't use terrain but a flat cube to bounce various body shapes. This appears to work just fine. Just drag either lua script onto the engine.exe. Sending you a link of the examples by PM.
macklebee
 
Posts: 9
Joined: Sat Jan 31, 2009 5:17 am

Re: Penetrating terrain

Postby Julio Jerez » Wed Jun 02, 2010 6:01 pm

Ok I will check it out tonight.
Julio Jerez
Moderator
Moderator
 
Posts: 12426
Joined: Sun Sep 14, 2003 2:18 pm
Location: Los Angeles

Re: Penetrating terrain

Postby macklebee » Wed Jun 02, 2010 7:30 pm

I had changed the origin of the model but forgot to update the PHY file :oops: ... sent you a new link in a PM
macklebee
 
Posts: 9
Joined: Sat Jan 31, 2009 5:17 am

Next

Return to General Discussion

Who is online

Users browsing this forum: No registered users and 1 guest