Maya mel script (particles attach on the obj vertex)

各Maya用戶可在這裡交流問題和分享制作經驗

版主: h2o, stantang

Maya mel script (particles attach on the obj vertex)

文章vectoreffect » 17日 1月 2003年, 16:42

create a polygon sphere with 400 vertex, and then using particle tool to create 400 particles without space. Finally, you can add the following script into the particle position area (choose creation expression).

float $verticeX, $verticeY, $verticeZ;

$sel = `pointPosition -w pSphere1.vtx[particleShape1.particleId]`;

$verticeX = $sel[0];
$verticeY = $sel[1];
$verticeZ = $sel[2];

particleShape1.position = <<$verticeX, $verticeY, $verticeZ>>;
頭像
vectoreffect
討論區主持
討論區主持
 
文章: 249
註冊時間: 13日 6月 2002年, 18:13
來自: HK

Share On:

Share on Facebook Facebook Share on Twitter Twitter

文章hehehaha » 17日 1月 2003年, 18:46

?????
Why don't you using Goal or Softbody?
It's more simple. :o :o :o :o :o :o :o :o :o
hehehaha
CGV討論區會員
CGV討論區會員
 
文章: 103
註冊時間: 17日 1月 2003年, 18:30

文章vectoreffect » 17日 1月 2003年, 18:57

my mel script is difference from goal and softbody. Goal can't attach on the object when the object is moving. The particles on the softbody object can't move away from the object.

My mel script is used to attach particles on the object surface, then you can use any force to move the particles away from the object.
頭像
vectoreffect
討論區主持
討論區主持
 
文章: 249
註冊時間: 13日 6月 2002年, 18:13
來自: HK

文章hehehaha » 17日 1月 2003年, 20:06

????
"Goal can't attach on the object when the object is moving." ??:roll:
When you connect the particles to the object by using Goal, please untick the use transform as goal. And also test the conserve value of the particles.
hehehaha
CGV討論區會員
CGV討論區會員
 
文章: 103
註冊時間: 17日 1月 2003年, 18:30


回到 Autodesk Maya

誰在線上

正在瀏覽這個版面的使用者:沒有註冊會員 和 9 位訪客

cron