Fluid Rendering & Image Morphing
Erich Erstu, Siim Kallas
The authors use fluid simulator for the purpose of representing states of fluid at different time frames. To visualize the process clusters of fluid particles are rendered as puddles rather than swarms of atoms.
Additionally, a library for atom cloud morphing has been developed so that the fluid rendering algorithm could also be used to render particle clouds.
The modularity of this project is justified by multiple side goals that the authors had. Namely, the developed code is planned to be used in a 2-dimensional video game that features real-time rendered liquids and in a Master's Thesis on the topic of image morphing.
For the final demo, preliminary results of the thesis will be shown and a real-time rendered fluid simulator is demonstrated, featuring laws of physics ornate by state of the art visual effects.
AtoMorph is a C++ image morphing library developed by Erich Erstu. It morphs raster images in real time using multiple threads and some degree of artificial intelligence to enhance the quality of the morph over time. The library also provides functionality to render and blend the morphs while taking advantage of multicore CPUs.
- libatomorph & Allegro5 Demo: svn://ats.cs.ut.ee/u/amc/lib/atomorph
- svn checkout svn://ats.cs.ut.ee/u/amc/lib/atomorph
- particle cloud morphing favouring the shortest trajectory
- colour gradients can be set to affect the morph
- linear, cosine and Perlin noise based colour interpolation
- linear and Catmull-Rom spline based trajectory interpolation
- Median Combining xor Averaging used for blending
- smart blending for the final morph - reduces the number of lonely pixels
Slime Time (Game):
Slime Time is a simple pong game developed by Erich Erstu during this course. It uses Allegro5 and a fluid simulator to demonstrate how fluid particles can be controlled to display complex meaningfulness.
- svn checkout svn://ats.cs.ut.ee/u/amc/allegro/SlimeTime
- Grant Kot's Fluid Simulator
- simple density-based fluid rendering
2D fluid rendering:
The renderer attempts to draw particles as a cohesive fluid by using a similar technique as was used in PixelJunk Shooter on PS3. Fluid particles are rendered as blobs onto an offscreen low resolution buffer, which is then blurred and scaled up. Color thresholding is added to simulate fluid edges and remove outer blur. Using this technique is sufficient for non-realistic games, but produces subpar results for image morphing.
Main libraries used:
- OpenGL for main rendering.
- GLFW for window creation.
- GLEW for extended OpenGL features.
The application is self contained, no additional libraries need to be installed. Installation instructions are available on the repository page.
- Repository: https://github.com/seemk/fsim
- Video: http://www.youtube.com/watch?v=sDDRM_UzZec
- Windows binaries (x86): http://www.upload.ee/files/3759368/bin_x86.zip.html