The smoke-like material seen during the intro and during teleportation is a a real time 2D fluid simulation (a small Navier-Stokes grid for the savvy). Initially, this fluid simulation was meant to occupy the whole screen space (kind of like Little Big Planet), and then emission would occur where needed (where the character is most of the time). The fluid simulation is run as a separate thread and updates at a different rate than the game (slightly slower). The fluid equations are adapted from Dunkan Brinsmead's fast maya fluid equations, which he so kindly make available to the public.
Ultimately, I couldn't simulate a fluid this large becuase I was simulating on the CPU (I've seen several implementations of fluid dynamics on the GPU, but sadly didn't have the time to try them). So, the end result was a low res fluid centered around the character at all times, that resets its contents when a new teleportation occurs. It still provides a nice subtle randomness to every teleport, which is something that occurs rather frequently in my game.
Ultimately, I couldn't simulate a fluid this large becuase I was simulating on the CPU (I've seen several implementations of fluid dynamics on the GPU, but sadly didn't have the time to try them). So, the end result was a low res fluid centered around the character at all times, that resets its contents when a new teleportation occurs. It still provides a nice subtle randomness to every teleport, which is something that occurs rather frequently in my game.
Comments
Post a Comment