A place to discuss everything related to Newton Dynamics.
Moderators: Sascha Willems, walaber
by Julio Jerez » Mon Jan 07, 2013 8:04 am
you can upload to some free file share site, you can put a password of the file and then send me the link and the password on a pm.
-
Julio Jerez
- Moderator

-
- Posts: 12426
- Joined: Sun Sep 14, 2003 2:18 pm
- Location: Los Angeles
-
by Julio Jerez » Mon Jan 07, 2013 8:09 am
Joe can you link this to VS 2010? I had debugged this before, but the last demo I has not being able to run and know I know why it is.
-
Julio Jerez
- Moderator

-
- Posts: 12426
- Joined: Sun Sep 14, 2003 2:18 pm
- Location: Los Angeles
-
by JoeJ » Mon Jan 07, 2013 8:10 am
The path is correct.
Do you have VC Update1 installed? It came out a week before christmas and installed automatically for me,
maybe you have autoupdate off?
EDIT: I never used VC2010, but i could go down to VC2008
-

JoeJ
-
- Posts: 1489
- Joined: Tue Dec 21, 2010 6:18 pm
by Julio Jerez » Mon Jan 07, 2013 8:31 am
vs2008 is even better, that is my favorite version of visual studio, I hate VS2010 an dtha is why I do no want to go on the V2012 vanwagon yet.
I hear is very good, but I have being burned many time already.
link to 2008 and that will be fine.
-
Julio Jerez
- Moderator

-
- Posts: 12426
- Joined: Sun Sep 14, 2003 2:18 pm
- Location: Los Angeles
-
by JoeJ » Mon Jan 07, 2013 8:49 am
I like 2012 because it has the features i always missed: Dark color theme build in, variable highlighting, putting the compiler log in a sideview while keepeing it useful, you can scale up font when eyes get tired and it remembers what i want to be collapsed correctly.
Downsides are that it takes longer to load projects, Debug mode seems a bit slower.
I'll upload new demo in some howers.
-

JoeJ
-
- Posts: 1489
- Joined: Tue Dec 21, 2010 6:18 pm
by Julio Jerez » Mon Jan 07, 2013 11:40 am
I am inetrestind in 2012 because I saw a video tha calim they now have auto vectorization, and tha is on by default.
this is a good thonmg because if thsi si teh case I can get rid of all of the hand code simd using intrinsics.
However I tend no to trusth Miscrosoft, they climed featore for Visul sutdion 2010 and this is no true.
in 2010 the claime thay have predicate idiom expresion liek exp ? exp1 : exp2
also teh claim to finaly have conditional move for if statement and that was no true, they di added but only for 64 bit mode.
in fact the aba code generated by VS2010 in 32 bit mode in release, run slower that same binary using VS 2008.
when you add all of the IDE bugs of 2010, stuff like bach build not working, not backward compatibility on IDE macros with VS2008, an few mores, depedency for suproject has to be build manually and some time teh compiel does not find teh correct order, and few more,
and VS2010 to me is one of the worse version of visual studio. to me this is not juke because I have to have a prefetional version, whi mean I have to buy a profesional licence.
late when I am don with what I am doing now I see if I can test VS 2012, and see if it is better I will get rid of 2010
-
Julio Jerez
- Moderator

-
- Posts: 12426
- Joined: Sun Sep 14, 2003 2:18 pm
- Location: Los Angeles
-
by JoeJ » Mon Jan 07, 2013 2:23 pm
Yes, better simd support was primary reason for me to switch, but id' need to move to 64bit and don't dare to do that the next time

New demo is up, see PM
-

JoeJ
-
- Posts: 1489
- Joined: Tue Dec 21, 2010 6:18 pm
by Julio Jerez » Tue Jan 08, 2013 8:28 am
Got the demo now, and it is runs, first thing is this a self balancing ragdoll?
the screen is really bussy, I am trying to see can figure out wht ais going on in the program.
I see teh figure of a maniqui, standing of his feet whis are tow cylionder. not foots
It also have few small boxe at his feet, I also see many line moving around but I still cannot pin point the problem.
I am going to try loadin a serilizes scen in teh sand box, maybe I can reproduce some error there.
-
Julio Jerez
- Moderator

-
- Posts: 12426
- Joined: Sun Sep 14, 2003 2:18 pm
- Location: Los Angeles
-
by JoeJ » Tue Jan 08, 2013 9:08 am
Yes the ragdoll is self balancing - no external forces.
You can disable debug visualisations with some 'shadows' checkbox, read the included textfile for details on parameters etc.
The feet with cubes is a compound collision, as you can see by different colors.
PJani reported the same problem of 'sinking foots, then jitter' to me via PM.
So all 3 guys reporting the problem work with powered joints.
Maybe it's easyiest to reproduce using a kinematic joint pushing a single body into floor,
you can try that case with my demo to see it, see textfile.
-

JoeJ
-
- Posts: 1489
- Joined: Tue Dec 21, 2010 6:18 pm
by Julio Jerez » Tue Jan 08, 2013 10:04 am
JoeJ wrote:Maybe it's easyiest to reproduce using a kinematic joint pushing a single body into floor,
you can try that case with my demo to see it, see textfile.
yes, I read the texfile tha came wit thedemo, is does say teh steps, but still it i stoo much going on.
I am try to see if I can figure out the essence of eth problem so that I can recreate a demo that reproduce with some certanty,
so this problem happens primarilly shapes have joint and the shape is force to some other collsiion shape via collision.
Tha may explain why I have a hard time seeing it.
-
Julio Jerez
- Moderator

