Regression: Vertex colors are now broken in hair strands #98803

Open
opened 2022-06-12 00:59:54 +02:00 by happysmash27 · 7 comments

System Information
Operating system: Gentoo Linux kernel 5.18.0-gentoo
Graphics card: RX 480

Blender Version
Broken: 3.2.0, 3.3.0
Worked: 3.1.0

Caused by b9799dfb8a

Short description of error

Vertex colors are strange and patchy when moving from 3.1.0 to 3.2.0 or later:
2022-06-11-155614_1280x998_scrot.png

2022-06-11-155621_1280x998_scrot.png

Exact steps for others to reproduce the error
Based on the default startup or an attached .blend file (as simple as possible).

  1. Make something with vertex colours and a hair system which utilises them in Blender 3.1.0. In my instance I used geometry nodes to generate them; this may differ when making them manually as one of my other projects which does it manually does not seem to exhibit this issue.
  2. Open file in Blender 3.2.0.

I created the following .blend file to demonstrate the issue: Color_test_3s.blend

**System Information** Operating system: Gentoo Linux kernel 5.18.0-gentoo Graphics card: RX 480 **Blender Version** Broken: 3.2.0, 3.3.0 Worked: 3.1.0 Caused by b9799dfb8a **Short description of error** Vertex colors are strange and patchy when moving from 3.1.0 to 3.2.0 or later: ![2022-06-11-155614_1280x998_scrot.png](https://archive.blender.org/developer/F13147533/2022-06-11-155614_1280x998_scrot.png) ![2022-06-11-155621_1280x998_scrot.png](https://archive.blender.org/developer/F13147532/2022-06-11-155621_1280x998_scrot.png) **Exact steps for others to reproduce the error** Based on the default startup or an attached .blend file (as simple as possible). 1. Make something with vertex colours and a hair system which utilises them in Blender 3.1.0. In my instance I used geometry nodes to generate them; this may differ when making them manually as one of my other projects which does it manually does not seem to exhibit this issue. 2. Open file in Blender 3.2.0. I created the following .blend file to demonstrate the issue: [Color_test_3s.blend](https://archive.blender.org/developer/F13147536/Color_test_3s.blend)
Author

Added subscriber: @27Anonymous

Added subscriber: @27Anonymous

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

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

Added subscribers: @JacquesLucke, @deadpin

Added subscribers: @JacquesLucke, @deadpin

CC @JacquesLucke seems like b9799dfb8a has caused this issue.

CC @JacquesLucke seems like b9799dfb8a has caused this issue.
Member

Added subscriber: @PratikPB2123

Added subscriber: @PratikPB2123
Member

There seem to be multiple issues:

  • Using geometry nodes with the old particle system is not well supported generally (also with regard to instancing for example).
  • The hair system only supports byte-color face-corner attributes, but not (float-)color attributes. In the provided file, then behavior of the geometry nodes modifier changed a little bit. Previously, it would write the new attribute values into the existing byte-color attribute (because it was presented to geometry nodes as a float-color attribute internally). Now, the modifier deletes the byte-color attribute and creates a float-color attribute with the same name. This attribute can't be used with hair particles.
  • Not exactly sure what it does, but the hair drawing code uses some (random?) attribute when it does not find the attribute that was requested by the shader.
  • There seem to be missing updates when the color attribute type changes, not sure at which level that happens exactly..
  • Maybe due to the subdivision or maybe due to some other reason, the hair attachment information of the curves seems to be somewhat wrong.

You can try using the Store Named Attribute node to manually create the Byte-Color Face-Corner attribute, I had some limited success with that. Maybe try to avoid overwriting an existing attribute and just create a new one instead.

Overall, I can't really justify spending more time on this right now, because it relates to code that we are planning to replace fairly soon anyway (D14942). Also because to reproduce the bug, one has to use a combination of geometry nodes and end-of-life features (particles).

There seem to be multiple issues: * Using geometry nodes with the old particle system is not well supported generally (also with regard to instancing for example). * The hair system only supports byte-color face-corner attributes, but not (float-)color attributes. In the provided file, then behavior of the geometry nodes modifier changed a little bit. Previously, it would write the new attribute values into the existing byte-color attribute (because it was presented to geometry nodes as a float-color attribute internally). Now, the modifier deletes the byte-color attribute and creates a float-color attribute with the same name. This attribute can't be used with hair particles. * Not exactly sure what it does, but the hair drawing code uses some (random?) attribute when it does not find the attribute that was requested by the shader. * There seem to be missing updates when the color attribute type changes, not sure at which level that happens exactly.. * Maybe due to the subdivision or maybe due to some other reason, the hair attachment information of the curves seems to be somewhat wrong. You can try using the Store Named Attribute node to manually create the Byte-Color Face-Corner attribute, I had some limited success with that. Maybe try to avoid overwriting an existing attribute and just create a new one instead. Overall, I can't really justify spending more time on this right now, because it relates to code that we are planning to replace fairly soon anyway ([D14942](https://archive.blender.org/developer/D14942)). Also because to reproduce the bug, one has to use a combination of geometry nodes and end-of-life features (particles).
Author

@JacquesLucke THANK YOU SO MUCH! Deleting and re-creating the vertex colour and using Store Named Attribute node seems to have fixed it: 2022-06-13-061019_1280x998_scrot.png

And much more importantly, also fixes it in the avatar project that I need to complete by the 17th (for an event): 2022-06-13-061555_1280x998_scrot.png

Which means that I will not have to convert the fur to an object manually to preview it (I have a node setup that replicates the geometry and materials for the purpose of baking, but converting everything still takes time) and can work much faster, desperately needed when I only have a few days left.

It doesn't technically fix the bug, but absolutely fixes the problem of needing to get hair system preview working again in the next couple days by any and all means necessary.

I didn't convey the urgency in the original post but getting this response today is extremely, incredibly helpful and helps SO MUCH!

THANK YOU to an extreme degree! This workaround really makes a massive difference!

@JacquesLucke THANK YOU SO MUCH! Deleting and re-creating the vertex colour and using Store Named Attribute node seems to have fixed it: ![2022-06-13-061019_1280x998_scrot.png](https://archive.blender.org/developer/F13156196/2022-06-13-061019_1280x998_scrot.png) And much more importantly, also fixes it in the avatar project that I need to complete by the 17th (for an event): ![2022-06-13-061555_1280x998_scrot.png](https://archive.blender.org/developer/F13156214/2022-06-13-061555_1280x998_scrot.png) Which means that I will not have to convert the fur to an object manually to preview it (I have a node setup that replicates the geometry and materials for the purpose of baking, but converting everything still takes time) and can work much faster, desperately needed when I only have a few days left. It doesn't technically fix the bug, but absolutely fixes the problem of needing to get hair system preview working again in the next couple days by any and all means necessary. I didn't convey the urgency in the original post but getting this response today is extremely, incredibly helpful and helps SO MUCH! THANK YOU to an extreme degree! This workaround really makes a massive difference!
Philipp Oeser removed the
Interest
Nodes & Physics
label 2023-02-10 08:44:00 +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#98803
No description provided.