A place to discuss everything related to Newton Dynamics.
Moderators: Sascha Willems, walaber
by Julio Jerez » Wed Aug 06, 2014 11:48 am
Bird
I finally have a working version of the Placement with matrix alignment.
It is in ../newton-dynamics\applications\demosSandbox\sdkDemos\demos\KinematicBodies.cpp
It is build on top of a system like you have, witch mean if can be an option for you.
I have no test much yet, I am sure they are glitches but see it is what you want it.
Later I will add a couple of ramps like in you video, for better demo.
-
Julio Jerez
- Moderator

-
- Posts: 12426
- Joined: Sun Sep 14, 2003 2:18 pm
- Location: Los Angeles
-
by Bird » Thu Aug 07, 2014 8:48 am
Ok, thanks. I'll get on it today.
-Bird
-
Bird
-
- Posts: 636
- Joined: Tue Nov 22, 2011 1:27 am
by Julio Jerez » Thu Aug 07, 2014 9:30 am
I fixed one last bug, make sure you get later.
See if you understand what is doing.
I thin it still need one more feature, the placement position is determine by a ray cast, however that's nice when there are no other bodes around
when the are bodies around the ray can hit a body and the place will be on top, but as you move the mouse the rat can pass trough a crack and then the placement jump to other location that could be far away.
it is not a bug but look like one.
that can be solve by using a small sphere and a convex cast to get the hit position, then the sphere will stop a small cracks making it more intuitive.
-
Julio Jerez
- Moderator

-
- Posts: 12426
- Joined: Sun Sep 14, 2003 2:18 pm
- Location: Los Angeles
-
by Bird » Thu Aug 07, 2014 4:02 pm
See if you understand what is doing.
Heh, I'll never understand the math but I think I have the guts of the demo working in my kit now.

Here's what I'm seeing though. It's definitely working better then just convex casting the body but it's still not quite what I was hoping for. Is is possible to keep the body resting on both parts of the ramp at the same time while it's being dragged?
http://hurleyworks.com/media/flash/NewtonPlacement/NewtonPlacement.html-Bird
-
Bird
-
- Posts: 636
- Joined: Tue Nov 22, 2011 1:27 am
by Julio Jerez » Thu Aug 07, 2014 5:48 pm
no that did not looked good, something is still wrong.
I will add a static ramp to the demo tonight, maybe there something wrong still.
the object should move smoothly always adapting to the world. that did not that at all.
-
Julio Jerez
- Moderator

-
- Posts: 12426
- Joined: Sun Sep 14, 2003 2:18 pm
- Location: Los Angeles
-
by Julio Jerez » Fri Aug 08, 2014 9:08 am
Oh yes you are right the ligment is not working with multiple static bodies
in the image bellow the box should align correctly and it is not, I will fix it

- aligmentNotWorking.png (108.12 KiB) Viewed 5212 times
-
Julio Jerez
- Moderator

-
- Posts: 12426
- Joined: Sun Sep 14, 2003 2:18 pm
- Location: Los Angeles
-
by Julio Jerez » Fri Aug 08, 2014 9:56 am
Oh I see what is going on.
basically is a case of false positive.
in the code we use convex case to find the initial translation distance to the first contact.
then is that passes with NewtonCollisionCollide to determine the if the phantom is colliding with the some objects, the problem is that the point found by convex cast is usually appoint that touched the object, but no collide wit the object
NewtonCollisionCollide is expected to have a small amount of interpenetration, so in case were the is a scene object have arbitrary matrices, the processes of conversion shape form one space to another can make it possible that the contact found by convex cast
is not seen and a collison by NewtonCollisionCollide.
we can fix in to ways, one is but allowing a small penetration in convex cast, something like two or tree millimeters.
or we can NewtonCollisionCollideContinue wich will find the contact or we can use some small collision thickness
I will experiment with the tree and see which yielded best results.
-
Julio Jerez
- Moderator

-
- Posts: 12426
- Joined: Sun Sep 14, 2003 2:18 pm
- Location: Los Angeles
-
by Julio Jerez » Mon Aug 11, 2014 4:08 pm
Ok Bird, I just check in a working version with rotation.
I placement a ramp in the demo so the I can move the phantom around, and to me, I think is really, really cool.
* to github and build the demo before to try anything, it will give you an idea of what to expect.
There are probably more tweaks that can be made, but I think this is really good.
-
Julio Jerez
- Moderator

-
- Posts: 12426
- Joined: Sun Sep 14, 2003 2:18 pm
- Location: Los Angeles
-
by Bird » Mon Aug 11, 2014 8:35 pm
Julio Jerez wrote:Ok Bird, I just check in a working version with rotation.
I placement a ramp in the demo so the I can move the phantom around, and to me, I think is really, really cool.
* to github and build the demo before to try anything, it will give you an idea of what to expect.
There are probably more tweaks that can be made, but I think this is really good.
Excellent!!! That is very cool indeed! Thanks *very* much.

I can get it to work ok like you did in the demo with a cube but it's not quite right on a simple elongated box.
http://hurleyworks.com/media/flash/AP_JulioCast/AP_JulioCast.htmlthanks again. Wow!
-Bird
-
Bird
-
- Posts: 636
- Joined: Tue Nov 22, 2011 1:27 am
by Julio Jerez » Mon Aug 11, 2014 9:05 pm
At least is getting better, I think thing is it tolerance problem.
I will place a long thing object and do the same test and we what is wrong.
-
Julio Jerez
- Moderator

-
- Posts: 12426
- Joined: Sun Sep 14, 2003 2:18 pm
- Location: Los Angeles
-
by FSA » Tue Aug 12, 2014 3:16 pm
This feature is really cool! Thanks for implementing. As soon as I have something to present I will show it to you.
-

FSA
-
- Posts: 322
- Joined: Wed Dec 21, 2011 9:47 am
by Julio Jerez » Tue Aug 12, 2014 5:51 pm
It was Bird's idea originally, I just added the support.
I will add some more refinements and robustness this weekend.
did you try it?
-
Julio Jerez
- Moderator

-
- Posts: 12426
- 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 1 guest