convex cast problem

A place to discuss everything related to Newton Dynamics.

Moderators: Sascha Willems, walaber

Re: convex cast problem

Postby Julio Jerez » Mon Nov 04, 2013 9:47 am

@Hamsterexplosion ok now I think I fixed that bug now, I also made the local matrix of the casting shape an upright matrix, and it seem to work.
In the demo to make the bug reproducible I added a function to reset the random seed, because I was no able to reproduce the same bug from test to test, but now it is much easier.

btw, on this
hamsterexplosion wrote:and a size of newton.lib embarrasing me (600k compared to 7megs when compiling in 2008). still trying to figure out what am i doing wrong

I think I figured out why the library size are so different, in VS2008 there is a feature that let you attach dependency libraries together, I have no found how to set that up with VS 2010.
In realilty is does no matter because the engine is open source, so people can use the libraries as they one. The VS 2008 project date form the time when the engine distributed precompiled libraries, and I put them all together
so that the end use u=only needed to link to one static library. In my system the library are about 7 meg in release and 15 meg in debug, but that's no a problem when linked they reduce to less that 600k, which for a physic library
with so many feature is quite small in my opinion. I believe that Newton is by far the most feature complete physic engine and at the same time the smaller.


@Bird, I also added cast for compound vs compound and compound vs collision tree.
you said that the normals were uninitialized, could you verify that this is still the case? in the code I see they are set but maybe it is fault in some other part in the code. could you tell me if the values are illegal floats or wrong normals?
Julio Jerez
Moderator
Moderator
 
Posts: 12426
Joined: Sun Sep 14, 2003 2:18 pm
Location: Los Angeles

Re: convex cast problem

Postby Bird » Mon Nov 04, 2013 12:41 pm

Bird, I also added eh cast for compound vs compound and compound vs collision tree.
you said that the normal were initialized, could you verify that this is still the case? in the code I see that it I been set, but maybe it is faulty in some other play in the code.
could you tell me si the values a illegal float, of wrong normal?

Compound cast seems to be working fine. Thanks very much for supporting it!

There are values instead of garbage in NewtonWorldConvexCastReturnInfo->m_normalOnHitPoint now but I don't really understand what they represent and sometimes they are a null vector. Here's the debug output I get if I cast a simple cube mesh straight down the Y axis onto a flat ground plane.

-Bird

Code: Select all
INFO:  ------------------------- 4 cotacts
INFO: m_normalOnHitPoint: ( 1, 0, 0 )
INFO: m_normal: ( 0, 1, 0 )
INFO: m_normalOnHitPoint: ( -4.0585e-026, 3.05217e-041, 0 )
INFO: m_normal: ( 0, 1, 0 )
INFO: m_normalOnHitPoint: ( 0, 0, 0 )
INFO: m_normal: ( 0, 1, 0 )
INFO: m_normalOnHitPoint: ( 0.00033072, 0, 0 )
INFO: m_normal: ( 0, 1, 0 )
Bird
 
Posts: 636
Joined: Tue Nov 22, 2011 1:27 am

Re: convex cast problem

Postby Julio Jerez » Mon Nov 04, 2013 3:57 pm

Oh I see it is m_normalOnHitPoint that is not iniatlized.
that values is a legacy from core 200 and core 100 raycast routines
you can ignore it, I will removed for eh SDL with the next check in

the relevant values are m_point and m_normal
Julio Jerez
Moderator
Moderator
 
Posts: 12426
Joined: Sun Sep 14, 2003 2:18 pm
Location: Los Angeles

Re: convex cast problem

Postby Bird » Tue Nov 05, 2013 4:54 pm

Julio Jerez wrote:Oh I see it is m_normalOnHitPoint that is not iniatlized.
that values is a legacy from core 200 and core 100 raycast routines
you can ignore it, I will removed for eh SDL with the next check in

the relevant values are m_point and m_normal


Is m_penetration working? I'm seeing small, around 2mm, penetrations in my simple tests but m_penetration always returns 0;

-Bird
Bird
 
Posts: 636
Joined: Tue Nov 22, 2011 1:27 am

Re: convex cast problem

Postby Julio Jerez » Tue Nov 05, 2013 6:10 pm

if the two bodies are not initially inesecting the penetaion will be zero.
If they are then penetartion is teh tralation distance along teh normal that resultve the interpenetration.

This is not always the case becase the point of impact is a calucalted value and some time is not exact when two bodies are not initality interpenetrating.
this happens because the cast works by moving the shapes alone the path at decret steps until they hit each other,
sometime the distance that the shapes move is not exact and it just happen the they penetrate a litle.
when this happens it is too expensive to go back to a recalculate a better translation therefore it just return that distance as penetration.
Julio Jerez
Moderator
Moderator
 
Posts: 12426
Joined: Sun Sep 14, 2003 2:18 pm
Location: Los Angeles

Previous

Return to General Discussion

Who is online

Users browsing this forum: No registered users and 2 guests

cron