-
Notifications
You must be signed in to change notification settings - Fork 193
Motion Blur Support
This document will detail the current state of the FLIP Fluids motion blur feature. As of version 1.0.3, motion blur rendering is experimental and has not yet undergone extensive testing.
At this moment, the Blender Python API does not offer a simple method to send motion blur data to cycles for rendering. FLIP Fluids motion blur support was implemented using the following workaround:
The feature works by having the simulator export speed vector data for each vertex of the mesh. In the addon, a shapekey is added to the next frame of the fluid using the exported vector data so that the mesh can transform into the shape of the next frame and this is what Cycles uses to render motion blur for the fluid surface.
Discussion regarding motion blur support can be found in this issue: #87
Motion blur rendering for the fluid surface is supported. See the Surface Settings Documentation for how to enable motion blur vector generation. See the Display Setting documentation for how to render the fluid surface motion blur.
Rendering with motion blur enabled creates a large amount of data in the Blender viewport. The Blender viewport can be unstable when handling a large amount of data and can cause errors when rendering with Cycles. It is recommended to close the viewport while rendering in Cycles using this workaround: Scene Troubleshooting: Blender often crashes suddenly or does not apply transforms while rendering.
Motion blur rendering for the whitewater particles is not currently supported. The motion blur workaround allows particles to be rendered with motion blur, however Cycles seems to be very unstable during whitewater motion blur rendering. Cycles will often disregard rendering motion blur on random frames and will often quit with the following error:
Error: CUDA error: Unknown error in cuMemcpyDtoH((uchar*)mem.data_pointer + offset, (CUdeviceptr)(mem.device_pointer + offset), size), line 591
Fra:37 Mem:332.41M (0.00M, Peak 428.32M) | Time:00:46.99 | Mem:302.19M, Peak:369.28M | Scene, RenderLayer | Cancel | CUDA error: Unknown error in cuMemcpyDtoH((uchar*)mem.data_poin
ter + offset, (CUdeviceptr)(mem.device_pointer + offset), size), line 591
CUDA error: Unknown error in cuMemFree(cuda_device_ptr(mem.device_pointer)), line 615
When motion blur rendering does work, it seems to lead to an extreme increase in render times often adding upwards of an hour per frame. The problems with whitewater motion blur rendering will need to be investigated further and perhaps the issues will need to be presented to the Blender developers to gain more insight into the problem.
Motion blur rendering for whitewater is implemented in the addon, but settings are not present in the UI due to the above issues. If you still want to try it out and enable motion blur for whitewater particles, you may due so by running the following script in the Blender text editor:
import bpy
domain_properties = bpy.context.scene.flip_fluid.get_domain_properties()
domain_properties.whitewater.generate_whitewater_motion_blur_data = True
domain_properties.render.render_whitewater_motion_blur = True
domain_properties.render.whitewater_motion_blur_scale = 1.0