Weird Body behavior and crash

Report any bugs here and we'll post fixes

Moderators: Sascha Willems, Thomas

Weird Body behavior and crash

Postby Lax » Sat Mar 09, 2019 7:41 am

Hi,

I updated to the newest version of newton (08.03.2019).
Now when I start my application, all dynamic bodies are flipping upside down and vice versa or are vanished and visible again and after app. 5 seconds the application does crash.

The demosSandbox do not start, I see only a black console window.

I compiled everything with vc141, maybe the plattform toolset is to new?

Has anyone an idea, what is happening?

Best Regards
Lax
Lax
 
Posts: 115
Joined: Sat Jan 08, 2011 8:24 am

Re: Weird Body behavior and crash

Postby Julio Jerez » Sat Mar 09, 2019 11:15 am

I do not know I just try with VS 2017 and the sandbox demos seem right.
I do not have hand made visual studio solution I use CMake.
Julio Jerez
Moderator
Moderator
 
Posts: 11039
Joined: Sun Sep 14, 2003 2:18 pm
Location: Los Angeles

Re: Weird Body behavior and crash

Postby Julio Jerez » Sat Mar 09, 2019 2:58 pm

It seems I made a major bug in that day or two,
I am looking at the problem now, stand by please.
Julio Jerez
Moderator
Moderator
 
Posts: 11039
Joined: Sun Sep 14, 2003 2:18 pm
Location: Los Angeles

Re: Weird Body behavior and crash

Postby Lax » Sat Mar 09, 2019 6:00 pm

Ok, thanks for the response, I will wait.
Lax
 
Posts: 115
Joined: Sat Jan 08, 2011 8:24 am

Re: Weird Body behavior and crash

Postby Julio Jerez » Sun Mar 10, 2019 1:32 pm

try again please.
Julio Jerez
Moderator
Moderator
 
Posts: 11039
Joined: Sun Sep 14, 2003 2:18 pm
Location: Los Angeles

Re: Weird Body behavior and crash

Postby Lax » Mon Mar 11, 2019 5:20 pm

Hi Julio,

I downloaded the newest version, but still, the bodies are flickering and after that the application does hang.

Tomorrow, I will investigate myself what is going on.

Best Regards
Lax
Lax
 
Posts: 115
Joined: Sat Jan 08, 2011 8:24 am

Re: Weird Body behavior and crash

Postby Julio Jerez » Mon Mar 11, 2019 5:41 pm

you say the sandbox demo also crash, I am no sure what could this be.
I do not see that problem in several systems.
The sandbox should run out of the box.
Julio Jerez
Moderator
Moderator
 
Posts: 11039
Joined: Sun Sep 14, 2003 2:18 pm
Location: Los Angeles

Re: Weird Body behavior and crash

Postby Lax » Tue Mar 12, 2019 3:53 pm

Hi,

your demos are working, I did not see them, because they were by accident on a different monitor :oops:

I build my NOWA-Engine again from the scratch with your newton fixes, but I get still the weird behavior. See the video in the link:

http://www.lukas-kalinowski.com/Homepage/wp-content/uploads/JumpNRunError.mp4

What could that be?
It seems that something has significantely changed in newton?

Best Regards
Lax
 
Posts: 115
Joined: Sat Jan 08, 2011 8:24 am

Re: Weird Body behavior and crash

Postby Julio Jerez » Tue Mar 12, 2019 4:00 pm

yes there has been changes, but I think they are for the better.
how are you making the pieces 2d?
do you have a repro test that link to a dll that I can check.
also how long ago was the last working version?
Julio Jerez
Moderator
Moderator
 
Posts: 11039
Joined: Sun Sep 14, 2003 2:18 pm
Location: Los Angeles

Re: Weird Body behavior and crash

Postby Lax » Tue Mar 12, 2019 4:08 pm

The last working version was from 14.02.2019

It only seems, that everything is 2D, in fact, I just constrain the z-axis. I have also a simple scene with a primitive and when I start my scene, the primitive is flipped.

Unfortunately it is not easy to get a test from the NOWA-Engine, as Ogre3D etc. must be build from the scratch...
Lax
 
