Inside Sabertooth
Learn how Sabertooth uses 3ds Max to create 3D interactive projects, including HBO Go’s Game of Thrones interactive experience
  • 1/3
You are here: Forum Home / Autodesk® Maya® / MEL / Blend shape via texture?
  RSS 2.0 ATOM  

Blend shape via texture?
Rate this thread
 
61384
 
Permlink of this thread  
avatar
  • olygraph
  • Posted: 26 October 2011 06:39 AM
  • Total Posts: 16
  • Joined: 29 September 2006 12:29 PM

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

Replies: 0
avatar
  • raym4n
  • Posted: 03 November 2011 08:34 PM

You can do this with SOuP point node.



Replies: 0