Render: Merge EEVEE and Cycles motion blur settings #117913

Merged
Miguel Pozo merged 10 commits from pragma37/blender:pull-merge-motion-blur-settings into main 2024-02-08 16:49:30 +01:00
Member

(Note that this is tagged as WIP just to ensure it doesn't get merged before the 4.2 split, but it's ready for review)

Merge duplicated motion blur settings between Cycles and EEVEE, and move them to RenderData/scene.render:

  • scene.cycles.motion_blur_position -> scene.render.motion_blur_position
  • scene.eevee.use_motion_blur -> scene.render.user_motion_blur
  • scene.eevee.motion_blur_position -> scene.render.motion_blur_position
  • scene.eevee.motion_blur_shutter -> scene.render.motion_blur_shutter

On the C/C++ side, this also renames RenderData::blurfac to RenderData::motion_blur_shutter.

(Note that this is tagged as WIP just to ensure it doesn't get merged before the 4.2 split, but it's ready for review) Merge duplicated motion blur settings between Cycles and EEVEE, and move them to `RenderData`/`scene.render`: * `scene.cycles.motion_blur_position` -> `scene.render.motion_blur_position` * `scene.eevee.use_motion_blur` -> `scene.render.user_motion_blur` * `scene.eevee.motion_blur_position` -> `scene.render.motion_blur_position` * `scene.eevee.motion_blur_shutter` -> `scene.render.motion_blur_shutter` On the C/C++ side, this also renames `RenderData::blurfac` to `RenderData::motion_blur_shutter`.
Miguel Pozo added 6 commits 2024-02-06 19:28:46 +01:00
Miguel Pozo requested review from Brecht Van Lommel 2024-02-06 19:31:15 +01:00
Miguel Pozo requested review from Clément Foucault 2024-02-06 19:31:16 +01:00
Author
Member

@blender-bot build

@blender-bot build
Clément Foucault requested changes 2024-02-07 14:55:58 +01:00
Clément Foucault left a comment
Member

So this patch make Cycles and EEVEE use the same checkbox for enabling the motion blur. Which, last time I talked with @brecht, was not wanted. But now I'm wondering about the reasoning.
Depth of field is also a heavy effect and it has a shared checkbox, so why not Motion blur?

So this patch make Cycles and EEVEE use the same checkbox for enabling the motion blur. Which, last time I talked with @brecht, was not wanted. But now I'm wondering about the reasoning. Depth of field is also a heavy effect and it has a shared checkbox, so why not Motion blur?
@ -184,3 +184,3 @@
("bpy.types.cyclesrendersettings.debug_bvh_time_steps*", "render/cycles/render_settings/performance.html#bpy-types-cyclesrendersettings-debug-bvh-time-steps"),
("bpy.types.cyclesrendersettings.distance_cull_margin*", "render/cycles/render_settings/simplify.html#bpy-types-cyclesrendersettings-distance-cull-margin"),
("bpy.types.cyclesrendersettings.motion_blur_position*", "render/cycles/render_settings/motion_blur.html#bpy-types-cyclesrendersettings-motion-blur-position"),
("bpy.types.rendersettings.motion_blur_position*", "render/cycles/render_settings/motion_blur.html#bpy-types-rendersettings-motion-blur-position"),

I'm wondering if this will work automatically or if this needs modification of the manual.

I'm wondering if this will work automatically or if this needs modification of the manual.

It will require a change in the manual. The simplest thing is to update only the bpy.types part and remove the change from the URL part.

It would be good to update the manual to share the docs, but what the URL looks like then depends on how that gets structured exactly since there is no obvious existing section this would go into.

It will require a change in the manual. The simplest thing is to update only the `bpy.types` part and remove the change from the URL part. It would be good to update the manual to share the docs, but what the URL looks like then depends on how that gets structured exactly since there is no obvious existing section this would go into.
Author
Member

I misunderstood what this does, I should have taken a closer look.
I've modified it so it points to the already existing docs, as Brecht suggested.

However, I've noticed that this file is supposed to be auto-generated by rna_manual_reference_updater.py, despite being in the git repo.
It's supposed to be generated from an objects.inv file that seems to be downloaded from the manual itself.
But I don't know how should I update that file or even where it comes from, it's not part of the blender-manual repo.

I misunderstood what this does, I should have taken a closer look. I've modified it so it points to the already existing docs, as Brecht suggested. However, I've noticed that this file is supposed to be auto-generated by `rna_manual_reference_updater.py`, despite being in the git repo. It's supposed to be generated from an `objects.inv` file that seems to be downloaded from the manual itself. But I don't know how should I update that file or even where it comes from, it's not part of the `blender-manual` repo.

