Regression: Paint initialize glitch color attribute #100760

Closed
opened 2022-09-01 20:52:56 +02:00 by Sun Kim · 11 comments
Contributor

System Information
Operating system: Windows-10-10.0.19043-SP0 64 Bits
Graphics card: Radeon RX 570 Series ATI Technologies Inc. 4.5.0 Core Profile Context 22.7.1.220725

Blender Version
Broken: version: 3.4.0 Alpha, branch: master, commit date: 2022-09-01 12:39, hash: 06005b0870
Worked: 3.4.0 August 30 build (5ae3fa50e224), 3.3 beta

Caused by 25237d2625 (not in 3.3)

Short description of error
Sculpt paint initialize random glitch color attribute. Sometimes it's pure black than glitch colors but normal behavior expect initialization with white canvas.

SculptPaintGlitch.mp4

Exact steps for others to reproduce the error

  • In Sculpt mode, when there is no color attributes to the mesh, paint stroke

SculptPaintGlitch.blend

**System Information** Operating system: Windows-10-10.0.19043-SP0 64 Bits Graphics card: Radeon RX 570 Series ATI Technologies Inc. 4.5.0 Core Profile Context 22.7.1.220725 **Blender Version** Broken: version: 3.4.0 Alpha, branch: master, commit date: 2022-09-01 12:39, hash: `06005b0870` Worked: 3.4.0 August 30 build (`5ae3fa50e224`), 3.3 beta Caused by 25237d2625 (not in 3.3) **Short description of error** Sculpt paint initialize random glitch color attribute. Sometimes it's pure black than glitch colors but normal behavior expect initialization with white canvas. [SculptPaintGlitch.mp4](https://archive.blender.org/developer/F13447727/SculptPaintGlitch.mp4) **Exact steps for others to reproduce the error** * In Sculpt mode, when there is no color attributes to the mesh, paint stroke [SculptPaintGlitch.blend](https://archive.blender.org/developer/F13447702/SculptPaintGlitch.blend)
Author
Contributor

Added subscriber: @persun

Added subscriber: @persun
Member

Added subscriber: @HooglyBoogly

Added subscriber: @HooglyBoogly
Member

Thanks for the report. I can see where this would happen in the code code. I found the probably fix but haven't tested it yet:

diff --git a/source/blender/blenkernel/intern/paint.cc b/source/blender/blenkernel/intern/paint.cc
index 4c3da5eabc4..b5aeaea3198 100644
--- a/source/blender/blenkernel/intern/paint.cc
+++ b/source/blender/blenkernel/intern/paint.cc
@@ -1917,7 +1917,7 @@ void BKE_sculpt_color_layer_create_if_needed(Object *object)
     return;
   }
 
-  CustomData_add_layer(&orig_me->vdata, CD_PROP_COLOR, CD_CONSTRUCT, nullptr, orig_me->totvert);
+  CustomData_add_layer(&orig_me->vdata, CD_PROP_COLOR, CD_SET_DEFAULT, nullptr, orig_me->totvert);
   CustomDataLayer *layer = orig_me->vdata.layers +
                            CustomData_get_layer_index(&orig_me->vdata, CD_PROP_COLOR);
Thanks for the report. I can see where this would happen in the code code. I found the probably fix but haven't tested it yet: ``` diff --git a/source/blender/blenkernel/intern/paint.cc b/source/blender/blenkernel/intern/paint.cc index 4c3da5eabc4..b5aeaea3198 100644 --- a/source/blender/blenkernel/intern/paint.cc +++ b/source/blender/blenkernel/intern/paint.cc @@ -1917,7 +1917,7 @@ void BKE_sculpt_color_layer_create_if_needed(Object *object) return; } - CustomData_add_layer(&orig_me->vdata, CD_PROP_COLOR, CD_CONSTRUCT, nullptr, orig_me->totvert); + CustomData_add_layer(&orig_me->vdata, CD_PROP_COLOR, CD_SET_DEFAULT, nullptr, orig_me->totvert); CustomDataLayer *layer = orig_me->vdata.layers + CustomData_get_layer_index(&orig_me->vdata, CD_PROP_COLOR); ```

Added subscriber: @TheRedWaxPolice

Added subscriber: @TheRedWaxPolice
Member

Added subscriber: @PratikPB2123

Added subscriber: @PratikPB2123
Member

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

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

@HooglyBoogly your patch indeed fixes this issue

@HooglyBoogly your patch indeed fixes this issue
Pratik Borhade changed title from Sculpt: Paint initialize glitch color attribute to Regression: Paint initialize glitch color attribute 2022-09-02 02:56:20 +02:00
Member

Added subscriber: @lichtwerk

Added subscriber: @lichtwerk
Member

For triaging completeness:
Caused by 25237d2625 (not in 3.3)

For triaging completeness: Caused by 25237d2625 (not in 3.3)
Hans Goudey self-assigned this 2022-09-05 16:14:47 +02:00

This issue was referenced by 2636f6fdee

This issue was referenced by 2636f6fdeeb72500590c42135f61d05aa4de3a1c
Member

Changed status from 'Confirmed' to: 'Resolved'

Changed status from 'Confirmed' to: 'Resolved'
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
6 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#100760
No description provided.