Million assertions triggered in dgAABBPolygonSoup.cpp

A place to discuss everything related to Newton Dynamics.

Moderators: Sascha Willems, walaber

Million assertions triggered in dgAABBPolygonSoup.cpp

Postby Forthehorde » Mon Jan 06, 2014 6:39 am

dgAssert (dgAbsf(dgAbsf(obbAabbInfo[0][0]) - obbAabbInfo.m_absDir[0][0]) < dgFloat32 (1.0e-4f)); For example
I can't even run app since it asserts every frame in debug mode.

I am simply running newton kinematic controller and newtonmesh serialized mesh, what can be wrong?
User avatar
Forthehorde
 
Posts: 26
Joined: Sun Dec 29, 2013 6:17 am

Re: Million assertions triggered in dgAABBPolygonSoup.cpp

Postby Forthehorde » Mon Jan 06, 2014 6:46 am

I must say the character controller feels very good compared to 2 years ago, good job Julio!
User avatar
Forthehorde
 
Posts: 26
Joined: Sun Dec 29, 2013 6:17 am

Re: Million assertions triggered in dgAABBPolygonSoup.cpp

Postby Forthehorde » Mon Jan 06, 2014 7:17 am

Should I be using BasicController or AdvancedController? dNewtonPlayerManager or not?
I wish you would keep wiki up to date with this stuff.
User avatar
Forthehorde
 
Posts: 26
Joined: Sun Dec 29, 2013 6:17 am

Re: Million assertions triggered in dgAABBPolygonSoup.cpp

Postby Forthehorde » Mon Jan 06, 2014 7:22 am

Well the problem I have now is stair step does not work, I can climb up any object instantly.
User avatar
Forthehorde
 
Posts: 26
Joined: Sun Dec 29, 2013 6:17 am

Re: Million assertions triggered in dgAABBPolygonSoup.cpp

Postby Julio Jerez » Mon Jan 06, 2014 9:33 am

Forthehorde wrote:dgAssert (dgAbsf(dgAbsf(obbAabbInfo[0][0]) - obbAabbInfo.m_absDir[0][0]) < dgFloat32 (1.0e-4f)); For example
I can't even run app since it asserts every frame in debug mode.
I am simply running newton kinematic controller and newtonmesh serialized mesh, what can be wrong?


are these kinematic controller and newtonmesh serialized mesh, demos in the sand box, I do no see those.
there is one thing I nee to complete for that play controller to work again.
let me see fi I can complete now.
give me until tomorrow before you try again


you can use either advance and basic, they are subclasses of the same basic controller, one of for teaching how to set it up, the other is for teaching how it interact with the environment
yes the play controller now is cool, and it does handle the steps and ramp also.
let me just complete that part that I change a while back and then I forget to uncomment back.
Julio Jerez
Moderator
Moderator
 
Posts: 12426
Joined: Sun Sep 14, 2003 2:18 pm
Location: Los Angeles

Re: Million assertions triggered in dgAABBPolygonSoup.cpp

Postby Forthehorde » Mon Jan 06, 2014 9:49 am

Thanks,

I get the error using a NewtonMesh serialized file, I am not using sandbox, I just create scene in 3ds max and make NewtonMesh from it, like this:

Image
User avatar
Forthehorde
 
Posts: 26
Joined: Sun Dec 29, 2013 6:17 am

Re: Million assertions triggered in dgAABBPolygonSoup.cpp

Postby Forthehorde » Mon Jan 06, 2014 10:21 am

I forgot to ask one thing,

Will you add jump and crouch to the controller please? I am not sure about those.

The current jump you can press space many times it still jump (not check if on floor at begin of jump)
And crouch it needs to adjust collision shape or something dynamically.
User avatar
Forthehorde
 
Posts: 26
Joined: Sun Dec 29, 2013 6:17 am

Re: Million assertions triggered in dgAABBPolygonSoup.cpp

Postby Julio Jerez » Mon Jan 06, 2014 10:36 am

Yes I will add the crouch, for eth jump that a user decision.

you control the play with this function
void SetPlayerVelocity (dFloat forwardSpeed, dFloat lateralSpeed, dFloat verticalSpeed, dFloat headingAngle, const dVector& gravity, dFloat timestep);

I added a function
bool IsInFreeFall() const

you can call that to set verticalSpeed, to zero if it was already on the air.
Sync to svn to get the new function
for the newton Mesh, to what format are you exporting? I like to know what is the error that you are getting.
It should work all the time
Julio Jerez
Moderator
Moderator
 
Posts: 12426
Joined: Sun Sep 14, 2003 2:18 pm
Location: Los Angeles

Re: Million assertions triggered in dgAABBPolygonSoup.cpp

Postby Forthehorde » Mon Jan 06, 2014 11:06 am

Code: Select all
NewtonMeshEndFace(SceneData);

   //NewtonMeshSimplify;

   NewtonMeshSaveOFF(SceneData, "NewtonTestData.off"); //Test only! to try in nme.exe

   NewtonCollision * Collision = NewtonCreateTreeCollisionFromMesh(GlobalWorld, SceneData, 0);

   NewtonMeshDestroy(SceneData);

   if(Collision)
   {
      FILE * File;
      errno_t err = fopen_s(&File, CollisionFilename, "wb");
      NewtonCollisionSerialize(GlobalWorld, Collision, SerializeFile, File);
      fclose(File);

      NewtonDestroyCollision(Collision);
   }
   else std::cout << "Fatal error in collision generation";


That I use in offline app that convert collada to engien format + collision

