Dynamic paint sub-steps don't work when the brush position is set in geometry nodes #98161

Open
opened 2022-05-16 13:03:17 +02:00 by Kevin Wright · 8 comments

I believe this may be the same issue as https://developer.blender.org/T40597

In order to have a brush follow a potentially very large collection of curves in sequence, I'm using geometry nodes to set the position, which avoids the pain of having to join the curve paths or painstakingly tweak the offsets and influence keyframes for each and every one.

This works, but with sub-steps enabled it seems that the nodes are still only being updated once/frame. Or, if they are being updated, then the seconds input from the Scene Time node is being derived from the frames value which is clamped to an integer.

text_path_test.blend

I believe this **may** be the same issue as https://developer.blender.org/T40597 In order to have a brush follow a potentially very large collection of curves in sequence, I'm using geometry nodes to set the position, which avoids the pain of having to join the curve paths or painstakingly tweak the offsets and influence keyframes for each and every one. This works, but with sub-steps enabled it seems that the nodes are still only being updated once/frame. Or, if they are being updated, then the `seconds` input from the `Scene Time` node is being derived from the `frames` value which is clamped to an integer. [text_path_test.blend](https://archive.blender.org/developer/F13078980/text_path_test.blend)
Author

Added subscriber: @thecoda

Added subscriber: @thecoda
Member

Added subscriber: @lichtwerk

Added subscriber: @lichtwerk
Member

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

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

Can confirm.

Can confirm.
Member

Added subscribers: @JacquesLucke, @dr.sybren

Added subscribers: @JacquesLucke, @dr.sybren
Member

We are actually getting the right subframe in BKE_object_modifier_update_subframe, guess BKE_animsys_evaluate_animdata has some loose parts in concert with geonodes?

CC @dr.sybren
CC @JacquesLucke

We are actually getting the right subframe in `BKE_object_modifier_update_subframe`, guess `BKE_animsys_evaluate_animdata` has some loose parts in concert with geonodes? CC @dr.sybren CC @JacquesLucke
Member

BKE_object_modifier_update_subframe should really be end-of-live. It's honestly surprising that it still works in some cases with the new depsgraph...

I can kind of make it work for the specific case in the given file with this:

diff --git a/source/blender/blenkernel/intern/object.cc b/source/blender/blenkernel/intern/object.cc
index 2a25d73ed87..a66b5358f1a 100644
--- a/source/blender/blenkernel/intern/object.cc
+++ b/source/blender/blenkernel/intern/object.cc
@@ -4222,7 +4222,7 @@ void BKE_object_handle_update_ex(Depsgraph *depsgraph,
     BKE_object_where_is_calc_ex(depsgraph, scene, rbw, ob, nullptr);
   }
 
-  if (recalc_data) {
+  if (recalc_data || true) {
     BKE_object_handle_data_update(depsgraph, scene, ob);
   }
 }
diff --git a/source/blender/nodes/geometry/nodes/node_geo_input_scene_time.cc b/source/blender/nodes/geometry/nodes/node_geo_input_scene_time.cc
index 0222ccbbd02..86d82b8019f 100644
--- a/source/blender/nodes/geometry/nodes/node_geo_input_scene_time.cc
+++ b/source/blender/nodes/geometry/nodes/node_geo_input_scene_time.cc
@@ -16,7 +16,7 @@ static void node_declare(NodeDeclarationBuilder &b)
 
 static void node_exec(GeoNodeExecParams params)
 {
-  const Scene *scene = DEG_get_input_scene(params.depsgraph());
+  const Scene *scene = DEG_get_evaluated_scene(params.depsgraph());
   const float scene_ctime = BKE_scene_ctime_get(scene);
   const double frame_rate = (((double)scene->r.frs_sec) / (double)scene->r.frs_sec_base);
   params.set_output("Seconds", float(scene_ctime / frame_rate));

It's not quite clear to me why recalc_data is false when it should probably be true.

`BKE_object_modifier_update_subframe` should really be end-of-live. It's honestly surprising that it still works in some cases with the new depsgraph... I can kind of make it work for the specific case in the given file with this: ``` diff --git a/source/blender/blenkernel/intern/object.cc b/source/blender/blenkernel/intern/object.cc index 2a25d73ed87..a66b5358f1a 100644 --- a/source/blender/blenkernel/intern/object.cc +++ b/source/blender/blenkernel/intern/object.cc @@ -4222,7 +4222,7 @@ void BKE_object_handle_update_ex(Depsgraph *depsgraph, BKE_object_where_is_calc_ex(depsgraph, scene, rbw, ob, nullptr); } - if (recalc_data) { + if (recalc_data || true) { BKE_object_handle_data_update(depsgraph, scene, ob); } } diff --git a/source/blender/nodes/geometry/nodes/node_geo_input_scene_time.cc b/source/blender/nodes/geometry/nodes/node_geo_input_scene_time.cc index 0222ccbbd02..86d82b8019f 100644 --- a/source/blender/nodes/geometry/nodes/node_geo_input_scene_time.cc +++ b/source/blender/nodes/geometry/nodes/node_geo_input_scene_time.cc @@ -16,7 +16,7 @@ static void node_declare(NodeDeclarationBuilder &b) static void node_exec(GeoNodeExecParams params) { - const Scene *scene = DEG_get_input_scene(params.depsgraph()); + const Scene *scene = DEG_get_evaluated_scene(params.depsgraph()); const float scene_ctime = BKE_scene_ctime_get(scene); const double frame_rate = (((double)scene->r.frs_sec) / (double)scene->r.frs_sec_base); params.set_output("Seconds", float(scene_ctime / frame_rate)); ``` It's not quite clear to me why `recalc_data` is false when it should probably be true.
Author

Okay, this sounds far more promising than I ever dared hope.

The diff to make it work could easily be scrawled on a postcard, and I've possibly surfaced a bug in recalc_data that might well be causing other problems. It also opens up other options in using geonodes to update positions and respect subframes for scenarios where drivers won't work.

Okay, this sounds far more promising than I ever dared hope. The diff to make it work could easily be scrawled on a postcard, and I've possibly surfaced a bug in `recalc_data` that might well be causing other problems. It also opens up other options in using geonodes to update positions and respect subframes for scenarios where drivers won't work.
Philipp Oeser removed the
Interest
Animation & Rigging
label 2023-02-09 14:35:05 +01:00
Bastien Montagne added this to the Core project 2023-02-09 15:43:54 +01:00
Bastien Montagne removed this from the Core project 2023-02-09 18:20:30 +01:00
Philipp Oeser added the
Interest
Core
label 2023-02-10 11:09:23 +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
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#98161
No description provided.