particle emission on waters surface as motor boat goes across...

particle emission on waters surface as motor boat goes across...

Post by ELEK » Mon, 13 Oct 2003 07:29:05


On the Fluid Effects DVD Duncan Brinsmead shows how to use a motor boat. In
this section his nice little motor boat skirts across the surface in a
believable fashion spraying particles as it goes along. Duncan mentions the
expression the locater uses to control the boat position to control the
particle emission rate etc. as the boat strikes the surface but I have had
little luck finding some documentation regarding getting this to work.

Anyone know of a good place to start so I can understand which attribute to
assign the emitter to in the expression, or know of a good code example I
can work from to understand what is going on in terms of getting the emitter
to work.

Thanks.
-TIM
 
 
 

particle emission on waters surface as motor boat goes across...

Post by Duncan Bri » Fri, 17 Oct 2003 04:45:42

Here is a little bit to get you started:
1.Create an ocean.(fluid effects->createOcean)
2.Select your boat and do "make motorboats".
3.Create a particle emitter and parent it under motorboat locator node.
EmitterType = volume
AwayFromCenter = 0
Along Axis = 1
emitter.scaleZ = relatively small value
Position and scale the emitter along one of the front sides of the boat
so that particles shoot out in the direction that spray would.

4. Select the particles and create a gravity field. Make the magnitude
around 50.
5. On the particle shape set the following:
lifeSpan = constant
make the color white
streak or multistreak is a good draw method, at least for previewing

6.On the locator, under extra attributes, set the throttle to 1.0. The boat
should now move during playback and the emitter should move with the boat.
7. Edit the expression that drives the boat simulation so that it also
controls the spray intensity.
(expression editor->selectFilter->by expression name, click on
expression1)
The following uses some variables( underWater and newVel ) that have
already been computed in the expression.
Put this at the end of the expression, before the final parenthesis:

//------------------------------------------------------
if( $underWater > 0.0001){
float $boatSpeed = sqrt($newVelX * $newVelX + $newVelZ * $newVelZ);
float $verticalSpeed = $newVel;
// Lets have more spray if the boat is moving faster
float $wakeIntensity = 10*($boatSpeed - 10*$verticalSpeed*$boatSpeed);
if( $wakeIntensity > 1.0){ //clip the values to avoid too much spray at
high speeds
$wakeIntensity = 1.0;
} else if( $wakeIntensity < 0.0 ){
$wakeIntensity = 0.0;
}
emitter1.rate = $wakeIntensity * 1000; // particles per second
emitter1.alongAxis = $wakeIntensity*5; // particle speed
} else {
emitter1.rate = 0;
}
//---------------------------------------------------------


The math here is pretty arbitrary. I would experiment and see what looks
good.
You can then easily add another emitter to for the other side of the boat.

Duncan



In
the
to
emitter

 
 
 

particle emission on waters surface as motor boat goes across...

Post by tele » Sat, 18 Oct 2003 22:04:41

uncan,
Wow, straight from the man himself! Thank you for the info.
This looks very helpfull. I will be trying it out sometime today.
Thanks
-TIM ELEK

"Duncan Brinsmead" < XXXX@XXXXX.COM > wrote in message news:<bmk858$c0kr8$ XXXX@XXXXX.COM >...