Camera DOF distance based on an object doesn't update on animations with compositing Defocus #60961

Closed
opened 2019-01-29 00:03:31 +01:00 by msalv · 13 comments

System Information
Win 10 64, nvidia 1060 6gb

Blender Version
Broken: blender-2.80.0-git.cad1016c20b5-windows64

Short description of error

Not render engine related. If you use the Defocus node in the compositor, and an animated object as the target for your camera to determine the focus distance, when you press ctrl+f12, the defocus won't animate, stuck at one distance, the one on the frame you had on the viewport before you pressed ctrl+f12. It seems the camera distance based position of the target object is not being evaluated when the animation is being composited. Animating the Distance value of the Camera directly, without an object, works though. And native eevee or cycles depth of field works with animated distance object too. This is not a huge priority or anything.

Exact steps for others to reproduce the error
Play the animation in the viewport and you'll see the distance of the camera focus does change, but render the animation with ctrl+f12 and the defocus doesn't change in the final video. Using eevee's internal depth of field or animating the distance value of the camera directly does work, and you can render that to compare.
bug9.blend

**System Information** Win 10 64, nvidia 1060 6gb **Blender Version** Broken: blender-2.80.0-git.cad1016c20b5-windows64 **Short description of error** Not render engine related. If you use the Defocus node in the compositor, and an animated object as the target for your camera to determine the focus distance, when you press ctrl+f12, the defocus won't animate, stuck at one distance, the one on the frame you had on the viewport before you pressed ctrl+f12. It seems the camera distance based position of the target object is not being evaluated when the animation is being composited. Animating the Distance value of the Camera directly, without an object, works though. And native eevee or cycles depth of field works with animated distance object too. This is not a huge priority or anything. **Exact steps for others to reproduce the error** Play the animation in the viewport and you'll see the distance of the camera focus does change, but render the animation with ctrl+f12 and the defocus doesn't change in the final video. Using eevee's internal depth of field or animating the distance value of the camera directly does work, and you can render that to compare. [bug9.blend](https://archive.blender.org/developer/F6436851/bug9.blend)
Author

Added subscriber: @moisessalvador

Added subscriber: @moisessalvador

#60804 was marked as duplicate of this issue

#60804 was marked as duplicate of this issue
Member

Added subscriber: @lichtwerk

Added subscriber: @lichtwerk
Philipp Oeser self-assigned this 2019-01-29 13:21:09 +01:00
Member

Can confirm, checking...

Can confirm, checking...

Added subscriber: @brecht

Added subscriber: @brecht

This is basically a known issue at this point. Animation updates for render parameters and compositing are currently restricted to the scene and masks, and including objects will involve some deeper changes.

This is basically a known issue at this point. Animation updates for render parameters and compositing are currently restricted to the scene and masks, and including objects will involve some deeper changes.
Member

Hm, yes, compositors ConvertDepthToRadiusOperation::determineFocalDistance calls BKE_camera_object_dof_distance (but with an unevaluated camera, no depsgraph...)
(A renderengine [e.g. Eevee] calls this, too, but has access to the evaluated camera)

While the hacks for compositing [9375c941b7, db78a8ee2e] worked [and stuff is updated for the copied scene], the compositor goes to the unevaluated camera...
(at least this is how I understand it)

One more argument for a sequencer-depsgraph, I guess...

@brecht: what to do then? Put on TODO?

Hm, yes, compositors `ConvertDepthToRadiusOperation::determineFocalDistance` calls `BKE_camera_object_dof_distance` (but with an unevaluated camera, no depsgraph...) (A renderengine [e.g. Eevee] calls this, too, but has access to the evaluated camera) While the hacks for compositing [9375c941b7, db78a8ee2e] worked [and stuff is updated for the copied scene], the compositor goes to the unevaluated camera... (at least this is how I understand it) One more argument for a sequencer-depsgraph, I guess... @brecht: what to do then? Put on TODO?

Added subscribers: @matt_satch, @WilliamReynish

Added subscribers: @matt_satch, @WilliamReynish
Philipp Oeser removed their assignment 2019-05-03 14:06:54 +02:00
Member

Since I wouldnt know how to proceed with this, stepping down...

Since I wouldnt know how to proceed with this, stepping down...

Added subscriber: @Sergey

Added subscriber: @Sergey

@Sergey, this bug is still happening after b432209f63.

Seems the empty use to control the distance is not made part of the graph.

find_node component: Could not find ID OBEmpty
add_relation(Camera DOF) - Could not find op_from (ComponentKey(OBEmpty, TRANSFORM))
add_relation(Camera DOF) - Failed, but op_to (ComponentKey(CACamera, PARAMETERS)) was ok
@Sergey, this bug is still happening after b432209f63. Seems the empty use to control the distance is not made part of the graph. ``` find_node component: Could not find ID OBEmpty add_relation(Camera DOF) - Could not find op_from (ComponentKey(OBEmpty, TRANSFORM)) add_relation(Camera DOF) - Failed, but op_to (ComponentKey(CACamera, PARAMETERS)) was ok ```

Actually, i think it is now fixed by faf48c0f64.

The confusing thing is that with the f-stop of 2.4 (used in the attached file) the blur is higher than Max Blur setting. Making f-stop 32 clearly shows that the animation on DoF object works correct.

Actually, i think it is now fixed by faf48c0f64. The confusing thing is that with the f-stop of 2.4 (used in the attached file) the blur is higher than Max Blur setting. Making f-stop 32 clearly shows that the animation on DoF object works correct.

Changed status from 'Open' to: 'Resolved'

Changed status from 'Open' to: 'Resolved'
Brecht Van Lommel self-assigned this 2019-05-23 17:23:17 +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#60961
No description provided.