Posts: 115
Joined: Sat Jan 08, 2011 8:24 am

Re: Weird Body behavior and crash

Postby Lax » Tue Mar 12, 2019 4:50 pm

I made a new simple video, it seems, that there are several things wrong, the collision detection is upside down??

See:
http://www.lukas-kalinowski.com/Homepage/wp-content/uploads/CollisionOffset.mp4
The case is flipped upside down, but its not visible directly...

Or here, the character is flipped upside down when newton is updated:
http://www.lukas-kalinowski.com/Homepage/wp-content/uploads/Flip.mp4

Is there something wrong with the newton quaternions?
Lax
 
Posts: 115
Joined: Sat Jan 08, 2011 8:24 am

Re: Weird Body behavior and crash

Postby JernejL » Tue Mar 12, 2019 5:39 pm

Are you using funny matrixes? like scaled ones? newton doesn't support scale on object matrixes.
Help improving the Newton Game Dynamics WIKI
User avatar
JernejL
 
Posts: 1492
Joined: Mon Dec 06, 2004 2:00 pm
Location: Slovenia

Re: Weird Body behavior and crash

Postby Dave Gravel » Tue Mar 12, 2019 5:53 pm

Something that can maybe cause similar problems is about Vector4 and Vector3.
Now newton use Vector3 for many things.
Maybe you have some commands that use Vector4 and now in your project this Vector4 losing the w component value.
You search a nice physics solution, if you can read this message you're at the good place :wink:
OrionX3D Projects & Demos:
https://www.facebook.com/dave.gravel1
http://orionx3d.googlepages.com/
https://www.youtube.com/user/EvadLevarg/videos
User avatar
Dave Gravel
 
Posts: 713
Joined: Sat Apr 01, 2006 9:31 pm
Location: Quebec in Canada.

Re: Weird Body behavior and crash

Postby Julio Jerez » Tue Mar 12, 2019 6:51 pm

Is there something wrong with the newton quaternions?

bingo!!
I believe you Are using the old quaternion conversion routines.
We change how the quay component are save to make it more conformant yo how game engines do it.
My guess is that ogre still has the old method from wallabel did it.

Find the matrix to what routine and change the order, it should now match the ogre encoding.
Julio Jerez
Moderator
Moderator
 
Posts: 11039
Joined: Sun Sep 14, 2003 2:18 pm
Location: Los Angeles

Re: Weird Body behavior and crash

Postby Lax » Wed Mar 13, 2019 9:17 am

Hi all,

ok thanks for pointing it out!
Indeed I have walabers conversion, that is used for position orientation of bodies etc. This is the code now:
Code: Select all
void QuatPosToMatrix(const Ogre::Quaternion& _quat, const Ogre::Vector3 &pos, dFloat* matrix)
      {
         // this takes a Quaternion and a Vector3 and creates a dFloat array
         // which is more meaningful to Newton.

         using namespace Ogre;
         Matrix3 rot;
         Vector3 xcol, ycol, zcol;

         Ogre::Quaternion quat(_quat);
         quat.normalise();
         quat.ToRotationMatrix(rot);   // creates a 3x3 rotation matrix from the Quaternion.

         xcol = rot.GetColumn(0);
         ycol = rot.GetColumn(1);
         zcol = rot.GetColumn(2);

         // now fill the final matrix with the appropriate data:
         matrix[0] = xcol.x;
         matrix[1] = xcol.y;
         matrix[2] = xcol.z;
         matrix[3] = 0.0f;

         matrix[4] = ycol.x;
         matrix[5] = ycol.y;
         matrix[6] = ycol.z;
         matrix[7] = 0.0f;

         matrix[8] = zcol.x;
         matrix[9] = zcol.y;
         matrix[10] = zcol.z;
         matrix[11] = 0.0f;

         matrix[12] = pos.x;
         matrix[13] = pos.y;
         matrix[14] = pos.z;
         matrix[15] = 1.0;
      }

So how must that be changed?

Thanks in advance
Lax
Lax
 
Posts: 115
Joined: Sat Jan 08, 2011 8:24 am

Next

Return to Bugs and Fixes

Who is online

Users browsing this forum: No registered users and 4 guests