Simulate wind and 'floating world' with gravity vector?

Please don't post Bullet support questions here, use the above forums instead.
abaraba
Posts: 56
Joined: Thu Jun 19, 2008 7:54 am

Simulate wind and 'floating world' with gravity vector?

Post by abaraba »

hi,

this question is actually about performance, let me explain...
after implementing 'world_map' as a static mesh using "btBvhTrinagleMeshShape" this question came about: - what if my whole stage is a huge boat and my static world_mesh is not so static anymore... now, i guess one could use any of the Bullet's dynamic or kinetic shapes as representation of the whole boat, but how they compare speed-wise?

- btBvhTrinagleMeshShape & btHeightFieldTerrainShape
vs.
- some really big dynamic/kinetic shapes
(i did not get that far, so i don't know about different options here)


assuming static shapes perform faster than dynamic/kinetic, where HeightFieldTerrain is probably the fastest, we still however, with our boat as a world_mesh, want to use btBvhTrinagleMeshShape and so, here's the title question:

1.)
could we simulate floating motion of our static world_mesh while keeping it static and just by modifying gravity vector, then optionally leaning camera in some direction or anyhow else visualise that motion?

2.)
similarly, could we simulate wind or maybe earthquake where varying gravity vector could point anywhere, including upwards, so stuff would start lifting of the ground?


i believe this should work,
because, at the end, when you apply all the forces from all directions there is only one vector that will describe object translation for the current frame, that vector is most of the time just gravity, but tho we can describe 'gravity' as a force that moves objects towards the centre of the earth we can also describe it as any point towards which objects tend to move, so if we put magnet near paper clips we can say they now "gravitate towards the magnet", in other words gravity is just another force that just happens to be always there and point downwards, but once there are other forces strong enough to cancel or overcome it, we can not only throw it out of the equation, but use it to simulate that other dominant force

...as you see in both cases its about performance, with boat example the question is whether dynamic shapes can perform as fast as static and in the case of simulating wind it may be more efficient to update only gravity vector than to iterate through all the dynamic objects and apply forces explicitly to each one

further,
if wind case is possible to simulate then the same thing could be applied underwater, say to simulate underwater current... i guess the unnatural thing about it would be that all the objects would behave too much alike and while that might be good on a larger scale, individually they should act more differently depending on shape, volume and density ...and that's where angle and surface area come to play with air/fluid resistance, density, viscosity, pressure difference and what not...

now, i'm complete beginner with Bullet Physics and not sure if i'm using it properly, but i've noticed even in the Bullet demos sometimes some objects seem too light, too bouncy or *spin* too much.. that's just opinion of course as we don't know what are they supposed to be made of, we know the mass, but don't know the distribution of its density and many other material properties that make it "bounce differently" ...well, not sure if adding air resistance would "fix" anything, or if there is anything need fixing at all, but they say with speeds over 100km/h air resistance is huge part of the equation... which, somehow, leads me to yet another question:

- say we have two identical programs using different version of Bullet library, they produce different output, but which one is "more correct"? where, in a real life, do you find green rubbery bunny, so to speak, to confirm it really does bounce like that?


back to fluid dynamics,
- does Bullet deal with anything to help out simulate air resistance?
- is there any other, non-realistic, game-like and maybe more obvious way how to go about simulating parachute with Bullet? (say attach top of the parachute to some constraint to simulate swinging motion)


i wonder...
even if surface area/air resistance were implemented in Bullet, enough to simulate falling quad or leaves from a tree, what other Physics properties would need to be implemented to achieve the following:

-initialize aircraft shape with some horizontal velocity, step simulation and actually get upward lifting force depending on mesh geometry, taking into account every polygon?

since it seems that even today people are not quite sure why and how planes fly, i guess that above might not be too realistic to expect ...anyway, is this kind of thing suitable and maybe considered to be implemented in some future release of Bullet Physics library?


thanks,
http://geocities.com/ze_aks



[EDIT:]
funny enough,
later on i was amazed to find this: http://www.bulletphysics.com/Bullet/php ... f=4&t=2287

-----
"study of atoms with particle accelerators is just like smashing a clock against the wall and trying to figure out how it works by looking at all the broken parts flying around"