Cycles: motion blur on native fluid simulation #117104

Open
opened 2024-01-14 00:29:50 +01:00 by Petko Ganev · 8 comments

System Information
Operating system: Windows-10-10.0.19045-SP0 64 Bits
Graphics card: NVIDIA GeForce RTX 2060 SUPER/PCIe/SSE2 NVIDIA Corporation 4.6.0 NVIDIA 546.01

Blender Version
Broken: version: 4.0.1, branch: blender-v4.0-release, commit date: 2023-11-16 16:40, hash: d0dd92834a08
Worked: NA

Short description of error
Missing motion blur on baked fluid object:

  1. I've baked a fluid sim of a simple waterfall(native fluid solver).
  2. I've checked speed vectors in the mesh tab(physics column), which If I understand correctly should be transferring velocity data from the particles to the mesh vertices.
  3. I've unchecked deformation blur in the object settings of the domain, because I'm dealing with geo that's changing in poly count.
  4. I've checked MB in cycles tab.

Exact steps for others to reproduce the error

  1. Create a domain object for liquids.
  2. Create a flow object.
  3. Select the domain -> in physics tab, under liquid check mesh and use speed vectors.
  4. Same tab, under cache, in format volumes select uni cache (not sure about this one, I was advised that it should be able to write velocity data, but I doubt it, because it's a volume format and we're not dealing with a volume here, however, vdb doesn't work either).
  5. Select the domain -> in object tab, under motion blur, uncheck deformation.
  6. Bake a few frames.
  7. Render image and pull your hair out, because of missing motion blur. :D
**System Information** Operating system: Windows-10-10.0.19045-SP0 64 Bits Graphics card: NVIDIA GeForce RTX 2060 SUPER/PCIe/SSE2 NVIDIA Corporation 4.6.0 NVIDIA 546.01 **Blender Version** Broken: version: 4.0.1, branch: blender-v4.0-release, commit date: 2023-11-16 16:40, hash: `d0dd92834a08` Worked: NA **Short description of error** Missing motion blur on baked fluid object: 1. I've baked a fluid sim of a simple waterfall(native fluid solver). 2. I've checked `speed vectors` in the mesh tab(physics column), which If I understand correctly should be transferring velocity data from the particles to the mesh vertices. 3. I've unchecked `deformation blur` in the object settings of the domain, because I'm dealing with geo that's changing in poly count. 4. I've checked MB in cycles tab. **Exact steps for others to reproduce the error** 1. Create a domain object for liquids. 2. Create a flow object. 3. Select the domain -> in `physics` tab, under `liquid` check `mesh` and `use speed vectors`. 4. Same tab, under `cache`, in `format volumes` select `uni cache` (not sure about this one, I was advised that it should be able to write velocity data, but I doubt it, because it's a `volume format` and we're not dealing with a volume here, however, vdb doesn't work either). 5. Select the domain -> in `object` tab, under `motion blur`, uncheck `deformation`. 6. Bake a few frames. 7. Render image and pull your hair out, because of missing motion blur. :D
Petko Ganev added the
Priority
Normal
Type
Report
Status
Needs Triage
labels 2024-01-14 00:29:51 +01:00
Member

Thanks for the report. Can confirm the missing motion blur. Guess in your case (provided file) you can keep the deformation enabled.
Mantaflow has no active developer right now so I'm marking this as known issue.

Thanks for the report. Can confirm the missing motion blur. Guess in your case (provided file) you can keep the `deformation` enabled. Mantaflow has no active developer right now so I'm marking this as known issue.
Pratik Borhade changed title from can't get cycles to render motion blur on native fluid simulation to Cycles: motion blur on native fluid simulation 2024-01-15 06:49:46 +01:00
Pratik Borhade removed the
Type
Report
label 2024-01-15 07:05:37 +01:00
Member

To my knowledge, deformation motion blur is required to render motionblur with simulations (with or without changing poly count), disabling that only renders object motion blur (and after all, the object itself does not move at all).

I've unchecked deformation blur in the object settings of the domain, because I'm dealing with geo that's changing in poly count.

@McTwark : what makes you think you would have to disable (instead of enable) deformation motion blur in that case?

To my knowledge, deformation motion blur is required to render motionblur with simulations (with or without changing poly count), disabling that only renders object motion blur (and after all, the object itself does not move at all). >I've unchecked deformation blur in the object settings of the domain, because I'm dealing with geo that's changing in poly count. @McTwark : what makes you think you would have to **disable** (instead of **enable**) deformation motion blur in that case?
Philipp Oeser added
Status
Needs Information from User
and removed
Status
Confirmed
labels 2024-01-15 10:21:22 +01:00
Member

@Blendify : https://docs.blender.org/manual/en/4.1/physics/fluid/type/domain/liquid/mesh.html is also a bit outdated, it still mentiones "They (speed vectors) can be used to compute image-based motion blur with the compositing nodes".

Nowadays, we can render MB directly (no need to use the compositor).
But could/should mention that deformation MB is required here.

@Blendify : https://docs.blender.org/manual/en/4.1/physics/fluid/type/domain/liquid/mesh.html is also a bit outdated, it still mentiones "They (speed vectors) can be used to compute image-based motion blur with the compositing nodes". Nowadays, we can render MB directly (no need to use the compositor). But could/should mention that deformation MB is required here.
Author

To my knowledge, deformation motion blur is required to render motionblur with simulations (with or without changing poly count), disabling that only renders object motion blur (and after all, the object itself does not move at all).

I've unchecked deformation blur in the object settings of the domain, because I'm dealing with geo that's changing in poly count.

@McTwark : what makes you think you would have to disable (instead of enable) deformation motion blur in that case?

@lichtwerk I thought that 'deformation blur' makes the renderer track the location of each vertex by id(basically how each vert is transforming), and when you have changing polycount(which is always the case when meshing moving points), the id would also be different each frame which would 'confuse' the renderer which vert is where. I tried illustrating it in the attached files, if that helps(the verts are not moving much, but when a vert disappears, the renderer receives wrong information about the location of each vert based on id and we get the long streaks of mb). So based on that understanding(which may be wrong, of course, but I'm working off of houdini logic), I thought that when I disable 'deformation blur' the renderer looks at the 'velocity' attribute stored on vertices and bases the motion blur on that.

As I'm writing this I'm getting more confused, because I realize there's no way to have more than 1 MB 'step' if there's no 'invariable' id that's based on how many points there were from the start of the sim, instead of a 'changing' id which is based on current frame point count.In houdini, all those 'id' attributes are very much clear when looking at the spreadsheet, but blender's spreadsheet only displays @P and @velocity.

Anyway, even with 'disabled' deformation the mb is missing, right? I'd like to have a better grasp on things, so I'd appreciate an explanation where my understanding is crappy.

> To my knowledge, deformation motion blur is required to render motionblur with simulations (with or without changing poly count), disabling that only renders object motion blur (and after all, the object itself does not move at all). > > >I've unchecked deformation blur in the object settings of the domain, because I'm dealing with geo that's changing in poly count. > > @McTwark : what makes you think you would have to **disable** (instead of **enable**) deformation motion blur in that case? @lichtwerk I thought that 'deformation blur' makes the renderer track the location of each vertex by id(basically how each vert is transforming), and when you have changing polycount(which is always the case when meshing moving points), the id would also be different each frame which would 'confuse' the renderer which vert is where. I tried illustrating it in the attached files, if that helps(the verts are not moving much, but when a vert disappears, the renderer receives wrong information about the location of each vert based on id and we get the long streaks of mb). So based on that understanding(which may be wrong, of course, but I'm working off of houdini logic), I thought that when I disable 'deformation blur' the renderer looks at the 'velocity' attribute stored on vertices and bases the motion blur on that. As I'm writing this I'm getting more confused, because I realize there's no way to have more than 1 MB 'step' if there's no 'invariable' id that's based on how many points there were from the start of the sim, instead of a 'changing' id which is based on current frame point count.In houdini, all those 'id' attributes are very much clear when looking at the spreadsheet, but blender's spreadsheet only displays @P and @velocity. Anyway, even with 'disabled' deformation the mb is missing, right? I'd like to have a better grasp on things, so I'd appreciate an explanation where my understanding is crappy.
Member

For Fluid sims, a "velocity" attribute is generated/exported that is "correct" for the frame that is being rendered [you can also generate this "by hand" in GN if you like], so the renderer doesnt really have to figure motion out based on point ID/position (see 128eb6cbe9).
If no such velocity attribute exists, the renderer usually disables deformation blur if it detects changing topology/polycount.
If I am not mistaken, Cycles only ever looks at the "external" velocity attribute (from sims, alembic, USD or "handmade" in geometry nodes etc) when deformation motion blur is enabled, if it disabled, then it just means "just object motion blur".

Your example file is a bit different in the sense that it uses instances on points.
If you only render the mesh without deformation motion blur, you get no motion blur at all (only the mesh has motion, not the object).
When instancing on these points, apparently the motion of the points gets transferred into the object transform of each instance which then works even if deformation MB is disabled. However, in the case of changing pointcount, this does what you describe (fails, long streaks etc.). @brecht : not sure this is a bug? Shouldnt the same motion exist for the underlying point and "its" instance?

I realize there's no way to have more than 1 MB 'step'...

I think this is because the velocity attribute is only "available" once for every frame (see recent # #116792 / bcfb2e4a83). Maybe there are tricks to actually export/use more steps per frame when simulating liquid, havent checked in detail here yet.

In houdini, all those 'id' attributes are very much clear when looking at the spreadsheet, but blender's spreadsheet only displays @P and @velocity

Not sure if I understand this correctly, afaik, there is no 'invariable' id concept in blender for (fluid) simulations, maybe you can elaborate how this looks like and why it is useful.

Anyway, even with 'disabled' deformation the mb is missing, right?

Not sure I understand this either. Is this comment meant for broken-deformation-blur.blend? Or for cycles-missing-MB-on-native-fluid-liquid-sim.blend ?

For Fluid sims, a "velocity" attribute is generated/exported that is "correct" for the frame that is being rendered [you can also generate this "by hand" in GN if you like], so the renderer doesnt really have to figure motion out based on point ID/position (see 128eb6cbe928e58dfee1c64f340fd8d663134c26). If no such velocity attribute exists, the renderer usually disables deformation blur if it detects changing topology/polycount. If I am not mistaken, Cycles only ever looks at the "external" `velocity` attribute (from sims, alembic, USD or "handmade" in geometry nodes etc) when deformation motion blur is enabled, if it disabled, then it just means "just object motion blur". Your example file is a bit different in the sense that it uses instances on points. If you only render the mesh without deformation motion blur, you get no motion blur at all (only the mesh has motion, not the object). When instancing on these points, apparently the motion of the points gets transferred into the object transform of each instance which then works even if deformation MB is disabled. However, in the case of changing pointcount, this does what you describe (fails, long streaks etc.). @brecht : not sure this is a bug? Shouldnt the same motion exist for the underlying point and "its" instance? >I realize there's no way to have more than 1 MB 'step'... I think this is because the velocity attribute is only "available" once for every frame (see recent # #116792 / bcfb2e4a8319037631e50f964a5a548e255c6cc3). Maybe there are tricks to actually export/use more steps per frame when simulating liquid, havent checked in detail here yet. >In houdini, all those 'id' attributes are very much clear when looking at the spreadsheet, but blender's spreadsheet only displays @P and @velocity Not sure if I understand this correctly, afaik, there is no 'invariable' id concept in blender for (fluid) simulations, maybe you can elaborate how this looks like and why it is useful. >Anyway, even with 'disabled' deformation the mb is missing, right? Not sure I understand this either. Is this comment meant for `broken-deformation-blur.blend`? Or for `cycles-missing-MB-on-native-fluid-liquid-sim.blend` ?
Author

For Fluid sims, a "velocity" attribute is generated/exported that is "correct" for the frame that is being rendered [you can also generate this "by hand" in GN if you like], so the renderer doesnt really have to figure motion out based on point ID/position (see 128eb6cbe9).
If no such velocity attribute exists, the renderer usually disables deformation blur if it detects changing topology/polycount.
If I am not mistaken, Cycles only ever looks at the "external" velocity attribute (from sims, alembic, USD or "handmade" in geometry nodes etc) when deformation motion blur is enabled, if it disabled, then it just means "just object motion blur".
Your example file is a bit different in the sense that it uses instances on points.
If you only render the mesh without deformation motion blur, you get no motion blur at all (only the mesh has motion, not the object).
When instancing on these points, apparently the motion of the points gets transferred into the object transform of each instance which then works even if deformation MB is disabled. However, in the case of changing pointcount, this does what you describe (fails, long streaks etc.).

Thanks for taking the time to explain, I think I got it. My confusion comes from that same concepts are named differently in different dccs. In houdini, you have 'transform' mb, which is the 'object' mb in blender. Then you have 'geometry' motion blur, which is 'deformation' mb in blender, and then you have 'velocity' blur which is based on attributes stored on points.

Not sure I understand this either. Is this comment meant for broken-deformation-blur.blend? Or for cycles-missing-MB-on-native-fluid-liquid-sim.blend ?

It was meant for 'cycles-missing-MB-on-native-fluid-liquid-sim.blend', but O my god...It actually works when I enable 'deformation blur' I don't know how I missed that, I thought I tested it, I feel ashamed, sorry... It works only with 1 MB 'step' though, >1 and it crashes on render.

Not sure if I understand this correctly, afaik, there is no 'invariable' id concept in blender for (fluid) simulations, maybe you can elaborate how this looks like and why it is useful.

hmm, I can only explain the workflow in houdini, if that would be helpful. So in the houdini's flip solver, you have the option to add a unique id to each particle (1st attached image), which you can then use to add whatever attributes consistently, even if the point count changes, when matching that 'id' each frame.(the workflow is to add attributes on the points, which then get transferred on the geometry in the meshing stage). In houdini, to get a 'curved' motion blur, the renderer (both mantra and karma) looks for an 'accel' attribute. Acceleration is the changing of velocity, so '(v - prev_v) / timeinc'. So when you supply that 'accel' attribute and have more than 2 'geometry' samples (2 'geometry' samples in houdini is 1 mb 'step' in blender, if I understand correctly), you get curved mb, on geometries with changing polycounts. (2nd attached image is 2 samples, 3rd attached is 4 samples)

Again, thanks for taking the time to explain things!

> For Fluid sims, a "velocity" attribute is generated/exported that is "correct" for the frame that is being rendered [you can also generate this "by hand" in GN if you like], so the renderer doesnt really have to figure motion out based on point ID/position (see 128eb6cbe9). If no such velocity attribute exists, the renderer usually disables deformation blur if it detects changing topology/polycount. If I am not mistaken, Cycles only ever looks at the "external" velocity attribute (from sims, alembic, USD or "handmade" in geometry nodes etc) when deformation motion blur is enabled, if it disabled, then it just means "just object motion blur". Your example file is a bit different in the sense that it uses instances on points. If you only render the mesh without deformation motion blur, you get no motion blur at all (only the mesh has motion, not the object). When instancing on these points, apparently the motion of the points gets transferred into the object transform of each instance which then works even if deformation MB is disabled. However, in the case of changing pointcount, this does what you describe (fails, long streaks etc.). Thanks for taking the time to explain, I think I got it. My confusion comes from that same concepts are named differently in different dccs. In houdini, you have 'transform' mb, which is the 'object' mb in blender. Then you have 'geometry' motion blur, which is 'deformation' mb in blender, and then you have 'velocity' blur which is based on attributes stored on points. > Not sure I understand this either. Is this comment meant for broken-deformation-blur.blend? Or for cycles-missing-MB-on-native-fluid-liquid-sim.blend ? It was meant for 'cycles-missing-MB-on-native-fluid-liquid-sim.blend', but O my god...It actually works when I enable 'deformation blur' I don't know how I missed that, I thought I tested it, I feel ashamed, sorry... It works only with 1 MB 'step' though, >1 and it crashes on render. > Not sure if I understand this correctly, afaik, there is no 'invariable' id concept in blender for (fluid) simulations, maybe you can elaborate how this looks like and why it is useful. hmm, I can only explain the workflow in houdini, if that would be helpful. So in the houdini's flip solver, you have the option to add a unique id to each particle (1st attached image), which you can then use to add whatever attributes consistently, even if the point count changes, when matching that 'id' each frame.(the workflow is to add attributes on the points, which then get transferred on the geometry in the meshing stage). In houdini, to get a 'curved' motion blur, the renderer (both mantra and karma) looks for an 'accel' attribute. Acceleration is the changing of velocity, so '(v - prev_v) / timeinc'. So when you supply that 'accel' attribute and have more than 2 'geometry' samples (2 'geometry' samples in houdini is 1 mb 'step' in blender, if I understand correctly), you get curved mb, on geometries with changing polycounts. (2nd attached image is 2 samples, 3rd attached is 4 samples) Again, thanks for taking the time to explain things!
Member

I updated the docs in 063ee652c1

I updated the docs in https://projects.blender.org/blender/blender-manual/commit/063ee652c1b1f8d57470b58c45792d3413136693

Hi,
I've just tested motion blur with Fluids and the problem seem to be that the motion vectors are not being saved when caching using OpenVDB format.

If you change the format back to UniCache, motion blur is rendered.

Hi, I've just tested motion blur with Fluids and the problem seem to be that the motion vectors are not being saved when caching using OpenVDB format. If you change the format back to UniCache, motion blur is rendered.
Philipp Oeser added
Status
Needs Triage
and removed
Status
Needs Information from User
labels 2024-03-13 13:35:41 +01:00
Iliya Katushenock added
Status
Needs Info from Developers
and removed
Status
Needs Triage
labels 2024-04-07 22:18:50 +02:00
Sign in to join this conversation.
No Label
Interest
Alembic
Interest
Animation & Rigging
Interest
Asset Browser
Interest
Asset Browser Project Overview
Interest
Audio
Interest
Automated Testing
Interest
Blender Asset Bundle
Interest
BlendFile
Interest
Collada
Interest
Compatibility
Interest
Compositing
Interest
Core
Interest
Cycles
Interest
Dependency Graph
Interest
Development Management
Interest
EEVEE
Interest
EEVEE & Viewport
Interest
Freestyle
Interest
Geometry Nodes
Interest
Grease Pencil
Interest
ID Management
Interest
Images & Movies
Interest
Import Export
Interest
Line Art
Interest
Masking
Interest
Metal
Interest
Modeling
Interest
Modifiers
Interest
Motion Tracking
Interest
Nodes & Physics
Interest
OpenGL
Interest
Overlay
Interest
Overrides
Interest
Performance
Interest
Physics
Interest
Pipeline, Assets & IO
Interest
Platforms, Builds & Tests
Interest
Python API
Interest
Render & Cycles
Interest
Render Pipeline
Interest
Sculpt, Paint & Texture
Interest
Text Editor
Interest
Translations
Interest
Triaging
Interest
Undo
Interest
USD
Interest
User Interface
Interest
UV Editing
Interest
VFX & Video
Interest
Video Sequencer
Interest
Virtual Reality
Interest
Vulkan
Interest
Wayland
Interest
Workbench
Interest: X11
Legacy
Blender 2.8 Project
Legacy
Milestone 1: Basic, Local Asset Browser
Legacy
OpenGL Error
Meta
Good First Issue
Meta
Papercut
Meta
Retrospective
Meta
Security
Module
Animation & Rigging
Module
Core
Module
Development Management
Module
EEVEE & Viewport
Module
Grease Pencil
Module
Modeling
Module
Nodes & Physics
Module
Pipeline, Assets & IO
Module
Platforms, Builds & Tests
Module
Python API
Module
Render & Cycles
Module
Sculpt, Paint & Texture
Module
Triaging
Module
User Interface
Module
VFX & Video
Platform
FreeBSD
Platform
Linux
Platform
macOS
Platform
Windows
Priority
High
Priority
Low
Priority
Normal
Priority
Unbreak Now!
Status
Archived
Status
Confirmed
Status
Duplicate
Status
Needs Info from Developers
Status
Needs Information from User
Status
Needs Triage
Status
Resolved
Type
Bug
Type
Design
Type
Known Issue
Type
Patch
Type
Report
Type
To Do
No Milestone
No project
No Assignees
5 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: blender/blender#117104
No description provided.