2010年10月7日 星期四

COBRAS + LadyGAGA (Maya MEL Script)



此次再次使用MAYA的程式撰寫軟體MEL
來進行造形研究
我們使用MEL裡面最簡易的setAttr
即是Set Attribute(設定屬性)
來繪製圖形
可將你畫好的原始物件
進行移動 旋轉 及縮放

加上Duplicate(複製)功能
使圖形具有運動感
猶如眼鏡蛇 或如 蝴蝶
又誇張如同Lady GAGA的衣著

This time we use the MEL script in MAYA again
to populate the FORM.
We use simple "setAttr" (= set attribute )
to move, rotate and scale
the oringinal element form you drew.

We also use "duplicate" to make the result form
has motion movement.
The result form seems like
a COBRAS, a Butterfly flapping its wings, or
Lady GAGA's outfit.  

基本上先畫一個橢圓 然後用setAttr
改變其scale並移動之
移動的同時複製
並加上For Loop使其製造多個複製形體
猶如殘影

Basically we drew a egg shape sphere first,
then use the "setAttr"
to change the location and the scale of the sphere.
We use "duplicate" and a "For Loop"
to make the sphere repeat as a blurry effect.

程式碼如下:
SCRIPT HERE:

for($s=1; $s<=30; $s=$s+1){
setAttr "pSphere1.translateY" $s;
setAttr "pSphere1.rotateY" (6*$s);
//setAttr "pSphere1.rotateZ" (12*$s);
setAttr "pSphere1.scaleX" (0.5*$s);
setAttr "pSphere1.scaleY" (0.1*$s);
duplicate pSphere1;

setAttr "pSphere1.translateY" $s;
setAttr "pSphere1.rotateY" (-6*$s);
//setAttr "pSphere1.rotateZ" (12*$s);
setAttr "pSphere1.scaleX" (0.5*$s);
setAttr "pSphere1.scaleY" (0.1*$s);
duplicate pSphere1;
};

COBRAS

ButterFly 

Lady GAGA

  

沒有留言:

張貼留言