Blender Git Commit Log

Git Commits -> Revision d983908

Revision d983908 by Lukas Toenne (soc-2013-paint)
July 12, 2014, 09:51 (GMT)
Fix T41019: Calculate Mass does not calculate actual volume.

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.

Commit Details:

Full Hash: d983908f5a326f0a30a35d6acc2a804471cc88cd
Parent Commit: 7e0932f
Committed By: Campbell Barton
Lines Changed: +319, -73

7 Modified Paths:

/source/blender/blenkernel/BKE_mesh.h (+4, -0) (Diff)
/source/blender/blenkernel/BKE_rigidbody.h (+3, -0) (Diff)
/source/blender/blenkernel/intern/mesh_evaluate.c (+119, -0) (Diff)
/source/blender/blenkernel/intern/rigidbody.c (+179, -0) (Diff)
/source/blender/blenlib/BLI_math_geom.h (+1, -0) (Diff)
/source/blender/blenlib/intern/math_geom.c (+12, -0) (Diff)
/source/blender/editors/physics/rigidbody_object.c (+1, -73) (Diff)
By: Miika HämäläinenLast update: Nov-07-2014 14:18MiikaHweb | 2003-2021