Over the years, I’ve tried several times to produce proper ray-traced renders of flow simulated with OpenFOAM — but I always ran into severe artifacting. This week, I spent some time on it again, and I think I’ve finally found a workflow that works!

Apparently, I was doing two things wrong:

  • Face normals on all fluid surfaces must be consistent and point outward. The surface sampling I was using via functionObjects created many randomly reversed faces.
  • All meshes need to be joined in Blender so that volumetric rendering works without artifacts.

With those fixes in place, rendering works fine. The question now is whether making the visuals fully realistic is actually the best approach.

Water is, by nature, almost transparent — so it’s difficult to convey flow clearly in realistic renders, especially if bubbles and foam are not simulated. Tinting the water in a slightly non-realistic way (with color subtly changing with depth) seems to work better. The attached video switches between both techniques.

The render isn’t perfect, but it’s a nice step forward — and good ground for future experimentation. What do you think?

BTW, thanks to Jan Höll for the tip about using OBJ files to bridge data between Paraview and Blender