As stated in the Arnold documentation:
By default, MtoA will not motion blur an alembic cache of a mesh that has a changing topology. However, MtoA can use the velocity attribute as a source to derive motion blur data from a mesh that has a changing topology using a motion vector.
Using velocity data from a simulated mesh, i.e a fluid simulation, with changing topology, to render motion blur is a common yet fiddly task, which I recently encountered an issue with on a project.
When doing some early render tests on some fluid sims I was seeing artefacts in the shading of the sim. As it had a complex translucent shader with displacement applied to it I couldn’t tell if there was a problem with the displacement/shading or if there was something wrong with the mesh itself. Using a combination of debug shading and testing settings, I narrowed down the issue to motion blur, with the geometry only appearing distorted when enabling motion blur.
After running through the attribute creation process outlined in the documentation again, testing all of the ROP Alembic Output nodes motion blur settings, recreating the issue using the example alembic file and testing my cache on a separate machine and version of Maya (thank you Harvey), the problem was still persisting, so I decided to go back to the drawing board (i.e Houdini) to work on the export process again.
When exporting an alembic cache from Houdini the UV point attribute needs to be promoted to a vertex attribute to be read in Maya so I decided on a hunch to try promoting the created velocity point colour attribute to a vertex attribute, against the advised setup in the documentation and found that when exported as a vertex attribute rather than a point attribute, the motion blur on the fluid mesh behaved correctly. After a number of hours of testing, to find such a simple solution was both frustrating and a relief, and I was able to move on with testing the render pipeline for the shots.
To avoid having to go through working this issue out again, I set up a very simple HDA to handle the creation of the velocityPV attribute, with a toggle to switch between exporting as a point or vertex attribute. To cover all bases I also threw in a toggle to control normalisation of the velocity vectors and a simple visualiser to check that everything is working correctly (and it always looks cool).
You can grab the tool here: Direct Download
|Attribute Class||The class which the velocityPV attribute will be applied to, either point or vertex|
|Normalise||If enabled, the incoming velocity attribute will be normalised before being converted to a colour attribute and exported|
|Visualise||Toggles a visualiser to see the velocityPV colour attribute applied to the mesh|
Can be any geometry with a v point attribute.