Convex raycast bug

Report any bugs here and we'll post fixes

Moderators: Sascha Willems, Thomas

Convex raycast bug

Postby pHySiQuE » Thu Dec 01, 2016 1:46 am

The convex raycast routine doesn't seem to detect collisions until it penetrates a certain depth. This causes our player controller to exhibit some jittery behavior. It's really noticeable when the camera is parented to the player controller:
pHySiQuE
 
Posts: 608
Joined: Fri Sep 02, 2011 9:54 pm

Re: Convex raycast bug

Postby Julio Jerez » Thu Dec 01, 2016 8:25 am

I this new?
I tweaked the collision offset, so hat it work better for the soft bodies and cloth that I am working now. but I did the test convex cast routine, is possible that there is an issue there.
I will check it out.
Julio Jerez
Moderator
Moderator
 
Posts: 11039
Joined: Sun Sep 14, 2003 2:18 pm
Location: Los Angeles

Re: Convex raycast bug

Postby Julio Jerez » Thu Dec 01, 2016 3:17 pm

I have an assert on that line, I knew I has to come back to fix it
if (!proxy.m_intersectionTestOnly) {
dgAssert (0);
//pointInHull -= normalInHull.Scale4 (DG_ROBUST_PLANE_CLIP);
pointInHull -= normalInHull.Scale4 (-DG_PENETRATION_TOL);
count = proxy.m_instance0->CalculatePlaneIntersection(normalInHull, pointInHull, contactPoints);


and here
Code: Select all
               m_proxy->m_contactJoint->m_contactActive = 1;
               dgVector contactPoint((m_closestPoint0 + m_closestPoint1).Scale4(dgFloat32(0.5f)));
               dgAssert(0);
//               count = CalculateContacts(contactPoint, m_normal);


I guess this is a good time to do that.
Basically in 3.14 I am unifying all those different defines that I tune for each shape separately when I was writing the code. But this cause lot of maintenance so I unified it to be DG_PENETRATION_TOL
for all shapes, and all precedes. as you can see the contact was assume to be outside the shape now is inside.

could you tell me what shapes are you casting so that I set a test case the same way?
and also do you expect the contact to be on the shape?
Julio Jerez
Moderator
Moderator
 
Posts: 11039
Joined: Sun Sep 14, 2003 2:18 pm
Location: Los Angeles

Re: Convex raycast bug

Postby Julio Jerez » Thu Dec 01, 2016 4:07 pm

Ok I think I have fixed now, please think again.

Hey pHySiQuE I am working on the soft, deformable and cloth functionality for 3.14
The cloth will be not penetration, and I believe will be capable to fully cloth a human body.
without artifacts. I am planning to release the first demo after this weekend.
Julio Jerez
Moderator
Moderator
 
Posts: 11039
Joined: Sun Sep 14, 2003 2:18 pm
Location: Los Angeles

Re: Convex raycast bug

Postby pHySiQuE » Fri Dec 02, 2016 12:52 am

Cool man! I will try out the fix. It's late right now.

This is just a small glitch that annoys me, especially when I'm walking around in first person. :mrgreen:

Thanks in advance.
pHySiQuE
 
Posts: 608
Joined: Fri Sep 02, 2011 9:54 pm

Re: Convex raycast bug

Postby pHySiQuE » Fri Dec 02, 2016 1:53 pm

This will take a while. It looks like to internals of some things has changed a lot.
pHySiQuE
 
Posts: 608
Joined: Fri Sep 02, 2011 9:54 pm

Re: Convex raycast bug

Postby Julio Jerez » Fri Dec 02, 2016 3:05 pm

pHySiQuE wrote:It looks like to internals of some things has changed a lot.

what do you mean?
there are large internal changes but the interface has remained largely the same.

the changes are:
- Collision system broad phase is literally one half order of magnitude faster
-The solver is now more far more accurate, but could be slower in large stack piles, not really a big problem
-Added completed exact solve for hierarchical joint configuration, this makes thinks like rag doll, vehicle completely rigid. The system handle look joints, for example two hade weapon.
Julio Jerez
Moderator
Moderator
 
Posts: 11039
Joined: Sun Sep 14, 2003 2:18 pm
Location: Los Angeles

Re: Convex raycast bug

Postby pHySiQuE » Fri Dec 02, 2016 5:53 pm

I have some customizations in the custom joints, and a few things here and there.

Here's what I am experiencing now:


The problematic shapes are compound convex hulls. Everything else appears okay.
pHySiQuE
 
Posts: 608
Joined: Fri Sep 02, 2011 9:54 pm

Re: Convex raycast bug

Postby Julio Jerez » Fri Dec 02, 2016 6:52 pm

Yes that would the behavior because I had a line commented out, but I fixed. Get the latest it should be working.
Julio Jerez
Moderator
Moderator
 
Posts: 11039
Joined: Sun Sep 14, 2003 2:18 pm
Location: Los Angeles

Re: Convex raycast bug

Postby pHySiQuE » Fri Dec 02, 2016 7:29 pm

I am up to date with the source.

It appears the problem only happens with compound convex collisions. Single convex hulls and polysoups work great.
pHySiQuE
 
Posts: 608
Joined: Fri Sep 02, 2011 9:54 pm

Re: Convex raycast bug

Postby Julio Jerez » Fri Dec 02, 2016 9:12 pm

Ha ok I will check tomorrow.
Julio Jerez
Moderator
Moderator
 
Posts: 11039
Joined: Sun Sep 14, 2003 2:18 pm
Location: Los Angeles


Return to Bugs and Fixes

Who is online

Users browsing this forum: No registered users and 2 guests