A place to discuss everything related to Newton Dynamics.
Moderators: Sascha Willems, walaber
by FSA » Thu Sep 05, 2013 9:32 am
I don't know if you still working on scaling but I've found a problem with it. In the demo ScaledMeshCollision is sometimes no collision between the teacan an the scaled models. See the video for more details.
https://www.dropbox.com/s/jz1b7k9lelzms3a/IMG_0979.avi
-

FSA
-
- Posts: 322
- Joined: Wed Dec 21, 2011 9:47 am
by Julio Jerez » Thu Sep 05, 2013 9:38 am
did you get later, I believe is was fixed yesterday. I was a bug when calculation AABB for a generic scale matrix for some shapes.
it should be working fine now get later and try again.
-
Julio Jerez
- Moderator

-
- Posts: 12426
- Joined: Sun Sep 14, 2003 2:18 pm
- Location: Los Angeles
-
by FSA » Thu Sep 05, 2013 9:59 am
Okay. So I tested the sclaing function by myself but geht this error:

- Unbenannt.JPG (43.2 KiB) Viewed 3954 times
My Code ist just one line more. I call NewtonBodySetCollisionScale (pBody->GetBody(), scale.x, scale.y, scale.z); after creating my body. Probably this is wrong?
-

FSA
-
- Posts: 322
- Joined: Wed Dec 21, 2011 9:47 am
by Julio Jerez » Thu Sep 05, 2013 10:07 am
sync again there was another bug in capsule AABB. Basically it come down to the fact that using a generic scaling take away all the benefic of special cases.
So many function that have special functions not longer work when the matrix is not a orthonormal matrix anymore.
I think I probably cover it all now.
but there are three shapes that I have not fix yet (taped capsule, taped cylinder, and compound with scale) I will do that next weekend.
on that bug I can no say what the error was, no enoght info. Sync and try again, and if the bug is still there try serializing the scene and load in the sandbox, maybe the bug happen there and I can see what it is.
-
Julio Jerez
- Moderator

-
- Posts: 12426
- Joined: Sun Sep 14, 2003 2:18 pm
- Location: Los Angeles
-
by FSA » Thu Sep 05, 2013 11:06 am
Sandbox seems to crash when I want to load the serialization. There it is:
- Attachments
-
Serialize.zip
- (17.58 KiB) Downloaded 187 times
-

FSA
-
- Posts: 322
- Joined: Wed Dec 21, 2011 9:47 am
by Julio Jerez » Fri Sep 06, 2013 6:43 am
I just try to load that file and it load fine here, but I only saw a capsule falling down.
did you get the latest before you serialized?
-
Julio Jerez
- Moderator

-
- Posts: 12426
- Joined: Sun Sep 14, 2003 2:18 pm
- Location: Los Angeles
-
by FSA » Fri Sep 06, 2013 9:19 am
Yes I have the latest version. I'll try it another time later. I'll sync again build again and test again

-

FSA
-
- Posts: 322
- Joined: Wed Dec 21, 2011 9:47 am
by FSA » Fri Sep 06, 2013 11:20 am
So I've tested everything two times. The error has no coherence with scaling. The error occurs when I've created an dynamic body. When I just create a static body everything works fine. After creating a dynamic body I get a crash after about 100 frames. The error is in german. It should sounds like this:
Unhandled exception at 0x... in Test.exe: 0x... More than ohne floating point traps.
I haven't changed anything at my physic handler. So it must be a bug with newton.
And the error above still happens, too.
- Attachments
-

- Pic.JPG (166.82 KiB) Viewed 3922 times
-

FSA
-
- Posts: 322
- Joined: Wed Dec 21, 2011 9:47 am
by Julio Jerez » Fri Sep 06, 2013 11:45 am
the error on the dgMath does not tell me anything.
can I have a test demo to reproduce it?
-
Julio Jerez
- Moderator

-
- Posts: 12426
- Joined: Sun Sep 14, 2003 2:18 pm
- Location: Los Angeles
-
by Julio Jerez » Fri Sep 06, 2013 11:52 am
Oh thank you. I have to leave for work now.
I will test it some time today
-
Julio Jerez
- Moderator

-
- Posts: 12426
- Joined: Sun Sep 14, 2003 2:18 pm
- Location: Los Angeles
-
by Julio Jerez » Fri Sep 06, 2013 1:33 pm
I set the debug.
I think you stumble on a very rare bug that I have buid tracing for a very long time.
To make sure I did no added this wit teh late scale stuff, tell me something, was this working before?
-
Julio Jerez
- Moderator

-
- Posts: 12426
- Joined: Sun Sep 14, 2003 2:18 pm
- Location: Los Angeles
-
by Julio Jerez » Fri Sep 06, 2013 1:51 pm
Ok, no ttshi was a false alarm
I think you chnge you external force and torque call back, now is setting teh acceltaion to a huge value
when I set a breapoint on function
void dgDynamicBody::ApplyExtenalForces (dgFloat32 timestep, dgInt32 threadIndex)
teh accleration before the callback is set to zero, and after it come with a huge weight value
- Code: Select all
(*this).m_accel {x=-2.1580104e+010 y=-2.1580104e+010 z=-2.1580104e+010 w=0.00000000} dgVector
check you force and truqe callback fo that dynamics body, ther bug ios there.
here whe you call
- Code: Select all
void NewtonBodySetForce(const NewtonBody* const bodyPtr, const dFloat* const vectorPtr)
void dgDynamicBody::SetForce (const dgVector& force)
from your callback, the force vector is extremelly huge, I mean super Black hole gravity huge!!
force {x=-2.1580104e+010 y=-2.1580104e+010 z=-2.1580104e+010 w=0.00000000} const dgVector &
-
Julio Jerez
- Moderator

-
- Posts: 12426
- Joined: Sun Sep 14, 2003 2:18 pm
- Location: Los Angeles
-
by FSA » Fri Sep 06, 2013 4:06 pm
Oh you are right. My own memory manager contains a bug. So it has overwritten the gravity value in my physic module.

Sorry that you spend time on something which was my fault...
Scaling also works!
-

FSA
-
- Posts: 322
- Joined: Wed Dec 21, 2011 9:47 am
Return to General Discussion
Who is online
Users browsing this forum: No registered users and 0 guests