Single Blog

  • Home
  • Weekly Development Notes #52 – Blender 2.93 Geometry Attributes
FLIP Fluids Development Notes #52

Weekly Development Notes #52 – Blender 2.93 Geometry Attributes

Ryan Guy 24. March 2021 1 Comments

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:

[gfycat data_id="unhealthytedioushorsefly"]

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:

Velocity Attribute Shader

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.

Prototype Build

UPDATE: These features are now implemented in FLIP Fluids Experimental Version 9.0.9.19 (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.

Notes:

  • 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.

Velocity Attribute Prototype Location

One Comment

Comments are closed.