Status: Initial part of milestone 1 merged into master.
Team
Commissioner: ?
Project leader: @Brecht Van Lommel (brecht)
Project members: @Sebastián Barschkis (sebbas) @Jacques Lucke (JacquesLucke)
Description
Big picture: Volumes need their own native datablock type, so Blender can support other use cases like rendering OpenVDB files or procedurally generating volumes.
Use cases:
- Existing use cases (smoke modifier on mesh).
- OpenVDB file rendering.
- Procedurally generating volumes (part of everything nodes).
Design:
- New Volume datablock (similar to Mesh) with an OpenVDB volume data structure with an arbitrary number of attributes.
- Rendered by Cycles and Eevee, first as dense volume as we have now, and later with native sparse volume rendering.
- Volume objects would have modifiers (add resolution detail, fluid domain modifier, ...)
Engineer plan: ?
Work plan
Milestone 1
Time estimate: 10 workdays to complete implementation, 5 for review/docs/bugs.
Completed for merge into Master.
- New volume object data type, based on OpenVDB grids
- Support reading OpenVDB files from disk
- Add New material adds principled volume material
- Solve problem with not enough FILTER_ID bits
- Show warning when loading VDB points file
- Auto rotate object from Y-up to Z-up when file was written by Houdini?
- Rendering of dense grids
- Cycles
- Basic integration
- Use principle volume as default material if no material exists
- Support different transform per grid
- Eevee
- Basic integration
- Use principle volume as default material if no material exists
- Support rotation/shear in transform
- Shader code generation for arbitrary number of grids
- Support different transform per grid
- Workbench
- Basic integration
- Control over which grids to display (active grid only by default?)
- Use workbench object color settings
- Density scale setting
- Figure out why density changes with object scale
- Add option to specify volume density in object space
- D1777: Cycles: implement per shader volume step size.
- Cycles
- Viewport drawing and selection of volume bounds
- Wireframe bounds display of tree nodes (at intermediate or leaf levels)
- Points display type, that shows one point per coarse/fine node
- Selection support (based on wireframe bounds?)
- User interface
- Open file browser immediately from Add menu
- VDB / volume file type in the file browser
- Drag & drop VDB files into 3D viewport
- Finalize properties editor UI layout
- Python API
- Grids
- Transforms
- File loading
- Error reporting
- On-demand loading
- Global cache
- Dependency graph copy-on-write integration
- Refactor mesh runtime storage to be reusable by other objects types
- Automatic instancing for objects without modifiers, like meshes
- Fix runtime backup memory leak
- Volume frame sequences
- Settings to use single volume or sequence, start, length, offset
- Dependency graph integration
- Auto detection of sequences when loading file
Viewport
Time estimate: ?
- Viewport selection by rendering fine boxes when drawing for selection (current volumes can't be selected except through the outliner or the origin point if visible)
- Workbench: additional viewport display options
- Option to use lower resolution volume for viewport display
Rendering
Time estimate: ?
- Option to pick byte/half/float precision for 3D texture in Cycles and Eevee
- Eevee/workbench
- Share textures in global volume cache
- Preserve batch cache through display setting changes
- Sparse grid rendering using NanoVDB
- Cycles
- Optimize mesh bounds creation by using OpenVDB tree
- Sparse grid rendering using NanoVDB (D8794)
- Share 3D images like global volume cache
- Auto complete grid names in shader nodes
Modifiers
Time estimate: ?
- Mesh to Volume modifier
- Points to Volume modifier (from PointCloud or Mesh)
- Volume to Mesh modifier
- Displacement modifier (D9075)
- Texture modifier with blending modes (add, multiply)
- Filter modifier (dilate, erode, blur, sharpen, ...)
- Fluid Simulation modifier, replacing the current modifier on meshes for gasses (not liquids)
Other
- Mantaflow: output OpenVDB files with multiple grids and standard grid names
- VDB tree/voxels API using pyopenvdb
- File packing
- File saving
- Python API
- Operator in the UI (unclear where still)
- Grid metadata: show in properties editor
- Support other applications overwriting OpenVDB files open in Blender (T75901)
- Volume edit mode and file saving
- OpenVDB level sets, clusters, perspective transform
- VDB files with modifiers are reloaded whenever parameters are changed, revisit this (memory vs. performance)
Relevant links:
- OpenVDB Official Site
- New Object Types design document
- Code Documentation