Animation and Planning in Games

Assignment Two : Physics Based Animations

For assignment two I took two approaches for simulating water. My first attempt was to replicate the method in Particle-based Viscoelastic Fluid Simulation. I ended up with a working implemtation of their method without the viscoelasticity. My second approach solves the less general problem of shallow water dynamics, but ends up with a nice visual in the end..

DOWNLOAD MAC .APP FILE

DOWNLOAD SOURCE

Tools used

  • G3D (graphics engine) : https://g3d.sourceforge.net/
  • This basically serves as a wrapper around openGL calls, and provides utility classes such as Vectors and Cameras. I still wrote all the shaders for this project as well as all of the particle system code.

  • GroundTexture : https://www.startextures.com/free-nature-texture-2585.html
  • I used this nice open souce underwater vegetation for a better effect with my water simulations.

Features

Listed in assignment description

  • Realtime 3D SPH on the CPU
  • 2D Shallow Water
  • Ray Traced Water (2D shallow only)
  • 3D controlled camera (I used a G3D camera manipulator class)
  • 3D implementation
  • Realtime rendering
  • Video documentation
  • Lax-Wendroff integration
  • Real-time user interaction with system
  • Art Contest Submissions, see below

Art Gallery

I wanted to share more than one image from my shallow water method, so here is my album titled "The World is a Beautiful Place at Four in the Morning." If I had to choose one for the art contest I would submit the 4th one in the album aka "Bloooop blooop bloop blop plob plib".

User Controls

  • "1" - Reset SPH particles.
  • "2" - Reset shallow water simulation.
  • "3" - Toggle which simulation to view.
  • "p" - Pause simulation.
  • "o" - Toggle slow motion mode of simulation.
  • "r" - Toggle render mode of shallow water simulation.
  • "g" - Toggle gravity on SPH simulation.
  • "h" - Toggle constraints on SPH simulation.
  • "space" - Add water (both systems).

Contact: devinscottlange@gmail.com