Large size differences, multiple threads

Physics APIs, Physics file formats, Maya, Max, XSI, Cinema 4D, Lightwave, Blender, thinkingParticles™ and other simulation tools, exporters and importers
Post Reply
Clouded Leopard
Posts: 1
Joined: Wed Jan 04, 2012 11:50 am

Large size differences, multiple threads

Post by Clouded Leopard »

I'm new here so I apologize if I have posted a stupid question or in the wrong forum.

For demonstrating my problem, I have written a silly little fantasy story which's physics I'm pretending to be simulating with Bullet.

"The Gallant Swordsman of Heroic Justice approaches the Evil Stronghold with the intention of saving the Beautiful Princess. The Towering Giant of Destruction notices the hero and answers by picking up an island and throwing it at him. The hero dodges the attack, but his Elegantly Flowing Cape is hit. The hero then proceeds to the tallest tower of the Evil Stronghold, and encounters the Evil Archmage of Darkness there. The Archmage uses his vast might to summon the Hat-Stealing Wind of Doom and Demise. As the hero struggles to avoid being blown away, not only his cape, but also the Tiny Yet Important Necklace he once received from the Princess, is affected. However, the hero manages to overcome the Archmage's Dark Magic, and stabs him with the Sacred Blade of Justified Retribution, leading to a happy ending."

So, in this simulation, there are very huge objects (the giant, the island), very tiny objects (the necklace, certain details of the hero's cape) and things between the two (the hero, the Archmage). Bullet's manual states that the engine is quite intolerant of very big size differences, which obviously hinders the implementation of a scene such as this.

A solution I have been considering is that the hero's accessories, for example, have their own simulation where they collide with the (more detailed) collision shape of the hero. Obviously, there needs to be some way for the different simulations to interact. However, since no Gallant Swordsman could be wicked enough to ignore the benefits of multicore processors, I want that different simulations can run in different threads. However, if the different simulations running simultaneously are able to affect each other directly, determinism would be ruined.

One option is that any messages between the threads are delivered in the beginning of the next cycle. However, this would cause other simulations to lag slightly. Also, there are differences in the potential interaction levels. For example, it would be fairly simple to have the hero's stuff react to the wind by having it applied to all simulations in the beginning of the cycle (which would also mean that the wind would affect everything simultaneously). On the other hand, what about the island projectile hitting and deforming the cape? Could it be implemented as the larger object temporarily entering the local simulation as a kinematic body? After all, when a huge object hits a small one, the former's velocity change is negligible.

Any opinions or suggestions?
Post Reply