PDA

View Full Version : Spawn by Angle?


DSVega93
10-10-2008, 09:46 PM
So im trying to create an effect for a pair of ice skates, however theres a new obstacle in the way.

Id like to be able to increase the spawn rate by the angle the skate is at (for those banked turns) so that you get the feel that the skate is really digging into the ice as they make the turn.

Currently im using a static birth with lockon icon, spawning particles from the static particles. What I need to do is have the spawn offspring increase in number as the banking angle increases. PFlow only, no additonal box plugins :D Any thoughts?

Bobo
10-11-2008, 04:40 AM
You could assign a Script Controller to the track controlling the amount of spawned particles in TrackView and write an expression which calculates the angle between the Z axis of the object and the world Z axis (or whatever you want). You could also calculate the distance to the ice and only emit particles when the skate touches the surface.

The alternative would be to use a Script Test operator which would be slightly more complicated.

DSVega93
10-13-2008, 06:42 AM
Thanks Bobo! I'm going to give that a shot. I'll let you know how it goes :thumbsup:

DSVega93
10-14-2008, 06:59 PM
Hey Bobo,

I fought with the script for a while but im very rusty and my knowledge on it is thin. I tried another approach where I created an ExposeTM to reveal the Local Euler Rotation of the DummyObject that followed the animated object. The D.O banks (as its a test and I dont have the animation) into the turns so it gives me something to test with.

I used WireParams to wire the Spawn Offspring # to the Local Euler Rotation of the dummy object. Inside the expression window i wrote:

Local_Euler_X*10
if Local_Euler_X*10 < 1
then (Local_Euler_X*10)*-1
else Local_Euler_X*10

Its a very hack script. Very rusty. Its doing the job I need it to though. Thoughts?

CGTalk Moderation
10-14-2008, 06:59 PM
This thread has been automatically closed as it remained inactive for 12 months. If you wish to continue the discussion, please create a new thread in the appropriate forum.