UV passed as AOV does not match the actual UV AOV created by Cycles #105866

Closed
opened 2023-03-17 23:15:34 +01:00 by kursad k · 5 comments
Member

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.

blender_8LjBo87Mdq.jpg

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.

**System Information** Operating system: Windows 11 **Blender Version** Broken: e4eb9e04e016 **Short description of error** The AOV output of UVs does not match the actual UV output created by Cycles, please see the image below. ![blender_8LjBo87Mdq.jpg](/attachments/853dbf16-b66b-4ee3-a661-7f3de1b5d1e1) **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.
kursad k added the
Severity
Normal
Status
Needs Triage
Type
Report
labels 2023-03-17 23:15:34 +01:00

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.

Can confirm this behaviour in the latest build (e4eb9e04e016) It seems however that this has been happening since at least 3.0.1 (dc2d18018171) 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.
Author
Member

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)

image

Z=1.0 Fix (works just like the Cycles UV data pass)

image

> Can confirm this behaviour in the latest build (e4eb9e04e016) > It seems however that this has been happening since at least 3.0.1 (dc2d18018171) > > 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) ![image](/attachments/59c8c4cf-53b2-476a-b8bd-51fc382fe337) Z=1.0 Fix (works just like the Cycles UV data pass) ![image](/attachments/ba67c98a-4ee1-4292-ac8a-c2d9dae7e2c5)
318 KiB
1.7 MiB

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.

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.
Blender Bot added
Status
Archived
and removed
Status
Needs Triage
labels 2023-03-18 03:59:22 +01:00
Author
Member

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.

> 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.

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.

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.

MapUVOperation::read_uv() expecting an alpha channel seems like an arbitrary behavior.

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

> 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. 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. > MapUVOperation::read_uv() expecting an alpha channel seems like an arbitrary behavior. 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
Sign in to join this conversation.
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
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#105866
No description provided.