Geometry Node: Sculpt mode doesn't cause update due to editing #103871

Open
opened 2023-01-14 00:39:37 +01:00 by Daniel Ulrich · 11 comments

SIMPLE REPORT:

System Information
Operating system: Windows-10-10.0.19045-SP0 64 Bits
Graphics card: NVIDIA GeForce GTX 1060 6GB/PCIe/SSE2 NVIDIA Corporation 4.5.0 NVIDIA 527.56

Blender Version
Broken: version: 3.5.0 Alpha, branch: master, commit date: 2023-01-08 22:09, hash: e7a554e551
Worked: Never

Short description of error

Objects with geometry nodes do not update if dependent on the object that is currently being sculpted.

2023-01-14 13-13-37.mp4

Exact steps for others to reproduce the error

  1. Duplicete default cube.
  2. Add Geometry Node tree on copy, add Object Info, choose other one cube, connect geometry to group output.
  3. Select other one cube, go to sculpt mode, do anything.
    Cube with geometry node does not according to sculpted one

USER REPORT:

System Information
Operating system: Windows 10 Pro
Graphics card: Geforece RTX 2080

Blender Version
Broken: 3.4.1 Stable
Worked: not sure

Geometry nodes network is not updating when in sculpt mode. It's updating fine when in edit mode.

I have nodes basically adding differences in point positions from one mesh to another -
liveconnectionSculpt.gif

liveconnectionEdit.gif

sculpt_mode_update.blend

Screenshot 2023-01-14 120957.png

  • Create an object(=A) and add a geometry nodes modifier

  • Duplicate the object(=B), and use it's object info in the first objects geometry node

  • Connect object B geometry, position and ID into a sample index node, sampling a vector on a point

  • Subtract the vector coming from the sample index from object A's position

  • Connect the result to the offset

  • Try moving verts on object B in edit mode and see object A updating

  • Try moving verts on object B in sculpt mode. Object A is only updating when switching from sculpt mode back to object mode.

Based on the default startup or an attached .blend file (as simple as possible).

## SIMPLE REPORT: **System Information** Operating system: Windows-10-10.0.19045-SP0 64 Bits Graphics card: NVIDIA GeForce GTX 1060 6GB/PCIe/SSE2 NVIDIA Corporation 4.5.0 NVIDIA 527.56 **Blender Version** Broken: version: 3.5.0 Alpha, branch: master, commit date: 2023-01-08 22:09, hash: `e7a554e551` Worked: Never **Short description of error** Objects with geometry nodes do not update if dependent on the object that is currently being sculpted. [2023-01-14 13-13-37.mp4](https://archive.blender.org/developer/F14149477/2023-01-14_13-13-37.mp4) **Exact steps for others to reproduce the error** 1. Duplicete default cube. 2. Add Geometry Node tree on copy, add `Object Info`, choose other one cube, connect geometry to group output. 3. Select other one cube, go to sculpt mode, do anything. Cube with geometry node does not according to sculpted one ## USER REPORT: **System Information** Operating system: Windows 10 Pro Graphics card: Geforece RTX 2080 **Blender Version** Broken: 3.4.1 Stable Worked: not sure Geometry nodes network is not updating when in sculpt mode. It's updating fine when in edit mode. I have nodes basically adding differences in point positions from one mesh to another - ![liveconnectionSculpt.gif](https://archive.blender.org/developer/F14148913/liveconnectionSculpt.gif) ![liveconnectionEdit.gif](https://archive.blender.org/developer/F14148912/liveconnectionEdit.gif) [sculpt_mode_update.blend](https://archive.blender.org/developer/F14148911/sculpt_mode_update.blend) ![Screenshot 2023-01-14 120957.png](https://archive.blender.org/developer/F14148910/Screenshot_2023-01-14_120957.png) - Create an object(=A) and add a geometry nodes modifier - Duplicate the object(=B), and use it's object info in the first objects geometry node - Connect object B geometry, position and ID into a sample index node, sampling a vector on a point - Subtract the vector coming from the sample index from object A's position - Connect the result to the offset - Try moving verts on object B in edit mode and see object A updating - Try moving verts on object B in sculpt mode. Object A is only updating when switching from sculpt mode back to object mode. Based on the default startup or an attached .blend file (as simple as possible).
Author

Added subscriber: @dan2

Added subscriber: @dan2
Iliya Katushenock changed title from geometry nodes sculpt mode update to Geometry Node: Sculpt mode doesn't cause update due to editing 2023-01-14 11:22:30 +01:00

Added subscriber: @mod_moder

Added subscriber: @mod_moder

Hello. After looking into this a bit, it seems that all modifiers ignore actions in sculpt mode. Most likely, it's just some kind of limitation.

Hello. After looking into this a bit, it seems that all modifiers ignore actions in sculpt mode. Most likely, it's just some kind of limitation.
Author

Do they? Several modifiers do update just fine in sculpt mode, from subdivision surface over wireframe to bevel.

I've also used several geo nodes setups in sculpt mode without issues.

Do they? Several modifiers do update just fine in sculpt mode, from subdivision surface over wireframe to bevel. I've also used several geo nodes setups in sculpt mode without issues.

image.png
It is worth considering that different groups of modifiers have real technical meaning.
If you're just deforming the geometry, then it's easier than interpreting the sculpt for the generators.
So yeah, there's a lot to think about...

