Dynamic paint sub-steps don't work when brush is driven #40597
Labels
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
No due date set.
Dependencies
No dependencies set.
Reference: blender/blender#40597
Loading…
Reference in New Issue
No description provided.
Delete Branch "%!s(<nil>)"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
System Information
OS: Ubuntu 14.04
Linux kernel: 3.13.0-24-generic
Graphics:
VGA compatible controller: Intel Corporation 4th Gen Core Processor Integrated Graphics Controller (rev 06)
3D controller: NVIDIA Corporation GK107M [GeForce GT 750M] (rev a1)
Blender Version
Broken: blender-2.70-aed67dc-linux-glibc211-x86_64
Short description of error
When a paint brush's motion is controlled by a driver, the "sub-steps" setting has no effect. Perhaps this is related to this bug: https://developer.blender.org/T34685
Exact steps for others to reproduce the error
Here's a .blend with steps 1-7 completed: paint_bug.blend
Changed status to: 'Open'
Added subscriber: @Garrett-8
Added subscriber: @totoro-4
In blenkernel/intern/dynamicpaint.c : subframe_updateObject() tries to update only the objects related to the moving brush, ie. parents, constraint targets etc. The driver targets are not processed here yet. Also maybe ADT_RECALC_ALL needed instead of ADT_RECALC_ANIM here.
Added subscribers: @LukasTonne, @miikah, @Sergey
@LukasTonne, maybe you'll nail the issue down real quick? It doesn't seem to be a thing with
ADT_RECALC_ALL
, changing this doesn't really change anything.Also summoning @miikah here since he's an original author of the dynamic paint and might have time here to have a look.
Well, the
ADT_RECALC_ALL
flags do what they are supposed to do: they evaluate the drivers on every subframe. However, the problem is that the expression itself uses another object (Empty) as inputvar
. This object is not in turn updated for every subframe, so it only gets "jumpy" full-frame transform values out of it and the driver subframes don't matter.Can't think of a proper solution here, basically it comes down to a depsgraph problem again. The dynamic paint system would have to evaluate the depsgraph to get all the data it needs in every subframe, and the drivers would have to correctly register all dependencies (Sphere needs Empty transform to be evaluated first).
The current method of directly evaluating a single object's animdata works in the most common cases, but it easily fails when more objects get involved. We had (and still have) a similar issue with particle emitter interpolation, which also does direct anim eval and fails for driven objects etc..
Changed status from 'Open' to: 'Archived'
Have to put this on TODO for now. Only "solution" afaict would be doing complete scene updates for subframes, which would make dynamic paint really slow in general just to solve this driver limitation.
The depsgraph refactoring should provide a real solution eventually. In the meantime try to avoid drivers and use parenting and keyframe anim if possible.
As I see it already does something with the constraint dependencies: scans the constraint list and call itself for all the target objects found. Perhaps this was the solution for the mentioned #34685 bug. It seems this function tries to replace the depsgraph with its own version... But I can imagine how complicated to do the same for all the possible drivers in the object...
And by the way, I suspect this function has no protection against infinite dependency loops...
And @miikah, I think you can use copy constraint too. It's working with the null object here.
@LukasTonne Yeah, definitely not worth updating whole scene over single corner case.
@totoro-4 No, I can't see how it would generate infinite loop.
Anyway, that was intended to be just a hacky solution to get subframes working somehow until there was a bit more suitable way to handle it. I guess there still isn't. IIRC it originally only updated parent objects. Then it turned out it also has to update constraints, curves, armatures etc. It's clear we need a depsgraph based solution to make it work correctly in all cases.
@miikah: sorry, I was not absolutely sure about that, but now I see you limited the recursion levels... a lot recalculations are possible but it's ok.
But is it really necessary to calculate subframes precisely? I mean this is only for the continuous lines... Is the result wrong if you just interpolate the object's position between the frames?
Another limitation: not interpolates between shape keys.
Perhaps the full recalculation is the solution, it is robust and since this is a bake mode the user can wait more (maybe the current algorithm is actually slower than the full recalculation in some special cases).
But I agree not to make this right before the release.
@totoro-4 It has been like that for 3 years already. I'm sure it can wait until depsgraph refactor is complete. :)
Full recalculation could be acceptable for the image sequence mode, but I would rather keep it consistent and use same system for dynamic paint as whole. Also the performance drop would bee too massive in larger scenes, where instead of having to update couple of related objects it would have to redo everything.
Added subscriber: @zachnfine
Could we possibly get this just for baking? I'm trying to animate the burns on surfaces of a laser whose position is driven partly by a noise modifier, and it's moving too fast to leave good contiguous lines as marks. Substeps do nothing in this case.
I thought maybe as a workaround I could dupe the project, set the output time stretch to 500, bake 5x the normal amount of frames, and then I'd use ffmpeg or some other program to combine every 5 frames into 1 (or retime it to run at 500% speed with frame blending set to on, in any compositing or editing application), and then I'd have an image sequence to use with the original project that'd be roughly equivalent to that which would have been generated using substeps. But no such luck, the noise modifier seems to be frame rather than time based and doesn't respect the time stretch.
It wouldn't bother me if substeps caused the whole project to render slowly as I only need substeps set to 5 (or 20) when I'm baking the dynamic paint simulation. After that I could set it back to 0 and I'd still have the already-output baked image sequence to work with in my shader.
This is kind of a fundamental issue of how dynamic paint is fit into the overall design and, unfortunately, there is no easy fix even if you limit the scope to just baking.