Is there a way to utilize the Velocity Field in a VDB to generate subframe interpolation data in a Heterogeneous volume in order to achieve proper temporal motion blur? I have the Velocity Field included in the VDB import, however, I’m not sure how to actually utilize it to create the subframe data.
Steps to Reproduce
Hi,
thanks for reaching out. There is a commit which enables writing of the velocity of the heterogeneous volume to a velocity buffer by setting r.HeterogeneousVolumes.Velocity to 1, however I have not been able to test this properly (the only example I found that exports velocity, explosion.vdb from the OpenVDB samples page, contains just a single VDB frame, not a frame sequence).
I will assign this case back to Epic, so someone with deeper knowledge of the VDB animation system can have a look.
Thanks,
Sam
Hi,
We currently do not take velocity into consideration when evaluating the density field. As Sam mentions, you can export the velocity data to the Scene Velocity texture by enabling the CVar above. This currently only works when there is another asset that is visibly exporting velocity. Since only one velocity value is written to the channel, this is only viable if the volume is sufficiently dense, acting more like a surface.
Performing correct 3-dimensional sub-frame interpolation would require modifying the material to perform akin to temporal advection on the density value. In the past, I have had successful results when implementing Eulerian Motion Blur to do this advection step: https://diglib.eg.org/items/06146232\-53c9\-4af5\-93c6\-c7746e54341a
The main issue with the technique is the significant cost of evaluating density multiple times within the material. The data access pattern becomes more unpredictable as the velocity magnitude increases, and that has a significant impact on performance.