apps.interactive_cd_rig_anim
interactive_cd_rig_anim(msh_file=None, rig_file=None, anim_file=None, Ws=None, l=None, mu=10000.0, rho=1000.0, num_modes=16, num_clusters=100, constraint_enforcement='optimal', results_dir=None, read_cache=False, texture_png=None, texture_obj=None)
Runs a standard interactive fast CD simulation, where the user can play back rig animations and observe secondary effects in real-time
Parameters:
Name | Type | Description | Default |
---|---|---|---|
msh_file |
str
|
path to Tet mesh .msh file (usually generated by TetWild) default=None, which calls the cd_fish.msh included with the package |
None
|
rig_file |
str
|
path to rig.json file (usually generated from Blender/Mixamo + riggrats), default=None, which assumes single affine handle |
None
|
anim_file |
str
|
path to anim.json file (usually generated from Blender/Mixamo + riggrats), default=None, which assumes no motion for 1000 timesteps |
None
|
Ws |
float numpy array
|
n x m skinning weights used for simulation. If None, recomputed on the fly. |
None
|
l |
float int array
|
T x 1 per-tet cluster indices. if None, recomputed on the fly. |
None
|
mu |
float
|
mesh lame parameter |
10000.0
|
rho |
float
|
mesh density |
1000.0
|
num_modes |
int
|
if Ws is None, number of skinning modes to compute.Ignored if Ws and l are passed. |
16
|
num_clusters |
int
|
if l is None, number of skinning clusters to compute. Ignored if Ws and l are passed. |
100
|
constraint_enforcement |
str
|
{"project", "optimal"}. if "optimal", performs the full constrained GEVP described in the paper. |
'optimal'
|
results_dir |
str
|
directory where results are stored and where cache is stored. if None, then |
None
|
read_cache |
bool
|
whether to read skinning modes from cache or not (default=False) |
False
|
texture_obj |
str
|
directory pointing towards a .obj file of the surface mesh containing the UV map required for texture mapping. If None and if texture_png is None, then no texturing is applied. |
None
|
texture_png |
str
|
directory pointing towards a .png file of the surface texture. if None and if texture_obj is None, then no texturing is applied. |
None
|
Examples:
>>> import fast_cody as fcd
>>> fcd.apps.interactive_cd_rig_anim()
Source code in src\fast_cody\apps\interactive_cd_rig_anim.py
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 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 |
|