Ah yes, I forgot about that.

What I think needs to be done is updating the manual page along with this commit, to add the right bpy.types.
https://projects.blender.org/blender/blender-manual/_edit/main/manual/render/cycles/render_settings/motion_blur.rst

And then this rna_manual_reference.py gets updated once in a while by Aaron or Thomas, it's not something you have to do.

Ah yes, I forgot about that. What I think needs to be done is updating the manual page along with this commit, to add the right `bpy.types`. https://projects.blender.org/blender/blender-manual/_edit/main/manual/render/cycles/render_settings/motion_blur.rst And then this `rna_manual_reference.py` gets updated once in a while by Aaron or Thomas, it's not something you have to do.
Author
Member

Ok, so then I just have to remove the change from this commit.
And after this gets merged I just make a commit in the manual repo that updates from
.. _bpy.types.CyclesRenderSettings.motion_blur_position: to
.. _bpy.types.RenderSettings.motion_blur_position:
Is that right?

Ok, so then I just have to remove the change from this commit. And after this gets merged I just make a commit in the manual repo that updates from `.. _bpy.types.CyclesRenderSettings.motion_blur_position:` to `.. _bpy.types.RenderSettings.motion_blur_position:` Is that right?

Yes, that's right.

Yes, that's right.
pragma37 marked this conversation as resolved
@ -163,2 +163,4 @@
DNA_STRUCT_RENAME_ELEM(RenderData, bake_filter, bake_margin)
DNA_STRUCT_RENAME_ELEM(RenderData, blurfac, motion_blur_shutter)
DNA_STRUCT_RENAME_ELEM(RigidBodyWorld, steps_per_second, substeps_per_frame)
DNA_STRUCT_RENAME_ELEM(SceneEEVEE, motion_blur_position, motion_blur_position_deprecated)

I'm wondering if this is needed. The DNA_DEPRECATED should be enough.

I'm wondering if this is needed. The DNA_DEPRECATED should be enough.
Author
Member

It's needed if motion_blur_position is renamed to motion_blur_position_deprecated, so it can still be read in the versioning code.
I've renamed the property so it's harder to use it by mistake.

It's needed if `motion_blur_position` is renamed to `motion_blur_position_deprecated`, so it can still be read in the versioning code. I've renamed the property so it's harder to use it by mistake.
fclem marked this conversation as resolved
@ -6759,3 +6770,3 @@
prop = RNA_def_property(srna, "motion_blur_shutter", PROP_FLOAT, PROP_FACTOR);
RNA_def_property_float_sdna(prop, nullptr, "blurfac");
RNA_def_property_float_sdna(prop, nullptr, "motion_blur_shutter");

You don't have to specify DNA name for properties that have the same name in DNA and RNA.

You don't have to specify DNA name for properties that have the same name in DNA and RNA.
pragma37 marked this conversation as resolved
Miguel Pozo added 1 commit 2024-02-07 15:41:09 +01:00
Miguel Pozo added 1 commit 2024-02-07 16:21:06 +01:00

So this patch make Cycles and EEVEE use the same checkbox for enabling the motion blur. Which, last time I talked with @brecht, was not wanted. But now I'm wondering about the reasoning.
Depth of field is also a heavy effect and it has a shared checkbox, so why not Motion blur?

As discussed in person. I think it's fine to share it, if EEVEE gets a setting to disable motion blur in the viewport. Because when using the viewport as a preview for either Cycles or EEVEE, motion blur can get in the way of editing. And unlike depth of field it always has an effect, even when not looking through a camera.

A simple "Use in Viewport" boolean in the motion blur panel could be good.

> So this patch make Cycles and EEVEE use the same checkbox for enabling the motion blur. Which, last time I talked with @brecht, was not wanted. But now I'm wondering about the reasoning. > Depth of field is also a heavy effect and it has a shared checkbox, so why not Motion blur? As discussed in person. I think it's fine to share it, if EEVEE gets a setting to disable motion blur in the viewport. Because when using the viewport as a preview for either Cycles or EEVEE, motion blur can get in the way of editing. And unlike depth of field it always has an effect, even when not looking through a camera. A simple "Use in Viewport" boolean in the motion blur panel could be good.
Author
Member

I think it's fine to share it, if EEVEE gets a setting to disable motion blur in the viewport. Because when using the viewport as a preview for either Cycles or EEVEE, motion blur can get in the way of editing.

There was related feedback on this report:
#115404 (comment)

