Skip to content

lbs_jacobian

lbs_jacobian(V, W)

Linear Blend Skinning Jacobian

Parameters:

Name Type Description Default
V (n, d) numpy float array

Mesh vertices

required
W (n, k) numpy float array

Mesh skinning weights

required

Returns:

Name Type Description
J (nd, d(d+1)k) numpy float array

Linear blend skinning Jacobian matrix

Source code in src\fast_cody\lbs_jacobian.py
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
def lbs_jacobian(V, W):
    """ Linear Blend Skinning Jacobian

        Parameters
        ----------
        V : (n, d) numpy float array
            Mesh vertices
        W : (n, k) numpy float array
            Mesh skinning weights

        Returns
        -------
        J : (nd, d(d+1)k) numpy float array
            Linear blend skinning Jacobian matrix

    """
    n = V.shape[0]
    d = V.shape[1]
    k = W.shape[1]

    one_d1 = np.ones((d+1, 1))
    one_k = np.ones((k, 1))

    # append 1s to V to make V1 , homogeneous
    V1 = np.hstack((V, np.ones((V.shape[0], 1))))


    Wexp = np.kron( W, one_d1.T)
    V1exp = np.kron( one_k.T, V1)
    J = Wexp * V1exp
    Jexp = np.kron(np.identity(d), J)
    return Jexp