Age | Commit message (Collapse) | Author |
|
Conflicts:
intern/cycles/blender/addon/properties.py
|
|
Bullet spring constraint already supports rotational springs, but
they are not exposed in blender UI, likely due to a simple oversight.
Supporting them is as simple as adding a few DNA/RNA properties
with appropriate UI and passing them on to Bullet.
Reviewers: sergof
Reviewed By: sergof
Differential Revision: https://developer.blender.org/D2331
|
|
Point cache read code contains checks designed to prevent it reading
stale data when the relevant simulation code should instead compute
the next frame from the previous one. However in some situations like
motion blur subframes the simulation can't possibly do it and just
exits. This causes completely incorrect motion blur at or after the
last cached frame.
To fix, add a parameter that tells the cache code whether it should
apply the checks and exit, or read what it can even if stale (true
means exactly same as old behavior).
Doing this in cache rather than clamping the frame number better in
the caller lets it handle the case of incomplete cache that stops
before the official last frame.
Reviewed By: mont29, lukastoenne
Maniphest Tasks: T49004
Differential Revision: https://developer.blender.org/D2144
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Also 'com' as abbreviation for center-of-mass is a bit confusing, rename to 'center'.
|
|
Patch D1417 by Martin Felke, with minor edits thanks!
|
|
This commit only adds callbacks which then later be used with major dependency
graph commit, keeping the upcoming commit more clean to follow.
Should be no functional changes so far still.
|
|
The issue was caused by the fix for T34108, which modified DNA in order to
get a fallback box collision shape. Not sue why it's needed, we can just get
box shape directly, without modifying user's settings.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
dm can’t be NULL here (found by Coverity).
|
|
This was a ToDo item, for mesh-based rigid body shapes (trimesh, convex)
the operator was simply using the bounding box volume, which can grossly
overestimate the volume and mass.
Calculating the actual volume of a mesh is not so difficult after all,
see e.g.
http://research.microsoft.com/en-us/um/people/chazhang/publications/icip01_ChaZhang.pdf
This patch also allows calculating the center-of-mass in the same way.
This is currently unused, because the rigid body system assumes the CoM
to be the same as the geometric object center. This is fine most of the
time, adding such user settings for "center-of-mass offset" would also
add quite a bit of complexity in user space, but it could be necessary
at some point. A number of other physical properties could be calculated
using the same principle, e.g. the moment of inertia.
|
|
|
|
Problem happens when removing a rigid body reference in a constraint,
and then jumping to the start frame right away. This will cause a full
rebuild of the rigid body world. However, the btRigidBodys are removed
before the constraints, and this leaves dangling pointers in the
btTypedConstraints, which causes corruption when deleting those
constraints later.
Fix for now is to explicitly delete constraints in advance when
rebuilding, while they still have valid btRigidBody pointers.
Ultimately the whole memory management and ownership of Bullet data
needs redesign. This is already happening in the particles_refactor
branch and could be ported to master separately:
https://developer.blender.org/diffusion/B/browse/particles_refactor/source/blender/blenkernel/intern/rigidbody.c
|
|
|
|
Opted to keep includes if they are used indirectly (even if removing is possible).
|
|
|
|
updates.
This file crashes on loading with NULL pointer access to curve_cache:
{F77132}
The pdInitEffectors function was amalgamating the simple
collection of effector objects with an automatic precalculation for
curve guides and the like. This precalculation requires object data
that may not be available until the DAG has finished.
Since for DAG dependencies only the list of effectors is required,
added an argument to disable precalculation when collecting effectors.
|
|
shapes to box.
Tweak world rebuilding logic, so it's not done before object data was
updated.
|
|
Convert int to bool.
|
|
|
|
Make some functions private.
Remove unneeded nested if statements.
Avoid mixing short and bool.
|
|
Only supported when using the "Deform" mesh source.
|
|
This gives us better access to the data and should also be faster to
create.
|
|
The options are:
Base: Base mesh
Deform: shape keys and deform modifiers
Final: All deformations and modifiers
It would be nice to have a way of specifying where exactly in the
modifier stack the collision shape is generated. However this is not
staight forward since the rigid body simulation is not part of the
modifier system and would require hacks to make it work.
|
|
|
|
|
|
animation on playback
Not all objects in RB group actually have a "rigid body object", needs to be checked.
|
|
|
|
|
|
Remove duplicate null check.
|
|
This is not the nicest behaviour but trying to keep both bullet and
blender side objects in sync breaks in this case.
There might be a better soluion but this avoids crashes for now.
Fixes: [#35995] Delete crash on specific scene (Physics)
|
|
- mult_m4_m4m4 -> mul_m4_m4m4
- mult_m3_m3m4 -> mul_m3_m3m4
these temporary names were used to avoid problems when argument order was switched.
|
|
|
|
Now copying a scene will also duplicate groups that consist entirely of objects
that are duplicated with the scene. The rigid body world will then also pointers
to these new groups.
|
|
Since we use the rigid body transform when transforming rigid bodies
things like parents and constraints add an offset because rigid body
transforms are in global space.
Now we just don't take rigid body transform into account on simulation
start frame so there are no problems when doing the initial setup.
The problem still exists when simulation is running of course.
To properly fix this we'd have to solve parenting and constratins while
taking rigid bodies into account before and after transform.
We'll have to see if it's really needed, would like to avoid it though.
|
|
- remove unneeded checks (poll checks editor is non-null)
- use booleans
- rename operator SEQUENCER_OT_gap_remove, _gap_insert
also quiet shadow warning in rigidbody.c (shadowing 'loc')
|
|
also correct odd indentation.
|
|
mingw.
also compiling without bullet needed a stub added.
|
|
Instead of flagging the rigid body world for frame update just call
BKE_rigidbody_do_simulation() recursively for all scenes.
This avoids having to constantly check if the simulation needs to be
updated.
|