Cycles: Vertex Color shader node is not handled properly/ignored if no vertex color is specified (should use the 'active_render' then) #73938

Closed
opened 2020-02-17 19:28:28 +01:00 by Ben Lincoln · 16 comments

System Information
Operating system: Windows
Graphics card: AMD Radeon R9 200 series

Blender Version
Broken: 2.81a

The Vertex Color shader node is either ignored or not handled properly by the Cycles renderer. It works correctly in Eevee, and most (perhaps all) of the viewport rendering modes. In Cycles, the output of the Vertex Color node is always black. In order to have Cycles process vertex colours, it is necessary to use the old-style approach of creating an Attribute node and assigning it to the "Col" (default) attribute, or whatever the vertex colour data is named, if it is not the default.

Exact steps for others to reproduce the error
The Blender project at https://www.beneaththewaves.net/Blender_Debugging-Vertex_Colours-0001.7z (also attached to this ticket) contains a minimal reproduction of this issue. It contains two cubes which are identical except that one uses a material where the output colour is based on the Vertex Color node, and the other contains one which is based on the Attribute node set to "Col". It will appear to be correct in most (if not all) of the interactive views in Blender, as well as when rendered in Eevee. When rendered in Cycles, the cube on the left will appear 100% black. The Vertex Color output is also treated as zero in any more complex shading pipelines, when rendered in Cycles specifically.

Blender_Debugging-Vertex_Colours-0001.blend

