NewtonWorldConvexCast

A place to discuss everything related to Newton Dynamics.

Moderators: Sascha Willems, walaber

NewtonWorldConvexCast

Postby Spek » Wed Jan 11, 2017 8:56 pm

Could there be a reason that the "NewtonWorldConvexCast" function gives different results (in terms of hitpoint-positions/distances) when checking Scene Trees versus bodies using composites of convex hulls?

*The attached picture shows the scenario*

For player-physics, I'm casting a flattish disc downwards, to sense the "floor" below me. Works fine for static environment. Slopes, stairs, no problem. But as soon as I climb on an object, say a couch, made of of (usually multiple) convex hulls, the hitpoint ends up much higher/closer to where I start shooting down the ray.


It's alsmost as if the convexcast collides with the player itself, even though I'm skipping that one via the "preFilter". However, the convexCast does give me the right object though; "m_contactID" is correct (points to the stuff I'm standing on). But the hitpoints are somewhere floating above the object, and the "hitParam" is too close as well.

Any idea? Note I'm using a somewhat older Newton version (somewhere end 2015). Being in Delphi, it's a bit harder to keep up-to-date with the latest libraries.
Attachments
convexCastProblem.png
convexCastProblem.png (6.63 KiB) Viewed 4336 times
Spek
 
Posts: 66
Joined: Sat Oct 04, 2008 8:54 am

Re: NewtonWorldConvexCast

Postby Julio Jerez » Wed Jan 11, 2017 10:19 pm

no, it should generate the same hit point for everything.
this is one of the main issues thing that was corrected with newton 3.14, the contact solve is consistent for all shapes.
can this be recreated in the sandbox demo?
Julio Jerez
Moderator
Moderator
 
Posts: 12249
Joined: Sun Sep 14, 2003 2:18 pm
Location: Los Angeles

Re: NewtonWorldConvexCast

Postby Spek » Thu Jan 12, 2017 4:37 am

Let's see what Newton version I have here... "NewtonWorldGetVersion" gives me 314... though I'm pretty sure it's a relative old one (end 2015, maybe even earlier).

Anyhow, playground. It has been a while, but I should use the "NewtonSerializeToFile( world, filename, 0, 0)" function to dump my scene into a file right?

It doesn't generate any file though. I tried the path as follow:
E:\someFolder\physDump.phys
E:/someFolder/physDump.phys
E:\\someFolder\\physDump.phys
E://someFolder//physDump.phys
Spek
 
Posts: 66
Joined: Sat Oct 04, 2008 8:54 am

Re: NewtonWorldConvexCast

Postby Julio Jerez » Thu Jan 12, 2017 9:57 am

can you try to sync the latest 3.14 and see if is better?
if you where on 3.14 the changes are very minor. you can do a separate project.

the collision system in early newton 3.14 started with the collision system of 3.13
they are numerically the same, but collision shapes had subtle difference in the way the calculate contact an contact penetration because each shape has it own algorithm to calculate the colliding plane.
with 3.14, the has been turned into a separate system called dgContactSolver that takes two convex shapes and apply the same algorithm generation the exact same contact regardless of shape type they are.
so if one contact is wrong the they will all be.

doing this made possible to apply to get thing like general non uniform scale, and shapes that can change it parameter ex: cylinder can now have two diameter, plus the collision system itself if far more robust and faster.

despite that it does has generate some problem, for example the contacts are an all or nothing algorithm.
and things that were stable in 3.13 like the stack of capsule that was stable in 3.13 because teh capsule was producing the contact for that, now is unstable because the contacts are all on the surface, not a big problem but I have to fix it. because it does bother me.
Julio Jerez
Moderator
Moderator
 
Posts: 12249
Joined: Sun Sep 14, 2003 2:18 pm
Location: Los Angeles

Re: NewtonWorldConvexCast

Postby Spek » Thu Jan 12, 2017 4:19 pm

Can the binaries (DLL, 32 bit) be downloaded somewhere?

I have VS2013, but don't really know how to build the DLL there. Tried to open "Packages\Projects\VisualStudio_2013_DLL\Build.sln, then Build the whole solution. It produces a big bunch of files, though no DLL because Newton_d.lib can't be found, or "dgCollisionDeformableClothPatch.cpp" can't be found. I bet I'm doing something wrong, or in the wrong order.

There is 1 newton.dll in the GitHib ZIP file, but I think its an older one. "NewtonBodySetSimulationState" can't be found for example.
Spek
 
Posts: 66
Joined: Sat Oct 04, 2008 8:54 am

Re: NewtonWorldConvexCast

Postby Julio Jerez » Thu Jan 12, 2017 4:34 pm

you are no doing anything wrong, this has not been a good week for me.
you can't build the 2013 now because the changes I made are only added to 2015 and 2010, after that me system broke. you have to wait until I put together my new system which has 2010, 2013 and 2015
why don't you get VS 2015 is free?
Julio Jerez
Moderator
Moderator
 
Posts: 12249
Joined: Sun Sep 14, 2003 2:18 pm
Location: Los Angeles

Re: NewtonWorldConvexCast

Postby Spek » Thu Jan 12, 2017 4:41 pm

Hehe, that can happen. I'll roll back to the previous DLL and wait... or maybe there a recent DLL to be found somewhere? In the end I only need the DLL.

>> Free VS2015
Would it? I thought upgrades (using a Professional version from work here) weren't free either. Anyhow, I'm always scared to death when doing an upgrade, having lot's of work-related program. Upgrade usually means trouble :)
Spek
 
Posts: 66
Joined: Sat Oct 04, 2008 8:54 am

Re: NewtonWorldConvexCast

Postby Julio Jerez » Thu Jan 12, 2017 5:21 pm

I do not know what the deal with Microsoft but I ha been buying visual studio professional since VS6, in 1996, in fact I paid 2500,00 for a bundle that came with visual safe, and a while bunch of stuff.
the after I bough 2002, 2003, 2005, 2008, 2010, 2013 and 2015

however the last tow version, 2013 and 2015, afte I paid the money, few day later they send me full refund, which I though was nice of them.

I believe that the free download version is in fact the full feature professional one.

in any case I work on 2013 myself, it take me a long time to move to newer version. in fat until recent I was using 2010 until I upgraded to windows 10 which now tell me that some if wrong and ask if I want window 10 to fix it, but when I say fixed it say it could no find some file, that I most reinstall it. I did it and reinstalled the service pack, just to repeat the same circle again. this is one of the reasons I am thinking to drop visual studio 2010 support.

anyway I will rebuild my system this weekend and I hope everything of back to normal.
Julio Jerez
Moderator
Moderator
 
Posts: 12249
Joined: Sun Sep 14, 2003 2:18 pm
Location: Los Angeles


Return to General Discussion

Who is online

Users browsing this forum: No registered users and 20 guests

cron