![image.png](https://archive.blender.org/developer/F14149526/image.png) It is worth considering that different groups of modifiers have real technical meaning. If you're just deforming the geometry, then it's easier than interpreting the sculpt for the generators. So yeah, there's a lot to think about...
Author

Absolutely, I understand this to be a complex subject.

It may be worth mentioning that submitting this as a bug report was suggested by Hans Goudey, after I asked about it on a community forum.

link to the forum thread

Absolutely, I understand this to be a complex subject. It may be worth mentioning that submitting this as a bug report was suggested by Hans Goudey, after I asked about it on a community forum. [link to the forum thread ](https://blenderartists.org/t/geometry-nodes-sculpt-mode-mesh-update/1444005/2)

Well, I'm not sure about other modifiers, but geometry nodes worked like that back in 3.1

Well, I'm not sure about other modifiers, but geometry nodes worked like that back in 3.1
Author

Some nodes in geometry nodes, that is. Depending on the nodes used, updating seems to be working fine.

I think I get it now, it's just about how and when the object info is passed along in the modfier.

Just my two cents here, but since this can have a common use case of deforming a mesh in sculpt mode, and at the same time seeing the scalp mesh and groom updating, I'd say this might be worth looking into further.

Some nodes in geometry nodes, that is. Depending on the nodes used, updating seems to be working fine. I think I get it now, it's just about how and when the object info is passed along in the modfier. Just my two cents here, but since this can have a common use case of deforming a mesh in sculpt mode, and at the same time seeing the scalp mesh and groom updating, I'd say this might be worth looking into further.

Changed status from 'Needs Triage' to: 'Needs Developer To Reproduce'

Changed status from 'Needs Triage' to: 'Needs Developer To Reproduce'

Added subscriber: @HooglyBoogly

Added subscriber: @HooglyBoogly
Member

I don't think this is the intended behavior, but I think it points to a deeper architectural flaw in Blender.

The behavior can be fixed with this change:

diff --git a/source/blender/editors/sculpt_paint/sculpt.cc b/source/blender/editors/sculpt_paint/sculpt.cc
index b5d3e53b00c..de0d3cf5dcf 100644
--- a/source/blender/editors/sculpt_paint/sculpt.cc
+++ b/source/blender/editors/sculpt_paint/sculpt.cc
@@ -5390,7 +5390,7 @@ void SCULPT_flush_update_step(bContext *C, SculptUpdateType update_flags)
 
   /* Only current viewport matters, slower update for all viewports will
    * be done in sculpt_flush_update_done. */
-  if (!BKE_sculptsession_use_pbvh_draw(ob, rv3d)) {
+  if (true || !BKE_sculptsession_use_pbvh_draw(ob, rv3d)) {
     /* Slow update with full dependency graph update and all that comes with it.
      * Needed when there are modifiers or full shading in the 3D viewport. */
     DEG_id_tag_update(&ob->id, ID_RECALC_GEOMETRY);

That will have a performance impact though. It seems like this BKE_sculptsession_use_pbvh_draw is in the wrong place. I think we should be able to do a full ID_RECALC_GEOMETRY depsgraph update, which should only end up being expensive if there are modifiers or other objects depending on the data. The depsgraph reevaluation might be slow or it might be fast, that would depend on other factors.
I'm guessing Sergey or Brecht would have thought about this in the past, I'm curious about their opinions here.

I don't think this is the intended behavior, but I think it points to a deeper architectural flaw in Blender. The behavior can be fixed with this change: ```Diff diff --git a/source/blender/editors/sculpt_paint/sculpt.cc b/source/blender/editors/sculpt_paint/sculpt.cc index b5d3e53b00c..de0d3cf5dcf 100644 --- a/source/blender/editors/sculpt_paint/sculpt.cc +++ b/source/blender/editors/sculpt_paint/sculpt.cc @@ -5390,7 +5390,7 @@ void SCULPT_flush_update_step(bContext *C, SculptUpdateType update_flags) /* Only current viewport matters, slower update for all viewports will * be done in sculpt_flush_update_done. */ - if (!BKE_sculptsession_use_pbvh_draw(ob, rv3d)) { + if (true || !BKE_sculptsession_use_pbvh_draw(ob, rv3d)) { /* Slow update with full dependency graph update and all that comes with it. * Needed when there are modifiers or full shading in the 3D viewport. */ DEG_id_tag_update(&ob->id, ID_RECALC_GEOMETRY); ``` That will have a performance impact though. It seems like this `BKE_sculptsession_use_pbvh_draw` is in the wrong place. I think we should be able to do a full `ID_RECALC_GEOMETRY` depsgraph update, which should only end up being expensive if there are modifiers or other objects depending on the data. The depsgraph reevaluation might be slow or it might be fast, that would depend on other factors. I'm guessing Sergey or Brecht would have thought about this in the past, I'm curious about their opinions here.
Philipp Oeser removed the
Interest
Nodes & Physics
label 2023-02-10 08:43:13 +01:00
Philipp Oeser added the
Interest
Modeling
label 2023-02-10 11:18:19 +01:00
Iliya Katushenock added
Status
Confirmed
and removed
Status
Needs Info from Developers
labels 2023-06-23 01:31:52 +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
3 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#103871
No description provided.