Get Emitter Directions in Particle Expression

「Get Emitter Directions in Particle Expression」の編集履歴(バックアップ)一覧はこちら

Get Emitter Directions in Particle Expression」(2010/10/30 (土) 13:09:37) の最新版変更点

追加された行は緑色になります。

削除された行は赤色になります。

I got a trouble with emitter Speed and particle conserve. Particle conserve is calculated AFTER emitter sets out particles according to emitter speed. It makes gaps between creation frame and following frames. To solve this issue, I had to include emitter Speed function to particle expression. #image(emitterDirection.jpg,title=emitterDirection) #highlight(c){{ /* In Expression Editor, use this command like below float $emiDir[] = emitterDirection("particleShape1", particleShape1.emitterId); velocity = <<$emiDir[0], $emiDir[1], $emiDir[2]>>; */ global proc float[] emitterDirection(string $particleShape, int $emitterId){ /* Get Emitter Name from emitterId */ string $emitters[] = `listConnections($particleShape + ".newParticles[" + $emitterId + "]")`; /* emitter Matrix */ float $m[] = `xform -q -ws -matrix $emitters[0]`; /* convert to vector */ float $p[] = {0,1,0}; return pointMatrixMult($p, $m); } }}
I got a trouble with emitter Speed and particle conserve. Particle conserve is calculated AFTER emitters set out particles according to emitter speed. It makes gaps between the creation frame and following frames. To solve this issue, I had to include emitter Speed function to particle expression. #image(emitterDirection.jpg,title=emitterDirection) #highlight(c){{ /* In Expression Editor, use this command like below float $emiDir[] = emitterDirection("particleShape1", particleShape1.emitterId); velocity = <<$emiDir[0], $emiDir[1], $emiDir[2]>>; */ global proc float[] emitterDirection(string $particleShape, int $emitterId){ /* Get Emitter Name from emitterId */ string $emitters[] = `listConnections($particleShape + ".newParticles[" + $emitterId + "]")`; /* emitter Matrix */ float $m[] = `xform -q -ws -matrix $emitters[0]`; /* convert to vector */ float $p[] = {0,1,0}; return pointMatrixMult($p, $m); } }}

表示オプション

横に並べて表示:
変化行の前後のみ表示:
ツールボックス

下から選んでください:

新しいページを作成する
ヘルプ / FAQ もご覧ください。