diff options
author | Sebastian Parborg <darkdefende@gmail.com> | 2020-09-02 15:14:47 +0300 |
---|---|---|
committer | Sebastian Parborg <darkdefende@gmail.com> | 2020-09-02 15:20:41 +0300 |
commit | 1aa54d4921c2e8d7114f463a940c169ee573f557 (patch) | |
tree | 902f7f8c82fbeb16acb5d569fafc8423e58dd7a9 /source/blender/makesdna | |
parent | feb4b645d70ec8ad5c3f91a957738a9fba4054f0 (diff) |
Make rigidbody simulation handle animated objects gracefully
The animated objects was not updated for each internal substep for the rigidbody sim.
This would lead to unstable simulations or very annoying clipping artifacts.
Updated the code to use explicit substeps and tie it to the scene frame rate.
Fix T47402: Properly updating the animated objects fixes the reported issue.
Reviewed By: Brecht, Jacques
Differential Revision: http://developer.blender.org/D8762
Diffstat (limited to 'source/blender/makesdna')
-rw-r--r-- | source/blender/makesdna/DNA_rigidbody_types.h | 4 | ||||
-rw-r--r-- | source/blender/makesdna/intern/dna_rename_defs.h | 1 |
2 files changed, 3 insertions, 2 deletions
diff --git a/source/blender/makesdna/DNA_rigidbody_types.h b/source/blender/makesdna/DNA_rigidbody_types.h index 02a4a158d8c..cd11c18578a 100644 --- a/source/blender/makesdna/DNA_rigidbody_types.h +++ b/source/blender/makesdna/DNA_rigidbody_types.h @@ -75,8 +75,8 @@ typedef struct RigidBodyWorld { /** Number of objects in rigid body group. */ int numbodies; - /** Number of simulation steps thaken per second. */ - short steps_per_second; + /** Number of simulation substeps steps taken per frame. */ + short substeps_per_frame; /** Number of constraint solver iterations made per simulation step. */ short num_solver_iterations; diff --git a/source/blender/makesdna/intern/dna_rename_defs.h b/source/blender/makesdna/intern/dna_rename_defs.h index a73fc747f84..a0e983e7d3b 100644 --- a/source/blender/makesdna/intern/dna_rename_defs.h +++ b/source/blender/makesdna/intern/dna_rename_defs.h @@ -125,3 +125,4 @@ DNA_STRUCT_RENAME_ELEM(bTheme, tstatusbar, space_statusbar) DNA_STRUCT_RENAME_ELEM(bTheme, ttopbar, space_topbar) DNA_STRUCT_RENAME_ELEM(bTheme, tuserpref, space_preferences) DNA_STRUCT_RENAME_ELEM(bTheme, tv3d, space_view3d) +DNA_STRUCT_RENAME_ELEM(RigidBodyWorld, steps_per_second, substeps_per_frame) |