So instead of a "Use in Viewport" toggle, it might be better to add a "Camera only" or "Playback only" option, or both? Or simply disable it outside animation playback?

> I think it's fine to share it, if EEVEE gets a setting to disable motion blur in the viewport. Because when using the viewport as a preview for either Cycles or EEVEE, motion blur can get in the way of editing. There was related feedback on this report: https://projects.blender.org/blender/blender/issues/115404#issuecomment-1105170 So instead of a "Use in Viewport" toggle, it might be better to add a "Camera only" or "Playback only" option, or both? Or simply disable it outside animation playback?
Miguel Pozo added 1 commit 2024-02-07 17:14:54 +01:00

With the implementation as is, I agree it's better to only ever show it during animation playback.

I think users do want to see motion blur outside of animation playback in some cases, for example when working on a still image render or fine tuning the motion blur look on a particular frame. But for that you'd need the motion vectors to be based on the previous frame, not the previous viewport redraw. So that the motion blur does not disappear as soon as you make any edit to the scene.

That's probably not likely to get implemented soon though.


Enabling motion blur only from camera view seems reasonable to me, but it could use some feedback from animators if they have a use for it outside of the camera view. It may be fine to just not support it at all outside of camera view.

I expect often enabling motion blur for animation playback is not worth the performance impact, and would consider disabling viewport motion blur by default even when it's enabled for final renders.

With the implementation as is, I agree it's better to only ever show it during animation playback. I think users do want to see motion blur outside of animation playback in some cases, for example when working on a still image render or fine tuning the motion blur look on a particular frame. But for that you'd need the motion vectors to be based on the previous frame, not the previous viewport redraw. So that the motion blur does not disappear as soon as you make any edit to the scene. That's probably not likely to get implemented soon though. ---- Enabling motion blur only from camera view seems reasonable to me, but it could use some feedback from animators if they have a use for it outside of the camera view. It may be fine to just not support it at all outside of camera view. I expect often enabling motion blur for animation playback is not worth the performance impact, and would consider disabling viewport motion blur by default even when it's enabled for final renders.
Author
Member

Enabling motion blur only from camera view seems reasonable to me, but it could use some feedback from animators if they have a use for it outside of the camera view. It may be fine to just not support it at all outside of camera view.

If you ask an animator from the studio they might not care, but a game animator may think differently.
IMO, the main issue with having motion blur always enabled is that it can get distracting/annoying when manually manipulating objects or navigating the scene, but that can happen in camera view too.

I expect often enabling motion blur for animation playback is not worth the performance impact, and would consider disabling viewport motion blur by default even when it's enabled for final renders.

At least on modern cards motion blur is usually quite cheap, like, a fraction of a millisecond cheap. I wouldn't consider performance a driving factor.

> Enabling motion blur only from camera view seems reasonable to me, but it could use some feedback from animators if they have a use for it outside of the camera view. It may be fine to just not support it at all outside of camera view. If you ask an animator from the studio they might not care, but a game animator may think differently. IMO, the main issue with having motion blur always enabled is that it can get distracting/annoying when manually manipulating objects or navigating the scene, but that can happen in camera view too. > I expect often enabling motion blur for animation playback is not worth the performance impact, and would consider disabling viewport motion blur by default even when it's enabled for final renders. At least on modern cards motion blur is usually quite cheap, like, a fraction of a millisecond cheap. I wouldn't consider performance a driving factor.

Ok, I expect enabling viewport motion blur by default (for animation playback) would be fine then.

Ok, I expect enabling viewport motion blur by default (for animation playback) would be fine then.
Brecht Van Lommel approved these changes 2024-02-07 19:18:48 +01:00

We could disable motion blur for viewport camera rotation is not in playback (DRW_state_is_navigating), or when manipulating object (G.moving).

But this is best done in another task and needs design.

We could disable motion blur for viewport camera rotation is not in playback (`DRW_state_is_navigating`), or when manipulating object (`G.moving`). But this is best done in another task and needs design.
Clément Foucault approved these changes 2024-02-07 20:38:43 +01:00
Miguel Pozo added 1 commit 2024-02-08 16:47:27 +01:00
Miguel Pozo changed title from WIP: Render: Merge EEVEE and Cycles motion blur settings to Render: Merge EEVEE and Cycles motion blur settings 2024-02-08 16:47:41 +01:00
Miguel Pozo merged commit 74b8f99b43 into main 2024-02-08 16:49:30 +01:00
Miguel Pozo deleted branch pull-merge-motion-blur-settings 2024-02-08 16:49:32 +01: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
3 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#117913
No description provided.