Stacking problem

Report any bugs here and we'll post fixes

Moderators: Sascha Willems, Thomas

Stacking problem

Postby Witek900 » Sun Sep 20, 2009 8:22 am

Hi

I have problem with boxes stacking. They are very unstable. When SolverModel=1 and FrictionModel=0 it looks like that:
http://www.youtube.com/watch?v=fUz518gceqA&fmt=18

When SolverModel=0 and FrictionModel=0 then it looks like this:
http://www.youtube.com/watch?v=f3iEVz7Ft1g&fmt=18

Box's mass = 100

Please help
Witek900
 
Posts: 38
Joined: Mon Jan 26, 2009 1:29 pm
Location: Warsaw

Re: Stacking problem

Postby Julio Jerez » Sun Sep 20, 2009 8:46 am

did did just start to happens? or was always like that?
Julio Jerez
Moderator
Moderator
 
Posts: 12249
Joined: Sun Sep 14, 2003 2:18 pm
Location: Los Angeles

Re: Stacking problem

Postby Witek900 » Sun Sep 20, 2009 9:31 am

It started to hapen, when i used Newton 2.0(x). I don't rember version exactly.

Btw I use materials, but they have "normal" values (beetwen 0.0-1.0)
Witek900
 
Posts: 38
Joined: Mon Jan 26, 2009 1:29 pm
Location: Warsaw

Re: Stacking problem

Postby Julio Jerez » Sun Sep 20, 2009 10:20 am

you have to have some setting out of bound, maybe too high restitution or incorrect inertia.
Julio Jerez
Moderator
Moderator
 
Posts: 12249
Joined: Sun Sep 14, 2003 2:18 pm
Location: Los Angeles

Re: Stacking problem

Postby Witek900 » Sun Sep 20, 2009 1:23 pm

Restution and other material's properties are correct, as I sad. Intertia is also correct (when i set it 10x higher, stack still were unstable). I also turned on/off continuous collison mode, but it behaves the same
Witek900
 
Posts: 38
Joined: Mon Jan 26, 2009 1:29 pm
Location: Warsaw

Re: Stacking problem

Postby JernejL » Mon Sep 21, 2009 3:46 am

how big are the boxes in units?
Help improving the Newton Game Dynamics WIKI
User avatar
JernejL
 
Posts: 1578
Joined: Mon Dec 06, 2004 2:00 pm
Location: Slovenia

Re: Stacking problem

Postby Witek900 » Mon Sep 21, 2009 11:01 am

Box dimensions = [1, 1, 1]
Box mass = 100
Box inertia = [16.667, 16.667, 16.667]
Box linear damping = 0.01
Box angular damping = [0.01, 0.01, 0.01]
NewtonBodySetFreezeState(NB, 0);
NewtonBodySetAutoSleep(NB, 1);

Ground is tree collision

Box-Ground material properties:
Static friction = 0.64
Dynamic friction = 0.36
Elasticity = 0.09
Softesss = 0.1

I use these functions to set material's properties:
NewtonMaterialSetDefaultElasticity,
NewtonMaterialSetDefaultFriction,
NewtonMaterialSetDefaultSoftness,
NewtonMaterialSetDefaultCollidable

Box-Ground material = Box-Box material

Continuous collison mode = off

NewtonSetSolverModel(NewtonWorld, 0);
NewtonSetFrictionModel(NewtonWorld, 0);
NewtonSetPlatformArchitecture(NewtonWorld, 3);
NewtonSetMultiThreadSolverOnSingleIsland(NewtonWorld, 0);
NewtonSetThreadsCount(NewtonWorld, 4);
NewtonSetMinimumFrameRate(NewtonWorld, 60);

When i comment these lines above stack are stable. They move very slowly (but its acceptable)


Graviti acceleration = -9.81

World size
Min = [-1000, -1000, -1000]
Max = [1000, 1000, 1000]


Newton version - 2.09
OS - Windows Vista x64
Compiler - Delphi 7

Anything else?
Witek900
 
Posts: 38
Joined: Mon Jan 26, 2009 1:29 pm
Location: Warsaw

Re: Stacking problem

Postby Julio Jerez » Mon Sep 21, 2009 11:35 am

I do not know what could tha be, those stacks do not look tha tall, for that kind of instability, and the parameters seems right.
The solver can certanlly deal with that.
do you have a demo I can test?
perhaps one with a single stack so tha it is easier to debug

can you try with
NewtonSetPlatformArchitecture(NewtonWorld, 0);
NewtonSetThreadsCount(NewtonWorld, 1);

this will make it simpler to debug also
Julio Jerez
Moderator
Moderator
 
Posts: 12249
Joined: Sun Sep 14, 2003 2:18 pm
Location: Los Angeles


Return to Bugs and Fixes

Who is online

Users browsing this forum: No registered users and 4 guests

cron