This on load:

Code: Select all
void GameMap::SetupCollision()
{
   PhysicsWorld = NewtonCreate();
   NewtonInvalidateCache(PhysicsWorld);
   NewtonSetSolverModel(PhysicsWorld, 8); //8
   NewtonSetFrictionModel(PhysicsWorld, 0); //0
   NewtonSetThreadsCount(PhysicsWorld, 8); //todo: query thread count properly

   dResetTimer();

   std::wstringstream ss; ss << L"./data/maps/" << Filename << L".hc";
   std::wstring WInput = ss.str();
   std::string Input = xws2s(WInput);

   FILE * File;
   errno_t err = fopen_s(&File, Input.c_str(), "rb");
   NewtonCollision * Collision = NewtonCreateCollisionFromSerialization(PhysicsWorld, DeSerializeFile, File);
   fclose(File);

   dMatrix Matrix = GetIdentityMatrix();
   NewtonBody * Body = NewtonCreateDynamicBody(PhysicsWorld, Collision, &Matrix[0][0]);
   NewtonBodySetMassProperties(Body, 0.0f, Collision);

   NewtonDestroyCollision(Collision);

//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
//CREATE AND INSERT A CHARACTER CONTROLLER INTO THE NEW SCENE
//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////

   PlayerManager = new AdvancePlayerControllerManager(PhysicsWorld);

   dMatrix InsertLocation(GetIdentityMatrix());
   InsertLocation.m_posit.m_x  = 0.0f;
   InsertLocation.m_posit.m_y  = 100.0f;
   InsertLocation.m_posit.m_z  = 0.0f;
   InsertLocation.m_posit      = FindFloor(PhysicsWorld, InsertLocation.m_posit, 1000.0f);
   PlayerController            = new AdvancePlayerEntity(PlayerManager, 3.5f, 15.0f, InsertLocation);

   SetupDebugRender(); //Debug Only!!!
}
User avatar
Forthehorde
 
Posts: 26
Joined: Sun Dec 29, 2013 6:17 am

Re: Million assertions triggered in dgAABBPolygonSoup.cpp

Postby Julio Jerez » Mon Jan 06, 2014 12:02 pm

can you export the mesh to a .fbx format, or to the collada and send to me for testing?
Julio Jerez
Moderator
Moderator
 
Posts: 12426
Joined: Sun Sep 14, 2003 2:18 pm
Location: Los Angeles

Re: Million assertions triggered in dgAABBPolygonSoup.cpp

Postby Forthehorde » Mon Jan 06, 2014 12:41 pm

Sure, the scene might need downscale, its ok for character controller height 12 or so but I guess it could be scaled down and character controller be height 2 or something I don't know which is best.

http://www.sendspace.com/file/jpqnyw
User avatar
Forthehorde
 
Posts: 26
Joined: Sun Dec 29, 2013 6:17 am

Re: Million assertions triggered in dgAABBPolygonSoup.cpp

Postby Forthehorde » Tue Jan 07, 2014 6:17 am

I updated to latest svn and character still climb up any objects!
Although the jump now works good.
Just need to fix crouch and climb bug.

Do I need these for controller body?
NewtonBodySetContinuousCollisionMode(body, 1); //Kinematic support ccd?
m_controller->SetRestrainingDistance(1.0f); //What is this anyway?
User avatar
Forthehorde
 
Posts: 26
Joined: Sun Dec 29, 2013 6:17 am

Re: Million assertions triggered in dgAABBPolygonSoup.cpp

Postby Julio Jerez » Tue Jan 07, 2014 9:30 am

when I try to download that file http://www.sendspace.com/file/jpqnyw
that site try to install and program on my computer, last time I did that I had a nasty virus that the only way I could fix was by moving to window 8 and reinstalling everything from scratch.
those free share site are full of really nasty malware, can you use Google drive?
Julio Jerez
Moderator
Moderator
 
Posts: 12426
Joined: Sun Sep 14, 2003 2:18 pm
Location: Los Angeles

Re: Million assertions triggered in dgAABBPolygonSoup.cpp

Postby Julio Jerez » Tue Jan 07, 2014 9:44 am

Forthehorde wrote:I updated to latest svn and character still climb up any objects!

you have to wait until this weekend until I have time to fix that secund problem. it is a big task.

Forthehorde wrote:Do I need these for controller body?
NewtonBodySetContinuousCollisionMode(body, 1); //Kinematic support ccd?

not, the [play is a kinematic body, it does it own CCD.

Forthehorde wrote:m_controller->SetRestrainingDistance(1.0f); //What is this anyway?

this is an option,
this place a guard distance between the player and bodies in the scene, it like making the play father
when a dynamics body hit the player, they will act as if they were both dynamics and the pay will push the other body.
if the restraining distance is not zero, the when other body in with in the restring distance and the but not touching the player collision, then
the player will slide as if the restring distance was the collision surface and the other body was static.
Julio Jerez
Moderator
Moderator
 
Posts: 12426
Joined: Sun Sep 14, 2003 2:18 pm
Location: Los Angeles

Re: Million assertions triggered in dgAABBPolygonSoup.cpp

Postby Forthehorde » Tue Jan 07, 2014 9:54 am

Ok thanks I will wait until weekend.

Sorry here is gdrive
https://drive.google.com/file/d/0B8l7mj ... sp=sharing
User avatar
Forthehorde
 
Posts: 26
Joined: Sun Dec 29, 2013 6:17 am

Next

Return to General Discussion

Who is online

Users browsing this forum: Julio Jerez and 3 guests