Google Summer of Code 2020
Liquid Simulation Display Options - Final Report
This summer, I worked on providing visualization options for liquid simulation grids and improving fluid simulation display options on the whole in Workbench.
- Git branch used for this project:
- All the changes made in the branch
soc-2020-fluid-toolsare included in this patch for review:
- Master Commit:
- Weekly Reports Devtalk thread
- Feedback & Suggestions Devtalk thread
- Project Proposal
Implemented and added the following to the viewport display options for fluids:
- Raw voxel display or closest (nearest-neighbor) interpolation based on the centers of the grid cells for displaying the underlying voxel data of the simulation grids more clearly.
- An option to display gridlines when the slicing method is single.
- Visualization for flags, pressure and level-set representation grids with a fixed color coding based on Mantaflow's integrated GUI.
- Flags (
- The flags grid is an integer grid which stores the information about the state (or contents) of the underlying simulation grid cells. The color coding used for the visualization of flags is as follows (Cell Type -> Color):
- Fluid -> Blue
- Obstacle -> Gray
- Empty -> Purple
- Inflow -> Green
- Outflow -> Orange
- When more cell types coexist in a cell, the specified colors get added up to get the resultant color.
- Level-set Representation Grids
- Visualization options for the grids
mPhiObsInwhich contain the level-set representations for the liquid, inflow, outflow and obstacles respectively in the liquid simulation.
- Flags (
- Made vector display options available for visualizing external forces of the fluid domain.
- Marker And Cell grid visualization options for vector fields like velocity or external forces.
- A toggle for scaling the display vectors (needles and streamlines only) with magnitude of the actual vectors.
Coloring Options for Gridlines
- Range highlighting and cell filtering options for displaying the simulation grid data more precisely.
- The cells with values of the color mapped field within the user-specified range are highlighted with a user-specified color on the grid lines to display the grid values with better precision. These highlighted cells, filtered by a user-specified range, can be further filtered based on the cell type. (Only usable when Grid Display is enabled.)
- An option for coloring gridlines with flags.
Made various minor improvements and options for better user control over the visualization. I hope these changes helped the fluid viewport display to be more informative and usable.
Many thanks to my mentors Sebastián Barschkis, for the invaluable guidance throughout the project and Jacques Lucke, for mending my ways of coding! Thanks to Ray Molenkamp (LazyDodo) for supporting by providing the builds throughout. Thanks to the Blender community and Google Summer of Code for introducing development and collaboration to me on a larger scale. It has been an extraordinary learning experience. Thanks.