Regression: If material uses certain types of attributes, Sculpting in EEVEE ignores it or crashes Blender #113496

Closed
opened 2023-10-10 15:32:31 +02:00 by Sun Kim · 2 comments
Contributor

System Information
Operating system: Windows-10-10.0.19045-SP0 64 Bits
Graphics card: NVIDIA GeForce RTX 2060 SUPER/PCIe/SSE2 NVIDIA Corporation 4.6.0 NVIDIA 536.40

Blender Version
Broken: version: 4.1.0 Alpha, branch: main, commit date: 2023-10-09 22:55, hash: a935701a872d
Worked: ???

Short description of error
If material uses certain types of attributes, sculpting in EEVEE ignores the attribute (displays it black) or crashes Blender.

Here's a test result with various types of attributes. Generally using proper color attributes and UV maps shows the material properly, and using most other types of attributes results in black material.

  • Crash: edge-color, edge-bytecolor, edge-2dvector
  • Crash: vertex-2dvector (fixed with a12a3dc73a)
  • Crash: face-2dvector (fixed with a12a3dc73a but glitches)
  • Ignored (black): vertex-float, vertex-int, vertex-bool, edge-float, edge-int, edge-vector, edge-bool, face-float, face-int, face-vector, face-bool, fcorner-float, fcorner-int, fcorner-vec, fcorner-bool
  • Glitch: face-color, face-bytecolor
  • Normal: color attributes (vertex-color, vertex-bytecolor, fcorner-color, fcorner-bytecolor), UV maps (fcorner-2dvector)

Glitch when used face-color attribute:

Exact steps for others to reproduce the error

  • Open attached .blend file
  • Go to sculpt mode

read_atribute_sculpt_eevee__crash.blend

**System Information** Operating system: Windows-10-10.0.19045-SP0 64 Bits Graphics card: NVIDIA GeForce RTX 2060 SUPER/PCIe/SSE2 NVIDIA Corporation 4.6.0 NVIDIA 536.40 **Blender Version** Broken: version: 4.1.0 Alpha, branch: main, commit date: 2023-10-09 22:55, hash: `a935701a872d` Worked: ??? **Short description of error** If material uses certain types of attributes, sculpting in EEVEE ignores the attribute (displays it black) or crashes Blender. <video src="/attachments/93fb2453-dfb4-4436-95bc-cb0d1fae9ee5" title="sculpt_eevee_attribute.mp4" controls></video> Here's a test result with various types of attributes. Generally using proper color attributes and UV maps shows the material properly, and using most other types of attributes results in black material. - **Crash**: edge-color, edge-bytecolor, edge-2dvector - **Crash**: vertex-2dvector (fixed with a12a3dc73a2f4be16e577b79dc847e6b01520bb6) - **Crash**: face-2dvector (fixed with a12a3dc73a2f4be16e577b79dc847e6b01520bb6 but glitches) - **Ignored (black)**: vertex-float, vertex-int, vertex-bool, edge-float, edge-int, edge-vector, edge-bool, face-float, face-int, face-vector, face-bool, fcorner-float, fcorner-int, fcorner-vec, fcorner-bool - **Glitch**: face-color, face-bytecolor - **Normal**: color attributes (vertex-color, vertex-bytecolor, fcorner-color, fcorner-bytecolor), UV maps (fcorner-2dvector) Glitch when used face-color attribute: <video src="/attachments/3d21f14f-81d6-402d-8a21-c359d3ad9296" title="sculpt_eevee_attribute_glitch.mp4" controls></video> **Exact steps for others to reproduce the error** - Open attached .blend file - Go to sculpt mode [read_atribute_sculpt_eevee__crash.blend](/attachments/2170b1e2-f58b-4624-bebb-07d1b96b6ce0)
Sun Kim added the
Status
Needs Triage
Priority
Normal
Type
Report
labels 2023-10-10 15:32:32 +02:00

I can confirm the crash.

