Covering the week of March 15th – 19th, 2021.
Hey, it’s our 52nd development update for the FLIP Fluids liquid simulation addon for Blender! Similar to the last update, the past week’s work mainly involve a lot of testing to get ready for the next stable release. I also had a chance to try out a cool new feature in Blender 2.93: custom geometry attributes that can be accessed in Cycles.
Custom Geometry Attributes
With the new geometry attribute features in Blender 2.93 Alpha, we can now export custom data from our FLIP Fluids engine that can be accessed in through a Cycles Attribute Node for rendering. Here’s an example of exporting velocity to the surface mesh:
In this test, we used the new Blender Python API feature to attach velocity vectors to each vertex on the mesh. The vector could then be accessed in a Cycles shader through an attribute we set called flip_velocity:
This opens up so many possibilities for new shading features as we can now attach different types of data to our simulation meshes including vectors, colours, and numbered values. Some possible examples:
- Shading based on velocity direction, velocity speed, and vorticity
- Shading based on particle age and particle remaining lifetime
- Shading based on fluid inflow sources (ex: multiple material fluids)
This Blender functionality couldn’t have come at a better time as our recent development work has been centred around expanding our attribute import and export functionality within the simulation engine.
UPDATE: These features are now implemented in FLIP Fluids Experimental Version 184.108.40.206 (21-APR-2021) or later. See Development Notes #55 for more details.
Want to play around with velocity based shading? We have created a very early proof-of-concept build if you are interested. This is a single-purpose build only meant for use in testing velocity attribute simulation and rendering. The code is not yet optimized or in a good design, but is functional under the current limitations. The feature is also partially incomplete as there are missing features in the Blender 2.93 Python API that are needed for full functionality.
- Only supported in Blender 2.93 (Alpha builds can be found here). This build may break as Blender 2.93 develops.
- The Generate Velocity Vectors option in the FLIP Fluid Surface panel must be enabled before baking.
- Whitewater features are not yet supported. A required geometry attribute transfer for instanced particles feature is not yet implemented in Blender 2.93.
- Frequent render crashes are expected. There is a suspected bug in Blender 2.93 that is causing render crashes due to our addon accessing attributes between frames (similar to T60094). This is something we will need to investigate and report on. It is recommended to render via command line as a workaround.
Accessing the Prototype Build
As this is a very early single-purpose build, the feature is not yet suitable to be included in our regular experimental releases package. Instead the build can be found in the Older_Versions_(unzip)_(24_mar_2021).zip package (See product downloads).
After unzipping this file, the installation file, notes, and an example .blend file can be found in experimental releases > misc > velocity_geometry_attribute_prototype.