Regression: edge crease lost after a texture paint stroke (modifiers present) #105912

Closed
opened 2023-03-20 05:04:02 +01:00 by 刘文博 · 5 comments

System Information
Operating system: Windows-10-10.0.19045-SP0 64 Bits
Graphics card: NVIDIA GeForce RTX 3070 Ti/PCIe/SSE2 NVIDIA Corporation 4.5.0 NVIDIA 528.24

Blender Version
Broken: version: 3.4.1, branch: blender-v3.4-release, commit date: 2022-12-19 17:00, hash: rB55485cb379f7
Worked: 3.3 LTS

This started with a8a454287a.
It then saw some fixes (including 57ea827bfb which made normals "correct" again just entering texture paint mode -- but still left the normals "incorrect" after a stroke)

Short description of error
When painting the texture the crease edge will lapse in texture paint mode.

Exact steps for others to reproduce the error
1 Add some crease edges.
2 Add mirror and subdivision modifier.
3 Paint txture in texture paint mode.
Closing the mirror it becomes normal but I don't kown the reason.
Object in object mode and It displays normallyimage
When painting the texture the crease edge will lapse.image

**System Information** Operating system: Windows-10-10.0.19045-SP0 64 Bits Graphics card: NVIDIA GeForce RTX 3070 Ti/PCIe/SSE2 NVIDIA Corporation 4.5.0 NVIDIA 528.24 **Blender Version** Broken: version: 3.4.1, branch: blender-v3.4-release, commit date: 2022-12-19 17:00, hash: `rB55485cb379f7` Worked: 3.3 LTS This started with a8a454287a27d408668f8adc6fe1b3aa988de1ac. It then saw some fixes (including 57ea827bfb28eb697b74dbc606facbc133e10fab which made normals "correct" again just entering texture paint mode -- but still left the normals "incorrect" after a stroke) **Short description of error** When painting the texture the crease edge will lapse in texture paint mode. **Exact steps for others to reproduce the error** 1 Add some crease edges. 2 Add mirror and subdivision modifier. 3 Paint txture in texture paint mode. Closing the mirror it becomes normal but I don't kown the reason. Object in object mode and It displays normally![image](/attachments/f70a12ce-11b9-4e6a-bf39-ffb82d4e79e6) When painting the texture the crease edge will lapse.![image](/attachments/2464253a-1913-4e98-9f32-d470209ced99)
刘文博 added the
Priority
Normal
Status
Needs Triage
Type
Report
labels 2023-03-20 05:04:02 +01:00
Member

Can confirm, will check.

Can confirm, will check.
Philipp Oeser added
Status
Confirmed
Module
Sculpt, Paint & Texture
and removed
Status
Needs Triage
labels 2023-03-20 10:06:49 +01:00
Member

This started with a8a454287a.
It then saw some fixes (including 57ea827bfb which made normals "correct" again just entering texture paint mode -- but still left the normals "incorrect" after a stroke)

CC @HooglyBoogly
CC @ideasman42

This started with a8a454287a27d408668f8adc6fe1b3aa988de1ac. It then saw some fixes (including 57ea827bfb28eb697b74dbc606facbc133e10fab which made normals "correct" again just entering texture paint mode -- but still left the normals "incorrect" after a stroke) CC @HooglyBoogly CC @ideasman42
Philipp Oeser changed title from When painting the texture the crease edge will lapse in texture paint mode. to Regression: edge crease lost after a texture paint stroke (modifiers present) 2023-03-20 12:19:06 +01:00
Philipp Oeser added
Priority
High
and removed
Priority
Normal
labels 2023-03-20 12:19:17 +01:00
Hans Goudey self-assigned this 2023-03-20 12:22:13 +01:00
Hans Goudey added this to the 3.5 milestone 2023-03-20 15:56:32 +01:00
Hans Goudey added
Type
Bug
and removed
Type
Report
labels 2023-03-20 15:56:37 +01:00
Member

The problem here is proj_paint_state_mesh_eval_init, which reevaluates the mesh if the existing evaluated mesh doesn't have the necessary data, but doesn't request the typical attribute and crease data.

This replaces the evaluated mesh with an incorrect one that doesn't contain any attributes.

I think the fix is to just copy the extra custom data masks from BKE_object_handle_data_update to be used in texture paint. This whole system doesn't work very well when attributes can be needed for arbitrary things during evaluation though.

The problem here is `proj_paint_state_mesh_eval_init`, which reevaluates the mesh if the existing evaluated mesh doesn't have the necessary data, but doesn't request the typical attribute and crease data. This replaces the evaluated mesh with an incorrect one that doesn't contain any attributes. I think the fix is to just copy the extra custom data masks from `BKE_object_handle_data_update` to be used in texture paint. This whole system doesn't work very well when attributes can be needed for arbitrary things during evaluation though.

We should get rid of mesh_get_eval_final and just get the evaluated mesh from the depsgraph, as re-evaluating a mesh to get an additional attribute doesn't really work anymore. Of course still need to check if the attributes are guaranteed to be there by the depsgraph evaluation.

This should have been done as part of the 2.80 depsgraph changes, but no one got around to it.

We should get rid of `mesh_get_eval_final` and just get the evaluated mesh from the depsgraph, as re-evaluating a mesh to get an additional attribute doesn't really work anymore. Of course still need to check if the attributes are guaranteed to be there by the depsgraph evaluation. This should have been done as part of the 2.80 depsgraph changes, but no one got around to it.
Member

I looked into removing it here: #106186

I looked into removing it here: #106186
Hans Goudey modified the milestone from 3.5 to 3.6 LTS 2023-03-27 18:34:13 +02:00
Blender Bot added
Status
Resolved
and removed
Status
Confirmed
labels 2023-03-31 14:16:08 +02: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#105912
No description provided.