In this tutorial you will learn how to use Effectors to create a smoke trail behind a bullet.
For this tutorial please load Tut_11_start.ma scene from your [MAYA]/FumeFX/Tutorials folder.
In this scene we have a bullet flying through the FumeFX Grid. We want to create smoke based on velocity; specifically we want to create smoke in areas of high velocity. Later in this tutorial we'll be asked to specify velocity ranges in which we want smoke to be created. So our first task is to find out these values.
Open the FumeFX Attribute Editor and make sure that Adaptive checkbox is unchecked. Under the Output rollout click on the Export Velocity checkbox.
Bullet is not connected yet to the FumeFX, so slect the bullet and FumeFX. From the Maya menu, choose FumeFX - >Attach - >Attach Geometry to FumeFX as Collision.
Run a simulation and stop it after 20 frames.
From the FumeFX Attribute Editor under Viewport - >Display Components rollout enable Show Velocities. Under the Slicing rollout enable Show slice. Set Slice Type to YZ and to 35. You can switch to front viewport to get a better view.
As you move the frame slider, you can see velocities change in the grid, driven by the motion of the bullet.
Under the Viewport - >Display Components rollout adjust Min Velocity and Max Velocity values to include only high velocities. Make sure to include velocities in the area right in front of the bullet. Good values for Min/Max are 2.5/3.5.
Now that we know the velocity range we are interested in, we can proceed to setting the values in our Effector.
With FumeFX selected, go to the Maya - >FumeFX menu and click on Effector option to create an Effector in the scene. With FumeFX grid selected, this operation will automatically add newly created Effector to the FumeFX relationship manager's list.
We want this Effector to apply throughout the grid, so keep its Shape as Free.
Inside Effector parameters, type in a Channel name you will use to bind the Effector to FumeFX. In this case, we'll name it ???smokeEff???.
Set Input type to Velocity and set Range Min and Range Max to 2.5 and 3.0 respectively. Now we've specified where we want smoke to be created.
Next set Output Operator to Replace and Scalar to 10.0.
Here are a few tips on input type ranges. If the Output Value curve is disabled, voxels with velocities below Range Min will have their smoke density set to 0.0 (which will effectivly erase smoke from them). Voxels with velocities above Range Max will have their smoke density set to 10.0, and voxels with velocities falling between range min and range max will have their smoke density lineary interpolated between 0 and 10.
That's not what we want; we want smoke to be created only in areas which don't contain smoke (in other words, empty voxels) and we want the rest of the grid unchanged.
Enable Smoke in the Test group and set Min/Max to 0.0/0.001. This condition is tested for every voxel and the Effector is applied only if all test conditions are met.
Optionally, we can change the Output Value curve; there is no need for the output to be lineary interpolated between range min and range max. Enable Use Output Value Ramp, open Output Value curve and try to match it to the image below.
Observe that the curve achieves maximum value in the entire range, except near the left end.
Select FumeFX, scroll down to the Simulation - > Smoke rollout, click on Master Effector and select smokeEff from the '...' button menu.
Before starting simulation, you can remove velocity from the list of exporting channels.
Now run simulation on the entire range.