Sample rendering in Cycles: (also available at https://www.beneaththewaves.net/Cycles_Vertex_Colours-0001.png)

Cycles_Vertex_Colours-0001.png

**System Information** Operating system: Windows Graphics card: AMD Radeon R9 200 series **Blender Version** Broken: 2.81a The Vertex Color shader node is either ignored or not handled properly by the Cycles renderer. It works correctly in Eevee, and most (perhaps all) of the viewport rendering modes. In Cycles, the output of the Vertex Color node is always black. In order to have Cycles process vertex colours, it is necessary to use the old-style approach of creating an Attribute node and assigning it to the "Col" (default) attribute, or whatever the vertex colour data is named, if it is not the default. **Exact steps for others to reproduce the error** The Blender project at https://www.beneaththewaves.net/Blender_Debugging-Vertex_Colours-0001.7z (also attached to this ticket) contains a minimal reproduction of this issue. It contains two cubes which are identical except that one uses a material where the output colour is based on the Vertex Color node, and the other contains one which is based on the Attribute node set to "Col". It will appear to be correct in most (if not all) of the interactive views in Blender, as well as when rendered in Eevee. When rendered in Cycles, the cube on the left will appear 100% black. The Vertex Color output is also treated as zero in any more complex shading pipelines, when rendered in Cycles specifically. [Blender_Debugging-Vertex_Colours-0001.blend](https://archive.blender.org/developer/F8345528/Blender_Debugging-Vertex_Colours-0001.blend) Sample rendering in Cycles: (also available at https://www.beneaththewaves.net/Cycles_Vertex_Colours-0001.png) ![Cycles_Vertex_Colours-0001.png](https://archive.blender.org/developer/F8345529/Cycles_Vertex_Colours-0001.png)
Author

Added subscriber: @blincoln

Added subscriber: @blincoln

#74459 was marked as duplicate of this issue

#74459 was marked as duplicate of this issue
Member

Added subscriber: @lichtwerk

Added subscriber: @lichtwerk
Member

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

Changed status from 'Needs Triage' to: 'Archived'
Philipp Oeser self-assigned this 2020-02-18 11:03:20 +01:00
Member

Looks like the is no vertex color layer actually selected in the node?
(you need to pick one)

image.png

Blender_Debugging-Vertex_Colours-0001-corrected.blend

Assume this is not a bug, closing.
()feel free though to comment again if issues persist or if this was a misunderstanding...

Looks like the is no vertex color layer actually selected in the node? (you need to pick one) ![image.png](https://archive.blender.org/developer/F8347175/image.png) [Blender_Debugging-Vertex_Colours-0001-corrected.blend](https://archive.blender.org/developer/F8347179/Blender_Debugging-Vertex_Colours-0001-corrected.blend) Assume this is not a bug, closing. ()feel free though to comment again if issues persist or if this was a misunderstanding...
Author

If I need to pick one, why does the cube on the left render as expected without doing that in every other Blender component except Cycles? The behaviour is inconsistent, and the documentation doesn't mention this. It sure seems to me that something is flagging that vertex colour layer as the default, and Cycles is ignoring it.

Viewport (Material Preview):

Viewport-Material_Preview_Vertex_Colours-0001.png

Viewport (Render Preview):

Viewport-Rendered_Vertex_Colours-0001.png

Eevee:

Eevee_Vertex_Colours-0001.png

Workbench:

Workbench_Vertex_Colours-0001.png

This is true with imported Collada models whose vertex colour layer is not named "Col" as well - everything works fine in every Blender component without explicitly selecting a vertex colour layer, except Cycles. So, again, something seems to be marking one of them as the default and using that everywhere other than Cycles.

The reason I opened this ticket is that I had a complex project which became too memory-intensive to render in Eevee any longer with a 3GB video card. It rendered perfectly in Eevee up until that time, displayed correctly in every viewport mode, but all objects were 100% black when I switched to Cycles. I spent two days troubleshooting the problem, because there was no indication in the UI as to why Cycles was behaving differently. The only reason I even began to suspect vertex colours was that if I ran Blender in debugging mode, and enabled Open Shading Language, Blender would crash when rendering the project in Cycles, and the last message in the log was:

WARNING: Shader warning [node_vertex_color]: Invalid attribute.

Respectfully, the inconsistency is a bug. Cycles should handle the Vertex Color node the same way that every other Blender component does.

If I need to pick one, why does the cube on the left render as expected without doing that in every other Blender component *except* Cycles? The behaviour is inconsistent, and the documentation doesn't mention this. It sure seems to me that something is flagging that vertex colour layer as the default, and Cycles is ignoring it. Viewport (Material Preview): ![Viewport-Material_Preview_Vertex_Colours-0001.png](https://archive.blender.org/developer/F8347447/Viewport-Material_Preview_Vertex_Colours-0001.png) Viewport (Render Preview): ![Viewport-Rendered_Vertex_Colours-0001.png](https://archive.blender.org/developer/F8347450/Viewport-Rendered_Vertex_Colours-0001.png) Eevee: ![Eevee_Vertex_Colours-0001.png](https://archive.blender.org/developer/F8347452/Eevee_Vertex_Colours-0001.png) Workbench: ![Workbench_Vertex_Colours-0001.png](https://archive.blender.org/developer/F8347454/Workbench_Vertex_Colours-0001.png) This is true with imported Collada models whose vertex colour layer is not named "Col" as well - everything works fine in every Blender component without explicitly selecting a vertex colour layer, *except* Cycles. So, again, something seems to be marking one of them as the default and using that everywhere other than Cycles. The reason I opened this ticket is that I had a complex project which became too memory-intensive to render in Eevee any longer with a 3GB video card. It rendered perfectly in Eevee up until that time, displayed correctly in every viewport mode, but all objects were 100% black when I switched to Cycles. I spent two days troubleshooting the problem, because there was no indication in the UI as to why Cycles was behaving differently. The only reason I even began to suspect vertex colours was that if I ran Blender in debugging mode, *and* enabled Open Shading Language, Blender would crash when rendering the project in Cycles, and the last message in the log was: WARNING: Shader warning [node_vertex_color]: Invalid attribute. Respectfully, the inconsistency is a bug. Cycles should handle the Vertex Color node the same way that every other Blender component does.
Member

Changed status from 'Archived' to: 'Confirmed'

Changed status from 'Archived' to: 'Confirmed'
Member

Hm, if nothing is provided in the Vertex Color Node, then the active_render (Camera icon) kicks in (so watever you choose there will be rendered - in Eevee but not in Cycles)
image.png

For UVMaps this is a similar thing, if nothing is provided in the UV Map Node, then the active_render (Camera icon) kicks in (so watever you choose there will be rendered - in Eevee and for UVs also in Cycles)

So to not only keep this consistent between Cycles and Eevee, but also for Cycles being consistent to itself, will reopen as valid bug.
Suggest to use whatever is set as active_render vertex color slot if nothing is provided in the Vertex Color node...

Hm, if nothing is provided in the `Vertex Color` Node, then the `active_render` (Camera icon) kicks in (so watever you choose there will be rendered - in Eevee but not in Cycles) ![image.png](https://archive.blender.org/developer/F8347599/image.png) For UVMaps this is a similar thing, if nothing is provided in the UV Map Node, then the `active_render` (Camera icon) kicks in (so watever you choose there will be rendered - in Eevee **and for UVs also in Cycles**) So to not only keep this consistent between Cycles and Eevee, but also for Cycles being consistent to itself, will reopen as valid bug. Suggest to use whatever is set as `active_render` vertex color slot if nothing is provided in the Vertex Color node...
Philipp Oeser changed title from Cycles: Vertex Color shader node is not handled properly/ignored to Cycles: Vertex Color shader node is not handled properly/ignored if no vertex color is specified (should use the 'active_render' then) 2020-02-18 15:15:41 +01:00
Philipp Oeser removed their assignment 2020-02-18 15:15:41 +01:00
Author

Changed status from 'Confirmed' to: 'Archived'

Changed status from 'Confirmed' to: 'Archived'
Ben Lincoln self-assigned this 2020-02-18 16:06:53 +01:00
Author

Thank you.

FWIW, I think that's what the other rendering components are doing, because the Vertex Color node is basically just a convenience feature so that users don't have to add an Attribute node, figure out the name of the active vertex colour layer, and enter it in the field. If one needs to enter the name of the vertex colour layer, there's no reason (as far as I can tell) to use the Vertex Color node instead of Attribute.

Thank you. FWIW, I think that's what the other rendering components are doing, because the Vertex Color node is basically just a convenience feature so that users don't have to add an Attribute node, figure out the name of the active vertex colour layer, and enter it in the field. If one needs to enter the name of the vertex colour layer, there's no reason (as far as I can tell) to use the Vertex Color node instead of Attribute.
Author

...and no, I did not intend to close this task, or claim it. My user permissions are restricted enough that apparently that will happen by default if I reply to the ticket, so I won't do that again.

...and no, I did not intend to close this task, or claim it. My user permissions are restricted enough that apparently that will happen by default if I reply to the ticket, so I won't do that again.

Changed status from 'Archived' to: 'Confirmed'

Changed status from 'Archived' to: 'Confirmed'

This issue was referenced by blender/cycles@aaf5549c48

This issue was referenced by blender/cycles@aaf5549c483e65fe4ca32d3ccdec26211b1978ed

This issue was referenced by 65ea5020c4

This issue was referenced by 65ea5020c4a1647bcacd4933dc9e5fc519982536
Ben Lincoln was unassigned by Philipp Oeser 2020-02-19 09:58:14 +01:00
Philipp Oeser self-assigned this 2020-02-19 09:58:14 +01:00
Member

Changed status from 'Confirmed' to: 'Resolved'

Changed status from 'Confirmed' to: 'Resolved'
Member

Added subscriber: @spiraloid-3

Added subscriber: @spiraloid-3
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#73938
No description provided.