skinning_subspace
skinning_subspace(X, T, num_modes, num_clusters, cache_dir=None, read_cache=False, ortho=True, mu=None, C=None, constraint_enforcement='optimal')
Constructs a physics subspace corresponding with skinning eigenmodes and skinning clusters
Parameters:
Name | Type | Description | Default |
---|---|---|---|
X |
(n, 3) float numpy array
|
Vertex positions |
required |
T |
(t, 4) int numpy array
|
Tet indices |
required |
num_modes |
int
|
Number of modes to use |
required |
num_clusters |
int
|
Number of clusters to use |
required |
cache_dir |
str
|
Directory to cache results in |
None
|
read_cache |
bool
|
Whether to read from cache or not |
False
|
ortho |
bool
|
Whether to orthonormalize the subspace |
True
|
mu |
float numpy array
|
Per-tet conducivity. If None, sets it to 1.0 everyewhere |
None
|
C |
(3n, c) float numpy array
|
Constraint matrix we desire on our weights s.t. C.T @ W = 0 |
None
|
constraint_enforcement |
str
|
Method of enforcing constraint. Either "project" or "optimal" |
'optimal'
|
Returns:
Name | Type | Description |
---|---|---|
B |
(3n, m) float numpy array
|
Subspace matrix/Eigenvectors of laplacian. |
l |
(t, 1) int numpy array
|
Cluster indices |
W |
(n, m) float numpy array
|
Skinning weights |
Source code in src\fast_cody\skinning_subspace.py
12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 |
|