Graphics Reference
In-Depth Information
There's moreā€¦
In order to allow our character animations to have an impact within the physics of the
simulated world, we can create a collision shape of bounding box for each bone in a
character's rig. With a new class inheriting from BulletSharp.MotionState , we can
retrieve each bone's current transform for the current frame in the animation. Using a
kinematic rigid body allows us to apply forces to the world without them, in turn,
affecting the bone's rigid body.
Due to the availability of a large number of threads and fast sorting capabilities of compute
shaders (for example, bitonic sort), it is possible to significantly increase the speed of the
broad- and narrow-phase collision detection for the rigid body collisions by implementing them
within compute shaders. However, the entire simulation will probably need to be implemented
on the GPU. This is because you will not want to do a part of the computation on the GPU and
then read the results back to CPU. Since the CPU and GPU run asynchronously to each other,
this can result in a lag or GPU/CPU underutilization.
See also
F Bullet Physics library homepage available at http://bulletphysics.org
F A soft body solver (for example, cloth) implemented with Direct3D 11
compute shaders within the Bullet Physics library 2.x available at
https://code.google.com/p/bullet/
F OpenCL implementation of Sweep and Prune (SAP) broad-phase and
Separate Axis Theorem (SAT) narrow-phase collision detection available
at https://github.com/erwincoumans/bullet3
F Stepping the World available at http://www.bulletphysics.org/
mediawiki-1.5.8/index.php/Stepping_The_World
F Example implementation of the bitonic sorting algorithm within a compute shader
available at http://code.msdn.microsoft.com/DirectCompute-Basic-
Win32-7d5a7408
Simulating ocean waves
In this recipe, we will look at a tried and tested technique for simulating ocean waves using
a series of Gerstner waves at varying amplitudes, wave lengths, frequencies, and directions
within a vertex shader (or domain shader).
 
Search WWH ::




Custom Search