Usage of the Advanced Data Manipulation tools in Particle Flow is potentially quite complex. The more you know about its workings, the more you can do with it. This tutorial aims to give you a leg up by demonstrating how to create an operator that lets you control particle direction with a 3D object such as a teapot.
Skill level: Intermediate
Time to complete: 1 hour
To create a new operator, you can use any of the Data operators: Data Icon, Data Operator, Data Test, or Data Icon Test.
The Data Icon 001 rollout appears in Particle View.
This opens Data View, the user interface for Data operators. Data View works very much like Particle View.
For the first part of this exercise, you'll create a simple operator that defines particle speed with three numeric values. The creation and modification of particle properties is done by wiring different suboperators in Data View. In this example you'll use the Scalar suboperator.
By default, the Dynamic Names feature is on, so each new suboperator assumes its most important setting or settings as a name. In this case, it's the Value setting: 1.0. You'll give the Scalar suboperators more meaningful names.
Next you'll define the initial values.
Its parameters appear on the Speed X rollout.
Right-click the Value spinner to set it to 0.0, and then turn on Use As Speed Value. Keep the default Units Per setting: Second.
Next, you'll wire the data created by the Scalar suboperators into a speed data channel for the particles.
The purpose of the Output Standard suboperator is to take data calculated within the Data operator and convert it to information that the Particle Flow system can use. Thus, it has only an input; its output is meaningful only in the context of Particle View. Its default dynamic name is Position Vector because it's set to output position data in vector format.
The suboperator's dynamic name is now Speed Vector.
When you release the mouse button, a Convert suboperator automatically appears between the two suboperators you're linking. This is standard behavior in Data View when you attempt to wire together two connectors of different but compatible data types.
Thanks to dynamic naming and the color coding of the inputs and output, you can see that the new suboperator is automatically set to convert real (scalar) data to a vector value.
That's it! You've created a simple operator.
The particles move upward, in the positive Z direction, as instructed by your custom operator.
In the steps and procedures that follow, you might need to use Update, too.
The particles reflect the speed change.
The particles move horizontally to reflect a change in speed along the Y axis.
Next, you'll make your operator more complex by linking the speed vector to the orientation of the operator icon. This is the small square at the world origin that was created when you added the Data Icon operator.
The icon changes to an arrow, which makes it easy to see its orientation.
You can use the Icon suboperator to request the transformation matrix of the icon.
Click the Icon Pivot suboperator and then, from the Icon Property drop-down list, choose Icon TM. TM stands for transformation matrix.
You'll use the Function suboperator to multiply the speed vector by the icon matrix.
Click the wire between the Convert suboperator (Real --> Vector) and the Output Standard suboperator (Speed Vector) to highlight it and then press Delete to remove it.
Wire the output of the Icon suboperator to the M2 input of the Function suboperator. Note that you're wiring between the same-color connectors.
Now the icon orientation controls the direction of the particles.
As you rotate the icon, the direction of the particle stream changes accordingly.
It's just as easy to use a reference object's orientation to set the particle direction.
The teapot's name appears on the button and on the suboperator node.
This lets you specify which object property to retrieve.
Now, when you rotate the teapot about the X and Y axes, it has the same effect on the particle stream as did rotating the icon.
Once you've created a Data operator, you can save it as a regular Particle Flow operator. First, you expose the most important parameters. In this case, they're the vector components; that is, the Scalar suboperator Value settings, and the button of the Select Object suboperator.
This opens the Expose Parameters dialog, which lets you collect and identify the parameters to be exposed. Basically, you use it to create your operator UI.
The entry in the left-hand list changes to [Value -> X:)], and the new label appears in the right-hand list.
More important, the added parameter appears on a new Parameters rollout in Particle View. This shows the exposed parameters, and is available to anyone who uses your operator.
Do the same for Speed Y Value and Speed Z Value, labeling them Y: and Z:, respectively.
All four parameters now appear on the Parameters rollout.
The next step is to save the Data operator as a preset.
This opens the Save Data Operator Preset dialog.
In the Preset/Operator Name field, enter a name, such as Speed Gen.
To the right of this field, set Save As to Operator/Test.
In the Preset/Operator Description field, enter a description, such as this one: Speed Gen controls particle speed by numeric values..
A message informs you that the preset has been saved.
Now the Depot contains your new operator. The name of the operator in the Depot is followed by an asterisk (*), the default suffix, which denotes it as a custom operator.
The teapot orientation controls the particle stream direction.
The Advanced Data Manipulation tool set for Particle Flow lets you create your own custom Particle Flow tools.