|
|
fig 1. A Normal Field supplying normal information to a Shading Field through a normalPP attribute on the particles. | fig 2. Two Normal Fields attracting particles through an expression, while a Vortex Field rotates the particles. |
A normal field calculates a vector from the particle to the closest point on a curve and assigns the value to the specified attribute of the particle.
You must specify a vector array attribute on the particle shape to assign the value of the field to.
You can use any name for the attribute, as long as it is a vector array.
To create a Normal Field through the GUI, select at least one NURBS curve and then the menu item Fields -> Normal . This will create a Normal Field with the settings found in the Fields -> Normal -> Option Box window.
The following behaviors for field creation also apply :
For each NURBS curve in the selection, a Normal Field will be created.
If you have one or more particle objects selected when creating the field/s, each particle object will connect to each new Normal Field automatically.
* The order in which you select NURBS curves and particles is not important.
Magnitude
You can use a custom float array attribute from your particle object as the magnitude value, thereby overriding the standard magnitude value of the field. This enables you to have per particle control of the magnitude of the field.
Enter the name of the attribute from your particle object that you want to use to control the magnitude.
*If the attribute does not exist, the field will not evaluate.
* If the magnitudePP of a particle is 0, it will not be evaluated and will keep its current value when the field is evaluated. This is useful for disabling the field's effect on an individual particle.
*The value of the magnitude is clamped internally to a range of 0 - 1.
Out Normal
Enter the name of the vector array attribute that you want the resulting normal information to be sent to on your particle object.
* If the field does not evaluate, your particles will simply retain their current values.
2. When using the normal field data as part of an expression, remember to set the "Expressions After Dynamics" flag on your particles to True. Otherwise, your expression will evaluate itself with data from the previous evaluation of the field.
Lighting Calculations
By assigning particles a normal, you can more easily create expressions to simulate lighting effects.
Motion Direction and Orientation
You can use the vector information from the normal field to :
In Conjunction with the Shading Field
By assigning the normal information of the field to a custom attribute called "normalPP" the Shading Field will automatically use the new normal data in its evaluation of a shader.