>	blender.exe!convert_value<blender::VecBase<float,2>,blender::VecBase<float,2>>(const blender::VecBase<float,2> & value) Line 124	C++
 	blender.exe!extract_data_corner_faces<blender::VecBase<float,2>,blender::VecBase<float,2>>(const PBVH_GPU_Args & args, const blender::Span<blender::VecBase<float,2>> attribute, GPUVertBuf & vbo) Line 195	C++
 	blender.exe!PBVHBatches::fill_vbo_faces(PBVHVbo & vbo, const PBVH_GPU_Args & args) Line 782	C++
 	blender.exe!PBVHBatches::fill_vbo(PBVHVbo & vbo, const PBVH_GPU_Args & args) Line 948	C++
 	blender.exe!PBVHBatches::create_vbo(eAttrDomain domain, const unsigned int type, const blender::StringRefNull name, const PBVH_GPU_Args & args) Line 1052	C++
 	blender.exe!PBVHBatches::create_batch(PBVHAttrReq * attrs, int attrs_num, const PBVH_GPU_Args & args, bool do_coarse_grids) Line 1410	C++
 	blender.exe!PBVHBatches::ensure_batch(PBVHAttrReq * attrs, int attrs_num, const PBVH_GPU_Args & args, bool do_coarse_grids) Line 464	C++
 	blender.exe!DRW_pbvh_tris_get(PBVHBatches * batches, PBVHAttrReq * attrs, int attrs_num, const PBVH_GPU_Args & args, int * r_prim_count, bool do_coarse_grids) Line 1455	C++
 	blender.exe!sculpt_draw_cb(DRWSculptCallbackData * scd, PBVHBatches * batches, const PBVH_GPU_Args & pbvh_draw_args) Line 1234	C++
 	blender.exe!BKE_pbvh_draw_cb(const Mesh & mesh, PBVH * pbvh, bool update_only_visible, PBVHFrustumPlanes * update_frustum, PBVHFrustumPlanes * draw_frustum, void(*)(void *, PBVHBatches *, const PBVH_GPU_Args &) draw_fn, void * user_data, bool __formal, PBVHAttrReq * attrs, int attrs_num) Line 2924	C++
 	blender.exe!drw_sculpt_generate_calls(DRWSculptCallbackData * scd) Line 1375	C++
 	blender.exe!DRW_shgroup_call_sculpt_with_materials(DRWShadingGroup * * shgroups, GPUMaterial * * gpumats, int num_shgroups, Object * ob) Line 1520	C++
 	blender.exe!EEVEE_materials_cache_populate(EEVEE_Data * vedata, EEVEE_ViewLayerData * sldata, Object * ob, bool * cast_shadow) Line 860	C++
 	blender.exe!EEVEE_cache_populate(void * vedata, Object * ob) Line 121	C++
 	blender.exe!drw_engines_cache_populate(Object * ob) Line 1084	C++
 	blender.exe!DRW_draw_render_loop_ex(Depsgraph * depsgraph, RenderEngineType * engine_type, ARegion * region, View3D * v3d, GPUViewport * viewport, const bContext * evil_C) Line 1728	C++
 	blender.exe!DRW_draw_view(const bContext * C) Line 1633	C++
 	blender.exe!view3d_draw_view(const bContext * C, ARegion * region) Line 1596	C++
 	blender.exe!view3d_main_region_draw(const bContext * C, ARegion * region) Line 1631	C++
 	blender.exe!ED_region_do_draw(bContext * C, ARegion * region) Line 537	C++
 	blender.exe!wm_draw_window_offscreen(bContext * C, wmWindow * win, bool stereo) Line 1001	C++
 	blender.exe!wm_draw_window(bContext * C, wmWindow * win) Line 1169	C++
 	blender.exe!wm_draw_update(bContext * C) Line 1565	C++
 	blender.exe!WM_main(bContext * C) Line 618	C++
 	blender.exe!main(int argc, const char * * __formal) Line 594	C++

It was introduced in 3.5.0 sometime between 175bd3820151 and c1beaea80f97.

It may be related to one of these issues:
#101150: Color attributes in sculpt mode not showing in instance objects
#109913: Support Face color attributes for painting
#98119: Color attributes difference between vertexpaint and sculpt modes

Attached is the file I used to check:

