Vector Pass output in Cycles is wrong when camera focal length is animated #69731

Closed
opened 2019-09-10 20:40:52 +02:00 by Maria · 5 comments

System Information
Operating system: MacOSX 10.12.6
Graphics card: NVIDIA GeForce GT 750M 2048 MB

Blender Version
Originally detected for: Blender 2.79 (5bd8ac9)
Still broken for daily build downloaded on Sept 10, 2019: 2.81 alpha (6be3348505)

Short description of error
Vector pass ignores motion due animation of camera focal length. In case of multiple sources of motion, motion due to focal length is ignored, while the other motion is output (i.e. sum motion is wrong).

Exact steps for others to reproduce the error
Vector pass should contain screen space X, Y displacement of primitives in the current frame to their respective locations in the next frame. The actual vector pass output fails to account for motion caused by the change to camera focal length. E.g. vector pass output for the square_focallength_exr.blend is zero, but it should be similar to the vector pass output for the blend with camera simply moving forward square_cammotion_exr.blend. We have examined the output of the vector pass by first writing to EXR files using the following steps:

  1. open blend
  2. set output file path
  3. execute "import bpy; bpy.ops.render.render(animation=False, write_still=True)" in python console.
  4. examine EXR file using python library available from https://www.openexr.com/, by looking at channels Vector.Z, Vector.W (perplexingly, these correspond to correct vector pass output, except when focal length is changed).

We verified that for both builds above:
a) vector pass output for square_cammotion_exr.blend is as expected,
b) vector pass output for square_focallength_exr.blend is zero (WRONG).

square_focallength_exr.blend
square_cammotion_exr.blend

**System Information** Operating system: MacOSX 10.12.6 Graphics card: NVIDIA GeForce GT 750M 2048 MB **Blender Version** Originally detected for: Blender 2.79 (5bd8ac9) Still broken for daily build downloaded on Sept 10, 2019: 2.81 alpha (6be3348505ce) **Short description of error** Vector pass ignores motion due animation of camera focal length. In case of multiple sources of motion, motion due to focal length is ignored, while the other motion is output (i.e. sum motion is wrong). **Exact steps for others to reproduce the error** Vector pass should contain screen space X, Y displacement of primitives in the current frame to their respective locations in the next frame. The actual vector pass output fails to account for motion caused by the change to camera focal length. E.g. vector pass output for the square_focallength_exr.blend is zero, but it should be similar to the vector pass output for the blend with camera simply moving forward square_cammotion_exr.blend. We have examined the output of the vector pass by first writing to EXR files using the following steps: 1) open blend 2) set output file path 3) execute "import bpy; bpy.ops.render.render(animation=False, write_still=True)" in python console. 4) examine EXR file using python library available from https://www.openexr.com/, by looking at channels Vector.Z, Vector.W (perplexingly, these correspond to correct vector pass output, except when focal length is changed). We verified that for both builds above: a) vector pass output for square_cammotion_exr.blend is as expected, b) vector pass output for square_focallength_exr.blend is zero (WRONG). [square_focallength_exr.blend](https://archive.blender.org/developer/F7732015/square_focallength_exr.blend) [square_cammotion_exr.blend](https://archive.blender.org/developer/F7732016/square_cammotion_exr.blend)
Author

Added subscriber: @MariaShugrina

Added subscriber: @MariaShugrina
Member

Added subscribers: @Sergey, @brecht, @lichtwerk

Added subscribers: @Sergey, @brecht, @lichtwerk
Member

Changed status from 'Needs Triage' to: 'Archived'

Changed status from 'Needs Triage' to: 'Archived'
Philipp Oeser self-assigned this 2020-01-13 11:42:24 +01:00
Member

Hi there and thx for the report! (sorry this has been lying around for so long)

Well, judging the comment here https://developer.blender.org/diffusion/B/browse/master/intern/cycles/render/camera.cpp$336

/* TODO(sergey): Support perspective (zoom, fov) motion. */

this looks like a known limitation to me (in regards to writing this to the pass -- it renders correctly if you use Motion Blur directly...).

I am not quite sure how much work it would be to support this [Scene::MOTION_PASS and Scene::MOTION_BLUR are handled differently at a couple of places], but really, this is more of a feature request than an actual bug (@Sergey, @brecht: correct me if I am wrong).

Sure, this would be nice to have, but the issue reported here is a request for modified/improved behavior and not a bug in current behavior. Closing as this bug tracker is only for bugs and errors.
For user requests and feedback, please use other channels: https://wiki.blender.org/wiki/Communication/Contact#User_Feedback_and_Requests
For more information on why this isn't considered a bug, visit: https://wiki.blender.org/wiki/Reference/Not_a_bug

Hi there and thx for the report! (sorry this has been lying around for so long) Well, judging the comment here https://developer.blender.org/diffusion/B/browse/master/intern/cycles/render/camera.cpp$336 > /* TODO(sergey): Support perspective (zoom, fov) motion. */ this looks like a known limitation to me (in regards to writing this to the pass -- it renders correctly if you use Motion Blur directly...). I am not quite sure how much work it would be to support this [`Scene::MOTION_PASS` and `Scene::MOTION_BLUR` are handled differently at a couple of places], but really, this is more of a feature request than an actual bug (@Sergey, @brecht: correct me if I am wrong). Sure, this would be nice to have, but the issue reported here is a request for modified/improved behavior and not a **bug** in current behavior. Closing as this bug tracker is only for bugs and errors. For user requests and feedback, please use other channels: https://wiki.blender.org/wiki/Communication/Contact#User_Feedback_and_Requests For more information on why this isn't considered a bug, visit: https://wiki.blender.org/wiki/Reference/Not_a_bug
Author

Hello @lichtwerk , thanks very much for taking a look! Would it be possible to at least add a warning message somewhere? Blender has been often used by the Computer Vision community to render out ground truth optical flow information. For our use case, this information must be precise. Silent output of incorrect values could mean incorrectly reported results, or (as was the case with me) many hours of debugging. It was by mere chance that I discovered fov was the cause of odd behavior.

Hello @lichtwerk , thanks very much for taking a look! Would it be possible to at least add a warning message somewhere? Blender has been often used by the Computer Vision community to render out ground truth optical flow information. For our use case, this information must be precise. Silent output of incorrect values could mean incorrectly reported results, or (as was the case with me) many hours of debugging. It was by mere chance that I discovered fov was the cause of odd behavior.
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
2 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#69731
No description provided.