Maniphest T60961

Camera DOF distance based on an object doesn't update on animations with compositing Defocus
Closed, Resolved

Assigned To
Brecht Van Lommel (brecht)
Authored By
Wo!262 (wo262)
Jan 29 2019, 12:03 AM
Tags
  • BF Blender
  • Compositing
  • Animation & Rigging
Subscribers
Brecht Van Lommel (brecht)
Matthew Satchwill (matt_satch)
Philipp Oeser (lichtwerk)
Sergey Sharybin (sergey)
William Reynish (billreynish)
Wo!262 (wo262)

Description

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.

Related Objects

Mentioned In
rBfaf48c0f6473: Depsgraph: Ensure DOF object is always in the graph
Mentioned Here
rBfaf48c0f6473: Depsgraph: Ensure DOF object is always in the graph
rBb432209f63f8: Render: Use dependency graph for compositor/sequencer
rB9375c941b754: Fix T57939: animated values in compositing nodes not working.
rBdb78a8ee2e8c: Fix T59939: Masks not Animating in Render
rBcad1016c20b5: Fix T60944: Add Tablet eraser support to annotations usin pen

Event Timeline

Wo!262 (wo262) created this task.Jan 29 2019, 12:03 AM
Philipp Oeser (lichtwerk) claimed this task.Jan 29 2019, 1:21 PM
Philipp Oeser (lichtwerk) lowered the priority of this task from 90 to 50.
Philipp Oeser (lichtwerk) added a subscriber: Philipp Oeser (lichtwerk).

Can confirm, checking...

Brecht Van Lommel (brecht) added a subscriber: Brecht Van Lommel (brecht).EditedJan 29 2019, 1:52 PM

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.

Philipp Oeser (lichtwerk) added a comment.Jan 29 2019, 2:17 PM

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 [rB9375c941b754, rBdb78a8ee2e8c] 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 Van Lommel (brecht): what to do then? Put on TODO?

Brecht Van Lommel (brecht) added subscribers: Matthew Satchwill (matt_satch), William Reynish (billreynish).
Philipp Oeser (lichtwerk) removed Philipp Oeser (lichtwerk) as the assignee of this task.May 3 2019, 2:06 PM
Philipp Oeser (lichtwerk) added projects: Compositing, Animation & Rigging.

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

Brecht Van Lommel (brecht) added a subscriber: Sergey Sharybin (sergey).May 23 2019, 4:45 PM

@Sergey Sharybin (sergey), this bug is still happening after rBb432209f63f8: Render: Use dependency graph for compositor/sequencer.

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 Sharybin (sergey) mentioned this in rBfaf48c0f6473: Depsgraph: Ensure DOF object is always in the graph.May 23 2019, 4:58 PM
Sergey Sharybin (sergey) added a comment.May 23 2019, 5:16 PM

Actually, i think it is now fixed by rBfaf48c0f6473.

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.

Brecht Van Lommel (brecht) changed the task status from Unknown Status to Resolved.May 23 2019, 5:23 PM
Brecht Van Lommel (brecht) claimed this task.