I can confirm the crash. ``` > blender.exe!convert_value<blender::VecBase<float,2>,blender::VecBase<float,2>>(const blender::VecBase<float,2> & value) Line 124 C++ blender.exe!extract_data_corner_faces<blender::VecBase<float,2>,blender::VecBase<float,2>>(const PBVH_GPU_Args & args, const blender::Span<blender::VecBase<float,2>> attribute, GPUVertBuf & vbo) Line 195 C++ blender.exe!PBVHBatches::fill_vbo_faces(PBVHVbo & vbo, const PBVH_GPU_Args & args) Line 782 C++ blender.exe!PBVHBatches::fill_vbo(PBVHVbo & vbo, const PBVH_GPU_Args & args) Line 948 C++ blender.exe!PBVHBatches::create_vbo(eAttrDomain domain, const unsigned int type, const blender::StringRefNull name, const PBVH_GPU_Args & args) Line 1052 C++ blender.exe!PBVHBatches::create_batch(PBVHAttrReq * attrs, int attrs_num, const PBVH_GPU_Args & args, bool do_coarse_grids) Line 1410 C++ blender.exe!PBVHBatches::ensure_batch(PBVHAttrReq * attrs, int attrs_num, const PBVH_GPU_Args & args, bool do_coarse_grids) Line 464 C++ blender.exe!DRW_pbvh_tris_get(PBVHBatches * batches, PBVHAttrReq * attrs, int attrs_num, const PBVH_GPU_Args & args, int * r_prim_count, bool do_coarse_grids) Line 1455 C++ blender.exe!sculpt_draw_cb(DRWSculptCallbackData * scd, PBVHBatches * batches, const PBVH_GPU_Args & pbvh_draw_args) Line 1234 C++ blender.exe!BKE_pbvh_draw_cb(const Mesh & mesh, PBVH * pbvh, bool update_only_visible, PBVHFrustumPlanes * update_frustum, PBVHFrustumPlanes * draw_frustum, void(*)(void *, PBVHBatches *, const PBVH_GPU_Args &) draw_fn, void * user_data, bool __formal, PBVHAttrReq * attrs, int attrs_num) Line 2924 C++ blender.exe!drw_sculpt_generate_calls(DRWSculptCallbackData * scd) Line 1375 C++ blender.exe!DRW_shgroup_call_sculpt_with_materials(DRWShadingGroup * * shgroups, GPUMaterial * * gpumats, int num_shgroups, Object * ob) Line 1520 C++ blender.exe!EEVEE_materials_cache_populate(EEVEE_Data * vedata, EEVEE_ViewLayerData * sldata, Object * ob, bool * cast_shadow) Line 860 C++ blender.exe!EEVEE_cache_populate(void * vedata, Object * ob) Line 121 C++ blender.exe!drw_engines_cache_populate(Object * ob) Line 1084 C++ blender.exe!DRW_draw_render_loop_ex(Depsgraph * depsgraph, RenderEngineType * engine_type, ARegion * region, View3D * v3d, GPUViewport * viewport, const bContext * evil_C) Line 1728 C++ blender.exe!DRW_draw_view(const bContext * C) Line 1633 C++ blender.exe!view3d_draw_view(const bContext * C, ARegion * region) Line 1596 C++ blender.exe!view3d_main_region_draw(const bContext * C, ARegion * region) Line 1631 C++ blender.exe!ED_region_do_draw(bContext * C, ARegion * region) Line 537 C++ blender.exe!wm_draw_window_offscreen(bContext * C, wmWindow * win, bool stereo) Line 1001 C++ blender.exe!wm_draw_window(bContext * C, wmWindow * win) Line 1169 C++ blender.exe!wm_draw_update(bContext * C) Line 1565 C++ blender.exe!WM_main(bContext * C) Line 618 C++ blender.exe!main(int argc, const char * * __formal) Line 594 C++ ``` It was introduced in 3.5.0 sometime between `175bd3820151` and `c1beaea80f97`. It may be related to one of these issues: #101150: Color attributes in sculpt mode not showing in instance objects #109913: Support Face color attributes for painting #98119: Color attributes difference between vertexpaint and sculpt modes Attached is the file I used to check:
Iliya Katushenock changed title from If material uses certain types of attributes, Sculpting in EEVEE ignores it or crashes Blender to Regression: If material uses certain types of attributes, Sculpting in EEVEE ignores it or crashes Blender 2023-10-11 07:43:17 +02:00
Iliya Katushenock added this to the 3.6 LTS milestone 2023-10-11 07:43:32 +02:00
Blender Bot added
Status
Resolved
and removed
Status
Confirmed
labels 2023-10-11 12:04:44 +02:00
Author
Contributor

Hi, thanks for the patch! I think it only fixed the crash for vertex-2d vector attributes. Crash, glitch, and black color issues with other types of attributes are still happening in the latest daily build 4e05da264830.

Should I re-open this issue or open separate issues for other cases?

Hi, thanks for the patch! I think it only fixed the crash for vertex-2d vector attributes. Crash, glitch, and black color issues with other types of attributes are still happening in the latest daily build `4e05da264830`. Should I re-open this issue or open separate issues for other cases?
Blender Bot added
Status
Needs Triage
and removed
Status
Resolved
labels 2023-10-24 09:51:31 +02:00
Philipp Oeser added
Status
Confirmed
and removed
Status
Needs Triage
labels 2023-10-24 10:48:21 +02:00
Hans Goudey added
Type
Bug
and removed
Type
Report
labels 2023-10-30 23:00:08 +01:00
Hans Goudey self-assigned this 2023-10-30 23:10:14 +01:00
Blender Bot added
Status
Resolved
and removed
Status
Confirmed
labels 2023-10-31 17:33:31 +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
2 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#113496
No description provided.