Rigid body point cache jumps #50230
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
3 Participants
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: blender/blender#50230
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?
We noticed some unclean behaviour when working with rigid bodies, which leads to bad simulation results. When scrubbing through the timeline the last simulation state is being used for later continuation of the "main" simulation, which doesn't always work as shown in the following example.
Steps to reproduce based on the attached blend file:
Resulting simulation with motion path and frame numbers:
rigid-body-cache-jump.blend
Tested on Windows 7 x64 with the official buildbot version.
Changed status to: 'Open'
Added subscriber: @KaiKostack-3
Added subscriber: @LucaRood-3
Changed status from 'Open' to: 'Archived'
I finally had some time to look into this...
The issue is that the rigid body simulation state isn't updated when read from cache. But the greater issue is that rigid body cache is currently only storing positions and rotations, so even if the simulation state is updated from the cache, we can only update the positions/rotations, and not the velocities.
This little diff calls a simulation state update when the cache is read, and thus correctly sets the position even when the timeline is set back to the initial cached bit after having jumped a few frames... But notice that the speed is reset to 0, so despite being in the correct location, you'll see your objects suddenly stopping, and re-accelerating.
P435: Rigid body cache update
So this diff is only really a demonstration, and doesn't really fix the issue at all. To resolve this, the velocities would have to be cached as well, which isn't really worth the trouble for now, especially with this outdated caching system...
So I'm closing this for the time being... But I have added this to ToDo, and this shall probably be addressed with an eventual cache overhaul (provided it is even possible to get/set the velocities from Bullet...).
https://wiki.blender.org/index.php/Dev:Source/Development/Todo/Tools#Rigid_Body
Changed status from 'Archived' to: 'Open'
I'm reopening this, because I realized that I shouldn't try to fix it by having everything cached and then rolling back once you go to to a point in time before a cache gap. Having a simulation with a time gap in it doesn't actually make any sense at all, so I realized that I should rather prevent the cache from forming such a gap in the first place.
That is a trivial fix, and should prevent accidental rigid body cache corruption by the user if playing outside of the currently cached period.
This issue was referenced by
9cd6b03187
Changed status from 'Open' to: 'Resolved'