Fix #111978: Passthrough if there is no simulation state (backport to 3.6) #112110
No reviewers
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
4 Participants
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: blender/blender#112110
Loading…
Reference in New Issue
No description provided.
Delete Branch "MKRelax/blender:111978-simulation-empty-geometry"
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?
This is a fix for #111978 (Geometry disappearing when using simulation zone).
The following Blender 4.0 commit was backported to 3.6:
Blender 4.0 has many simulation node changes. This pull request specifically backports the above commit from 4.0 to 3.6 and nothing more. Specifically it excludes all changes that were made to avoid copies in "no cache simulation" (commit
424c6edc
).Although this pull request fixes #111978, some other issues that are already present in 3.6 might become more apparent after applying this pull request, e.g. the "cache miss" behavior mentioned in #112094.
This pull requests needs to be reviewed thoroughly because I'm a complete novice at C++ development. Added a WIP prefix to prevent merging for now.
The PR won't be merged if it isn't accepted. The "WIP" status basically means it isn't ready for review. The description is a bit confusing.
The changes look good to me, though we should probably wait for Jacques since he'll have a better memory of the original commit.
WIP: Fix #111978: Passthrough if there is no simulation state (backport to 3.6)to Fix #111978: Passthrough if there is no simulation state (backport to 3.6)@blender-bot build
@HooglyBoogly Updated the PR description to (hopefully) make it less confusing.
Oh, sorry, I was confusing myself! Your description was very clear actually, I appreciated that but forgot to mention it in my comment. Thanks for that :) I meant the description of what the "WIP" tag means in Gitea.
Looks good. I'm a bit hesitant because the behavior will actually be different in 4.0 than what is implemented here now, but maybe that's ok (implementing what will be the behavior in 4.0 is too risky, because it requires some more internal changes). Also I can't really reproduce this in a debug build yet, because it's crashing earlier already. Probably because of a not-so-great implementation of
ModifierSimulationCache::get_states_around_frame
:/Have you tried running this patch in a debug build?
If there is consensus to have this in 3.6, please add it to the backport list #109399 (mentioning to use this PR in the remarks)
@JacquesLucke Hmm, you're right. The debug build crashes on
ModifierSimulationCache::get_state_at_frame_for_write
, assertionBLI_assert(frame > states_at_frames_.last()->frame);
. Addition: this happens with and without this backport.Not sure what to do about that tbh. In the end I'm just a end user trying to get a (simulation) node setup to work (an eye rig automatically looking at POIs in the scene, using a simulation zone for easing in and out) and in fact that works now. I don't have any C++ experience, I just looked at the 4.0 commits, tried to understand the (gist of) the passthrough code, adjusted that for 3.6 and ran
make test
to check that I didn't break anything. That's basically all I'm able to do at the moment.Hopefully this PR can still serve as a starting point / timesaver for a fully working backport to 3.6.
@lichtwerk Although @PratikPB2123 added this to the 3.6 LTS milestone last week, I'm not sure there is consensus on backporting this to 3.6 and personally I respect the fact that Simulation Nodes are a work in progress. This backport seemed doable, but if it can't be done, we'll just have to wait for 4.0.
However, 3.6 is an LTS version and simulation nodes are in it. So I think that the basis of it (an empty simulation zone) should work. End users who are experimenting with this new functionality will, like me, assume that they made a mistake in their node setup if their geometry disappears & animation stops working. So fixing this could save them a lot of time.
I'm unable to reproduce the issue in current 3.6 (
e55ca270e2
). Can you still reproduce it? Can you try to find precise reproduction steps (more than just "scrub through the timeline")?@JacquesLucke
(edit: removed "assertion still failing", I was wrong).
Commit
e55ca270e2
does indeed seem to fix #111978. I can no longer reproduce it in this version, both in test files and my real animations.@JacquesLucke One remark: I do see geometry disappearing at frame 0 regularly (but not always, see below) but I assume that could be by design (although from a user's point of view, running an empty simulation, or running "set position" zero times should still pass through the original geometry, even at frame 0).
It is a bit "on and off" though: when there is a single cache, clicking from within that cache back to 0 makes the geometry disappear. Clicking on a further uncached frame e.g. 20, then back to 0 will preserve the geometry (probably because the caches are reset). See screencast.
I see. If this patch fixes "just that", then I'd probably not commit it to 3.6, because it's a bit too risky (changes things in non-trivial ways).
Totally agree. The only purpose of this PR was to save you time when backporting the fix from 4.0 to 3.6. But apparently there were other problems (the failing assertion from #112363) and now that commit
e55ca270e2
fixes (most of) #111978, this PR is obsolete.Pull request closed