Vector pass not being saved correctly when using the File Output node #101263

Open
opened 2022-09-22 00:37:39 +02:00 by Mike Pan · 10 comments

System Information
Operating system: Win 10
Graphics card: RTX 3090

Blender Version
Broken: 3.3
Worked: Not sure

Short description of error
According to doc, vector pass is a 4-component vector, but when it's being piped through to a File Node in the compositor, it seems only 3 components are saved. This causes some motion data to be missing in the final multilayer exr.

Exact steps for others to reproduce the error

  • Open attached file

  • Render > Animation - it will render 1 frame and save 2 exrs.
    1. One using the blender native file output
    2. Another using the file Node

  • Once it's rendered, the compositor should auto update to load these 2 exrs files below. If not, refresh the input nodes.

  • Check the vectorblured output. They are different.
    mblur-bug.blend

**System Information** Operating system: Win 10 Graphics card: RTX 3090 **Blender Version** Broken: 3.3 Worked: Not sure **Short description of error** According to doc, vector pass is a 4-component vector, but when it's being piped through to a File Node in the compositor, it seems only 3 components are saved. This causes some motion data to be missing in the final multilayer exr. **Exact steps for others to reproduce the error** - Open attached file - `Render` > `Animation` - it will render 1 frame and save 2 exrs. 1. One using the blender native file output 2. Another using the file Node - Once it's rendered, the compositor should auto update to load these 2 exrs files below. If not, refresh the input nodes. - Check the vectorblured output. They are different. [mblur-bug.blend](https://archive.blender.org/developer/F13548473/mblur-bug.blend)
Author

Added subscriber: @MikePan

Added subscriber: @MikePan

Added subscriber: @mano-wii

Added subscriber: @mano-wii

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

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

I can confirm that the Vector input of the File Output node, although receiving a texture with 4 components, only saves 3 components (ignoring what in many cases is considered the Alpha).

I can confirm that the `Vector` input of the `File Output` node, although receiving a texture with 4 components, only saves 3 components (ignoring what in many cases is considered the Alpha).
Philipp Oeser changed title from Vector pass not being saved correctly when using the file Node to Vector pass not being saved correctly when using the File Output node 2022-09-23 11:45:35 +02:00
Member

Added subscriber: @LukasStockner

Added subscriber: @LukasStockner
Member

The problem here is that the Motion pass is weird in the compositor - the socket has vector type, but it gets converted to a Operation with color-type output.
The File Output node only sees the vector socket type, and therefore also produces an Operation with vector type that writes three channels. Then, the compositor notices that a color-type output is connected to a vector-type input and adds a conversion, which removes the W component.

Unfortunately, I don't see a way for the File Output node to check what the type of the Operation output that it's connected to will be before creating its own Operation. Some ideas:

  • Somehow disable automatic conversion and handle it in the Operation - not sure how to do that cleanly in code. There is a flag for skipping conversion, but it only appears to apply if both source AND destination want to skip. Not sure why.
  • Always make vector input sockets report a color-type input operation. That way, the motion pass with go through without conversion, but now real vector passes will get a vector-to-color conversion. Then, check whether a converter was added and export XYZ if yes, XYZW otherwise.
The problem here is that the Motion pass is weird in the compositor - the socket has vector type, but it gets converted to a Operation with color-type output. The File Output node only sees the vector socket type, and therefore also produces an Operation with vector type that writes three channels. Then, the compositor notices that a color-type output is connected to a vector-type input and adds a conversion, which removes the W component. Unfortunately, I don't see a way for the File Output node to check what the type of the Operation output that it's connected to will be before creating its own Operation. Some ideas: - Somehow disable automatic conversion and handle it in the Operation - not sure how to do that cleanly in code. There is a flag for skipping conversion, but it only appears to apply if both source AND destination want to skip. Not sure why. - Always make vector input sockets report a color-type input operation. That way, the motion pass with go through without conversion, but now real vector passes will get a vector-to-color conversion. Then, check whether a converter was added and export XYZ if yes, XYZW otherwise.
Lukas Stockner self-assigned this 2022-10-15 20:05:32 +02:00

Added subscriber: @juang3d

Added subscriber: @juang3d

May I propose as a workaround solution, until this is solved, that the user uses a separate RGBA (not sure if we have separate XYZ in the compositor), save each channel separately as a grey channel and the recompose it in the compositing software.

May this work or is there some other caveat in how the vector pass is handled?

May I propose as a workaround solution, until this is solved, that the user uses a separate RGBA (not sure if we have separate XYZ in the compositor), save each channel separately as a grey channel and the recompose it in the compositing software. May this work or is there some other caveat in how the vector pass is handled?
Member

There is a Separate XYZ, but it doesn't give you the fourth component (since Vectors aren't supposed to have a fourth component).

You could also send the Motion pass through any color node that doesn't do anything (mix with factor zero, multiply with 1, that sort of thing - or just Separate RGBA+Combine RGBA) and save the result as a RGBA pass. If you then set the Image Input node to Straight alpha, the result will match the native file.

Or just wait for D16257: Fix #101263: Vector pass is missing W channel in File Output node ;)

There is a Separate XYZ, but it doesn't give you the fourth component (since Vectors aren't supposed to have a fourth component). You could also send the Motion pass through any color node that doesn't do anything (mix with factor zero, multiply with 1, that sort of thing - or just Separate RGBA+Combine RGBA) and save the result as a RGBA pass. If you then set the Image Input node to Straight alpha, the result will match the native file. Or just wait for [D16257: Fix #101263: Vector pass is missing W channel in File Output node](https://archive.blender.org/developer/D16257) ;)

Wait is better… as long as you can update to blender 3.4 or 3.3 if this is back ported, but the workaround could be useful for 3.1 or 3.2 users in case this problem exists (I assume it does)

Thanks for the fix!!

Wait is better… as long as you can update to blender 3.4 or 3.3 if this is back ported, but the workaround could be useful for 3.1 or 3.2 users in case this problem exists (I assume it does) Thanks for the fix!!
Philipp Oeser removed the
Interest
VFX & Video
label 2023-02-10 09:31:29 +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
4 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#101263
No description provided.