bnp.math.rigging

linear_blend_skinning(vertices, rest_pose, dynamic_pose, skinning_weights) → np.ndarray

Calculate new vertex positions with Linear Blend Skinning. Green box is deformed with Blender’s LBS, white boxes are vertex positions calculated with this LBS.

../../_images/lbs.png
Parameters:
  • vertices (np.ndarray) – homogeneous vertex positions (vtx_num, 4)
  • rest_pose (np.ndarray) – translation matices at rest pose (joint_num, 4, 4)
  • dynamic_pose (np.ndarray) – translation matrices at a specified frame (joint_num, 4, 4)
  • skinning_weights (np.ndarray) – skinning weights (equal to vertex weights) (vtx_num, joint_num)
Returns:

np.ndarray new vertex positions at homogeneous coordinates (vtx_num, 4)