Scaling with sio2

View previous topic View next topic Go down

Scaling with sio2

Post  matthew on Sun Feb 15, 2009 12:06 pm

My game requires that a small object move at high velocity with bullet physics. Occasionally, this small object flies thru other objects when I change the physics time step to speed up the animation.

It read that bulett physics sometime chokes when dealing with small objects at high velocities as described above.

Is there a way for me to scale every in blender X2, X3, or even x4 to overcome this limitation an then just render everything at a reduced scaled?

I'm trying to speed up the animation of the object where there physics are applied correctly.

Cheers,
Matt

matthew

Posts : 64
Join date : 2008-11-12

View user profile

Back to top Go down

Nevermind

Post  matthew on Sun Feb 15, 2009 1:11 pm

I was able able to solve my problem by just tweaking the parameters to sio2PhysicRender().

Cheers,
-matthew

matthew

Posts : 64
Join date : 2008-11-12

View user profile

Back to top Go down

Re: Scaling with sio2

Post  sio2interactive on Sun Feb 15, 2009 5:12 pm

Increasing the collision margin will help in this kind of case... basically what it does is: it increase the penetration boundary of the object so, while traveling at high velocity the "collision aura" around the object is ticker and will respond more appropriately.

Cheers,
avatar
sio2interactive

Posts : 1526
Join date : 2008-08-26
Age : 38
Location : Shanghai

View user profile http://sio2interactive.com

Back to top Go down

Re: Scalng with sio2

Post  matthew on Mon Feb 16, 2009 9:00 am

"Increasing the collision margin will help in this kind of case.."


very cool. i'll look into it. thanks!

matthew

Posts : 64
Join date : 2008-11-12

View user profile

Back to top Go down

Re: Scaling with sio2

Post  sw on Mon Feb 16, 2009 9:51 pm

i think there is two way to to that

1 :
use much more cpu time on the bullet :
stepSimulation(frameRate, 2);
and then reduce cpu time for opengl render , setup the
sio2->afilter = SIO2_IMAGE_ANISOTROPIC_1X;


2. another way is to splite your big mesh and increase the small mesh .
The collision object need to > 2.0 units and < 1000 units ( this take from the bullet forum, i forgeted the URL )

And the following take from Bullet User Manual


Avoid very small and very large collision shapes
The minimum object size for moving objects is about 0.2 units. When using default gravity of 9.8, those units are in meters so don‟t create objects smaller then 20 centimeter. It is recommended to keep the maximum size of moving objects smaller then about 5 units/meters.

Avoid large mass ratios (differences)
Simulation becomes unstable when a heavy object is resting on a very light object. It is best to keep the mass around 1. This means accurate interaction between a tank and a very light object is not realistic.

Combine multiple static triangle meshes into one
Many small btBvhTriangleMeshShape pollute the broadphase. Better combine them.

Use the default internal fixed timestep
Bullet works best with a fixed internal timestep of at least 60 hertz (1/60 second). For safety and stability, Bullet will automatically subdivide the variable timestep into fixed internal simulation substeps, up to a maximum number of substeps specified as second argument to stepSimulation. When the timestep is smaller then the internal substep, Bullet will interpolate the motion. This safety mechanism can be disabled by passing 0 as maximum number of substeps (second argument to stepSimulation): the internal timestep and substeps are disabled, and the actual timestep is simulated. It is not recommended to disable this safety mechanism.

Use less then 100 vertices in a convex mesh
It is best to keep the number of vertices in a btConvexHullShape limited. It is better for performance, and too many vertices might cause instability.
18


Avoid huge or degenerate triangles in a triangle mesh
Keep the size of triangles reasonable, say below 10 units/meters. Also degenerate triangles with large size ratios between each sides or close to zero area can better be avoided.
avatar
sw

Posts : 73
Join date : 2008-10-12

View user profile

Back to top Go down

Re: Scaling with sio2

Post  Sponsored content


Sponsored content


Back to top Go down

View previous topic View next topic Back to top

- Similar topics

 
Permissions in this forum:
You cannot reply to topics in this forum