|
I am trying to drive a blend shape via textures but it is very very to slow.
string $obj = "mainShape"; string $colorTexture1[]; $colorTexture1[0] = "transfoBlend";
int $size[] =`polyEvaluate -vertex $obj`; int $i;
//loop on the vertice for ($i=0;$i<$size[0];$i++) {
string $map[]=`polyListComponentConversion -fv -tuv ($obj+".vtx["+$i+"]")`;
float $UV[]=`polyEditUV -q $map[0]`;
//sample the color
float $color[] =`colorAtPoint -o "A" -u $UV[0] -v $UV[1] $colorTexture1[0]`;
setAttr mainBlendShape.inputTarget[0].inputTargetGroup[0].targetWeights[$i] $color[0]; }
Is there a way to have similar result in realtime?
Thank you!
Oly
|
|
|
|
You can do this with SOuP point node.
|
|
|