UV passed as AOV does not match the actual UV AOV created by Cycles #105866
Labels
No Label
Interest
Alembic
Interest
Animation & Rigging
Interest
Asset System
Interest
Audio
Interest
Automated Testing
Interest
Blender Asset Bundle
Interest
BlendFile
Interest
Code Documentation
Interest
Collada
Interest
Compatibility
Interest
Compositing
Interest
Core
Interest
Cycles
Interest
Dependency Graph
Interest
Development Management
Interest
EEVEE
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
Viewport & EEVEE
Interest
Virtual Reality
Interest
Vulkan
Interest
Wayland
Interest
Workbench
Interest: X11
Legacy
Asset Browser Project
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
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
Module
Viewport & EEVEE
Platform
FreeBSD
Platform
Linux
Platform
macOS
Platform
Windows
Severity
High
Severity
Low
Severity
Normal
Severity
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
No due date set.
Dependencies
No dependencies set.
Reference: blender/blender#105866
Loading…
Reference in New Issue
Block a user
No description provided.
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
System Information
Operating system: Windows 11
Blender Version
Broken:
e4eb9e04e0
Short description of error
The AOV output of UVs does not match the actual UV output created by Cycles, please see the image below.
Exact steps for others to reproduce the error
Load the attached .blend
Render
Compare the results of the AOV vs the actual UV data created by Cycles in the compositor.
Can confirm this behaviour in the latest build (
e4eb9e04e0
)It seems however that this has been happening since at least 3.0.1 (
dc2d180181
)The issue is not in AOVs, but in the Cycles Datapass.
It appends a value of 1 into the Z/blue-channel, resulting in a different output than what is usually expected from UVs.
If you separate the XYZ in the compositor and only recombine X and Y the output matches the UV-AOV set up in this example.
I figured that out as well, but I am wondering why the 1.0 in the z channel makes the difference (given it is a 2d vector normally) for properly using it in the compositor. Bear in mind that using the UV Shader AOV (by default z=0.0) directly in the compositor results in improper/blank UV Map node image output. One has to do that z=1.0 combine node work around.
This work around is needed for Eevee since it does not provide UV output
Passing as is (broken)
Z=1.0 Fix (works just like the Cycles UV data pass)
Compositor uses blue/Z channel as alpha channel, see
MapUVOperation::read_uv()
if alpha is 0, it skips further processing. Unfortunately i can't tell you why exactly this is designed this way. In any case this works as expected, so will close.I hope you realize this makes no sense in the sense of setting/exporting shader AOVs because an AOV coming from a shader can have z=0 and that is not an unexpected behavior.
MapUVOperation::read_uv() expecting an alpha channel seems like an arbitrary behavior.
It's not unexpected, even UV pass has Z set to 0 - it is used to mask UV output. I am not sure for what reason that is though.
Sure, it may be arbitrary, but that does not mean it is a bug.
You can emulate UV pass more closely by adding nodes: if UV vector length is greater than 0, output 1 and connect that to Z. Not sure if cycles does anything more fancy than that. Manual says "The blue channel is encoded with a constant value of 1 but does not hold any information." - https://docs.blender.org/manual/en/latest/render/layers/passes.html#cycles