Tristan Marrec

Computer Graphics Programmer
Home
LinkedIn
Email contact@tmarrec.dev Updated

Fluid Simulation Internship -

During my 6-month NII International Internship Program 2020, supervised by Ryoichi Ando, I studied research papers on fluid simulation and implemented a Navier-Stokes fluid solver from scratch in C++ and OpenGL. Starting with smoke simulation and gradually evolving towards liquid simulation.

Here’s a summary of what I’ve been working on:

  • Advection: Semi-Lagrangian scheme and MacCormack method
  • Projection: pressure solver with Neumann boundary condition
  • Linear solvers: Gauss-Seidel relaxation and Conjugate gradient method with modified incomplete Cholesky zero-level preconditioning
  • Grid structure: basic and staggered
  • Level set: with reinitialization
  • Parallelization: use of OpenMP and SSH remote compilation/execution of simulations on remote computing servers
  • Rendering: GLSL implementation of the Volume Ray Marching algorithm, export Marching Cube meshes to a .ply file to be read by Mitsuba 2

Code available on GitHub or download ZIP.

Early live demo

This is a rough translation from C++ to JavaScript of my early work on fluid simulation, it is highly inaccurate so it can be easily rendered in real time in the browser.

Try to move the mouse inside!

Final Mitsuba renderings

Here are some renderings of my own simulations using the Mitsuba renderer, each image requiring several seconds or even minutes to calculate and render.

Timeline of my progress

References

  1. Stable fluids - Jos Stam. 1999. In Proceedings of the 26th annual conference on Computer graphics and interactive techniques - SIGGRAPH'99. ACM Press. doi.org/10.1145/311535.311548

  2. Fluid simulation for computer graphics - Robert Bridson. 2016. CRC Press, Taylor & Francis Group, CRC Pressis an imprint of the Taylor & Francis Group, an informa Business, Boca Raton. doi.org/10.1201/9781315266008

  3. Fluid simulation - Robert Bridson and Matthias Müller-Fischer. 2007. In ACM SIGGRAPH 2007 courses on SIGGRAPH'07. ACM Press. doi.org/10.1145/1281500.1281681

  4. Practical animation of liquids - Nick Foster and Ronald Fedkiw. 2001. In Proceedings of the 28th annual conference on Computer graphics and interactive techniques - SIGGRAPH'01. ACM Press. doi.org/10.1145/383259.383261

  5. Adventures in Fluid Simulation - Miles Macklin. 2010. blog.mmacklin.com/2010/11/01/adventures-in-fluid-simulation

  6. An Unconditionally Stable MacCormack Method - Andrew Selle, Ronald Fedkiw, ByungMoon Kim, Yingjie Liu, and Jarek Rossignac. 2007. Journal of Scientific Computing 35, 2-3 (Nov. 2007), 350–37. doi.org/10.1007/s10915-007-9166-4

  7. Real-Time Fluid Dynamics for Games - Jos Stam. 2003. graphics.cs.cmu.edu/nsp/course/15-464/Spring11/papers/StamFluidforGames.pdf

  8. Real-Time Simulation and Rendering of 3D Fluids - Keenan Crane, Ignacio Llamas, and Sarah Tariq. 2007. in GPU Gems 3. Chapter 30. dl.acm.org/doi/10.5555/1407436

  9. Visual simulation of smoke - Ronald Fedkiw, Jos Stam, and Henrik Wann Jensen. 2001. In Proceedings of the 28th annual conference on Computer graphics and interactive techniques - SIGGRAPH'01. ACM Press. doi.org/10.1145/383259.383260

  10. Realistic Animation of Liquids - Nick Foster and Dimitri Metaxas. 1996. Graphical Models and Image Processing 58, 5 (Sept. 1996), 471–483. doi.org/10.1006/gmip.1996.0039

  11. Mitsuba 2 - mitsuba-renderer.org

  12. OpenMP - openmp.org