CCD Detection problem

A place to discuss everything related to Newton Dynamics.

Moderators: Sascha Willems, walaber

CCD Detection problem

Postby mything1004 » Fri Jan 03, 2014 3:33 am

Hellow

We are researching newton engine for using at mechanical control and engineering.
Newton have many options so it's better than other physics engine .

but we are recently stucked because we are fronted at some problems.
we do not know it is real bug or just we don't find setting options or it is being under constructed.

The problems are
1. CCD detection problem
we made a test source code that is from CNewton Tutorals
and extened BackgroundBody to 6 faced cube with dNewtonCollisionMesh - the direction is inside to outside-
and made BoxBody with NewtonBodySetContinuousCollisionMode(body->GetNewtonBody(), 1);
when we throwed the boxes to the walls they frequently penetrate the walls even on the CCD mode

2. Slider joint problem
we constrainted 20 body with slider joint eche one is on the other one.
but the constraints were moving like rubber.
we are using slider for mechinical control so we need hard constraints like moving on a steel
but we have not found the option that could change the stiffness.

here is our vedio
http://youtu.be/3pUl-rumBx0

we are so small and poor to contribute newton directly.
but We have a future.
please help us


Regards
Auto Machine team.
mything1004
 
Posts: 3
Joined: Thu Jan 02, 2014 11:12 pm

Re: CCD Detection problem

Postby Julio Jerez » Fri Jan 03, 2014 6:33 am

Oh awesome, I am grad you are using the CNewton Class.

before anything, can you provide a test demo so that I can see what is wrong wit the collision first?
on the slider, there is a better solver but is disable now, first I like to see what you are doing, because usually people connect part together is unrealistic ways.

for example the force that brake a joint is the engine is it the order of hundred of time the force that will break a real life articulation.
for example people connect part to make rag doll, and then the pick an drag by the limb. when the see the limbs detaching the say is no realistic, but consider doing that to a human or a life side dummy.
In the video it look like you are picking and dragging the articulation. or I am see it wrong?

when used properly it does work as expected.
look as some industrial assembly lines made with newton

you also check the google sketch videos.

but first let us see what is wrong with the CCD. My guess is that ccd is not being activated.
please let me see what you are doing.

finally there is a exact solve mode that make the joint a lot stronger, that disable now but I will see if I can make functional again.
for mechanical application when speed is not as important as it is for game, that solve is much better.
Julio Jerez
Moderator
Moderator
 
Posts: 12426
Joined: Sun Sep 14, 2003 2:18 pm
Location: Los Angeles

Re: CCD Detection problem

Postby mything1004 » Sat Jan 04, 2014 6:36 am

Hi

Thank you for your reply.
To have more approach and to give you any conveniunce
We rewrite our demo for sandbox.

In this demo, I used SVN Revision 1438.
and rewrite ContinueCollision.cpp
backup your file, and over write this file to your project.
It will be well done.(the file is attached.)

http://youtu.be/xCOwLNdTapQ

And If we set up correctly, (If we had wrong setup to activate CCD mode then it is gonna be wrong )
What we found out is that When positon is moving The penetrate is happened more.
We guess that Camera(or player) movement influence CCD prediction some incorrectly.
It is just only our guess.

On the slider problem.
We already saw almost of these video even google sketch , and decided to reserch Newton.
Newton is really powerfull than any other engines.
and decent system.
Our goal is to control mechenical system very intuitively.
we have been finding a way like picking or force to move mechine object on a slider or other constraints.
this moving informations will control real machine.
if we just think about a conrol way , we may select a kinematic way to make object constraints .
even don't need dynamic collision detection.
but this way can't extend to simulation machenics.
so we have been finding a way to conrol machines dynmically using force.

if we use picking with 6Dof constraint , and if we pull a dynamic object it is connected with the other object constrainted 6DOF
we can definetely pull it down. but it is easily to be broken.
because picking constrant and connection constraint is the same.
what if we can setup constraint stiffness and damping or what if we can setup more harder constraint value.
it can solve very easily. it is natural strong constrant and weak constrant are co-existence.
and even for system stablity, Deep level constraints need more harder constrants.

In the discret world constraint is a diffculty.
But I know that our way is here and our future is here.

Your another slider should be very helpful.
Thanks again.

Best Regard.
Auto Machine team.
D.S. Jang.
Attachments
ContinueCollision.zip
CCD TEST DEMO
(2.09 KiB) Downloaded 201 times
mything1004
 
Posts: 3
Joined: Thu Jan 02, 2014 11:12 pm

Re: CCD Detection problem

Postby Julio Jerez » Thu Jan 09, 2014 4:51 pm

Ok I am testimg this now.
There first thong Il will do is that I will add that demo to the snadBox demos set. and I will chek that in
this was we can work on the same code.

the secund thing is that I will change the the initinal fire direction so that I can see what is going on,
righ now shot backwords, and It is har to see if the collsion is in fact failing.
Julio Jerez
Moderator
Moderator
 
Posts: 12426
Joined: Sun Sep 14, 2003 2:18 pm
Location: Los Angeles

Re: CCD Detection problem

Postby Julio Jerez » Thu Jan 09, 2014 5:08 pm

umm, I just checke in it, I am also runnin teh demo to see if I can see the CCD malfuntion.
But I do not see any.
do you do anythong special to make the bug happens?


never ming I see some collision missing now. I will debug thsi to see what is wrong.
Julio Jerez
Moderator
Moderator
 
Posts: 12426
Joined: Sun Sep 14, 2003 2:18 pm
Location: Los Angeles

Re: CCD Detection problem

Postby mything1004 » Thu Jan 09, 2014 11:56 pm

Hellow
I read some questions.

righ now shot backwords, and It is har to see if the collsion is in fact failing.

I wrote the source code to shoot toward and checked.
(I think that some code is different)
I used camera matrix.

do you do anythong special to make the bug happens?

Press 'R' key(Fire key) and, Drag mouse up , down, left and right simultaneously.

There first thong Il will do is that I will add that demo to the snadBox demos set. and I will chek that in
this was we can work on the same code.

That's good. I will Update SVN with latest Revision. and Check it too.

I really appreciate for your efforts.

Best Regards.
AutoMachine team
D.S. Jang.
mything1004
 
Posts: 3
Joined: Thu Jan 02, 2014 11:12 pm

Re: CCD Detection problem

Postby Julio Jerez » Fri Jan 10, 2014 3:54 am

Ok I did the easy part first.
I re enabled the exact solve mode.
this make joint a lot stronger, for the type of application that you are aiming to.

the joints also has a parameter that let you select when to use exact solver mixed with the iterative solver.
Code: Select all
// for c Inteface
void NewtonUserJointSetSolver (const NewtonJoint* const joint, int solver, int maxContactJoints)

//or if you are using cumtom joints
void CustomJoint::JointSetSolverMode (bool mode, int maxContactJoints) const;

this function let you mix exact solve with iterative solver mode, basically you set the engine to iterative mode, and what you add joints
you set that joint to be solved using exact or iterative solver mode.

this way only the part that you want more accuracy will be solve using exact solver and everything else will be iterative wit is faster.

tomorrow I see what is wrong wit the CCD.
Julio Jerez
Moderator
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

cron