-
- Posts: 12426
- Joined: Sun Sep 14, 2003 2:18 pm
- Location: Los Angeles
-
by Julio Jerez » Tue Jan 08, 2013 10:57 am
I load the you exported scene into teh sand box and I can see all of teh peices on teh big box, but I do no see any error.
one of eth problem is that ther serialize does no export joint yet. I can do tow thongs.
1- re enable object piuck in teh sand box so tha I can move some o fteh small piece around,
I can use the kenematix joint maybe that will show the bug
2- I will add serialization to the joint library, that way the exportes scenes will be more acurate.
serializationn for costm joints will have a callback so that the user export what he wrote. I will add the implementations for the joint in the joint library
you will have to implment your after I add that.
-
Julio Jerez
- Moderator

-
- Posts: 12426
- Joined: Sun Sep 14, 2003 2:18 pm
- Location: Los Angeles
-
by JoeJ » Tue Jan 08, 2013 1:08 pm
possible, but lots of work - there should be a simpler way.
I tried this scene with only two objects, and the bug appears here too.
The sinking is visible, while the jittering very tiny but i think it's enough to reproduce.
sMat4 = dMatrix, sVec3 = dVector and Create* functions are similar as in your older demos.
I can make demo of that if you want...
- Code: Select all
sMat4 trans;
trans.Identity();
Shape *groundShape = CreateBoxShape (sVec3 (100, 10, 100));
trans.Identity();
*trans.Translation() = sVec3 (0,-5,0);
Body *ground = CreateRigidBody (0, trans, groundShape);
ReleaseShape (groundShape);
if (1)
{
Shape *sphShape = CreateSphereShape (2);
//Shape *sphShape = CreateBoxShape (sVec3 (4, 4, 4)); // works too
trans.Identity();
*trans.Translation() = sVec3 (0,1,-0);
Body *sph = CreateRigidBody (1, trans, sphShape);
ReleaseShape (sphShape);
CustomKinematicController *kj = new CustomKinematicController(sph, dVector (0,1,0));
kj->SetMaxLinearFriction (90000); // the bigger, the more penetration
return;
}
- Code: Select all
Body* CreateRigidBody (float mass, sMat4 &trans, Shape *shape)
{
trans.Reset4thColumn();
Body *body = ((NewtonPhysics*)this)->CreateRigidBody (mass, trans, shape);
if (body)
{
const float damp[] = {0.01f, 0.01f, 0.01f, 0.01f};
//const float damp = 0.01f;
NewtonBodySetAngularDamping (body, damp);
NewtonBodySetLinearDamping (body, 0.01f);
//NewtonBodyG
BodyData *data = new BodyData;
//todo: check alloc
NewtonBodySetUserData (body, (void*) data);
NewtonBodySetForceAndTorqueCallback (body, ForceAndTorqueCallback);
bodies.push_back (body);
BodySetMaterial (body, 0);
//NewtonBodySetContinuousCollisionMode (body, 1);
}
return body;
}
NewtonCollision* CreateSphereShape (float radius, sMat4 *offset = 0)
{
return NewtonCreateSphere (world, radius, SERIALIZE_ID_SPHERE, &(*offset)[0][0]);
}
NewtonCollision* CreateBoxShape (sVec3 &dim, sMat4 *offset = 0)
{
return NewtonCreateBox (world, dim.x(), dim.y(), dim.z(), SERIALIZE_ID_BOX, &(*offset)[0][0]);
}
-

JoeJ
-
- Posts: 1489
- Joined: Tue Dec 21, 2010 6:18 pm
by Julio Jerez » Tue Jan 08, 2013 1:14 pm
I just looking for a smaller demo that let me reproduce the bug reliably, what does the code bellow represent?
Is that a template of what will reproduce teh error? Maybe I can place that in one of eth sand box demo and test it.
-
Julio Jerez
- Moderator

-
- Posts: 12426
- Joined: Sun Sep 14, 2003 2:18 pm
- Location: Los Angeles
-
by JoeJ » Tue Jan 08, 2013 1:31 pm
Julio Jerez wrote:Is that a template of what will reproduce teh error? Maybe I can place that in one of eth sand box demo and test it.
Yes. It's not enough someone would call it a bug, but hopefully it's enough to see what happens.
-

JoeJ
-
- Posts: 1489
- Joined: Tue Dec 21, 2010 6:18 pm
by JoeJ » Tue Jan 08, 2013 2:14 pm
I made one more, this one is a good one:
- Code: Select all
Shape *groundShape = CreateBoxShape (sVec3 (100, 10, 100));
trans.Identity();
*trans.Translation() = sVec3 (0,-5,0);
Body *ground = CreateRigidBody (0, trans, groundShape);
ReleaseShape (groundShape);
if (1)
{
//Shape *sphShape = CreateSphereShape (2);
Shape *sphShape = CreateBoxShape (sVec3 (4, 4, 4)); // works too
trans.Identity();
*trans.Translation() = sVec3 (0,3,-0);
Body *sph = CreateRigidBody (1, trans, sphShape);
ReleaseShape (sphShape);
CustomKinematicController *kj = new CustomKinematicController(sph, dVector (0,3,0));
kj->SetMaxLinearFriction (1000);
//kj->SetTargetPosit (dVector (0,-5,0)); // jumping box
kj->SetTargetPosit (dVector (0,0,0)); // sink, jitter and recover cycle, as we see at ragdoll feet
return;
}
-

JoeJ
-
- Posts: 1489
- Joined: Tue Dec 21, 2010 6:18 pm
Return to General Discussion
Who is online
Users browsing this forum: No registered users and 0 guests