Overview


Discharge Modifiers allow you to tweak parameters of the source such as the general discharge strength or the amount of emitter Smoke, Fuel, etc. These parameters can be altered based on properties of the emitter geometry that vary for each voxel on the surface or in the volume. For example, alterations can be based on the direction of the normals, the velocity of each emitter voxel, the position in world or grid space, etc. A discharge modifier can also add random variation to the affected parameter across the surface or throughout the volume of the emitter object.

Many Discharge Modifiers can be added to a parameter at once, in which case their effect is multiplied.

UI Path: ||Select PhoenixFDSource|| > Attribute Editor > Discharge Modifiers rollout


Parameters


A list of modifiers modulate the emission using properties of the emission geometry at the point of interaction with the simulator. A ramp control is used to remap from the value of the specified property (i.e. Speed) to a multiplier ranging from 0.0 to 1.0.



Source | modifiers[0].source – This is the property of the emitter that will be used to modify the Source's parameter selected in the Discharge Modifier's Affect option. The value of each parameter is mapped to the horizontal X-axis of the ramp. Along the Y-axis is the strength of the discharge. Each entry from the list below has a certain range that you should watch out for, e.g. some values range from -1 to +1 along X, while others range from 0 to a few hundred.  You can find out more information about the usual ranges of Phoenix channels on the Grid Channel Ranges and the Particle Channel Ranges pages:

Affect | modifiers[0].affect – Specifies which emission property of the Source will be modified by this Discharge Modifier:

Space | modifiers[0].space – The coordinate system of the Source option:

The Up axis of the simulator grid is Z as opposed to the default Maya Up axis which is Y. Therefore, the Up axis for Position/Normal/Velocity is Z when the Space is set to Grid.

Multiplier | modifiers[0].rampMaxValue – A multiplier for the ramp values. This allows the Discharge Modifier to produce stronger or weaker effect.

Offset | modifiers[0].rampOffset – The ramp start value, corresponding to the minimal value of the Source property. E.g. if Source is set to Speed, this should be the minimal value of the Speed of the emitter - usually 0. If Source is set to Normal, this should be at least -1 because this is the smallest value a Normal can take. If Source is set to Position, then this would be the minimal position value that matters for the discharge modifier.

Scale | modifiers[0].rampScale – The ramp range, corresponding to the data span of the Source property. E.g. if Source is set to Speed, this should be the range of the emitter speed - which can go up to several hundred. If Source is set to Normal, this should be at most 2 because the normals range from -1 to 1 and this interval is 2 units wide. If Source is set to Position, then this would be the maximum minus the minimal position value that matters for the discharge modifier.

Diagram | modifiers[0].rampAlpha – The ramp diagram for mapping the source value of the emitter to a multiplier.


Example: Diagram Usage


In the following setup, the Smoke value is modified by the position of each voxel along the X-axis in Gird coordinates. Note that in Grid Space, the coordinates will be normalized between 0 and 1, so no matter what the size of the simulator is, the diagram will rescale its function over the length of the simulator box. Along the vertical Y axis of the diagram is the effect of the discharge modifier, in this case - the amount of smoke.

Note that if you are simulating using Adaptive Grid and you want a discharge modifier by position to apply its effect always in the same position regardless of how the grid resizes, then you should change the Space to World and adjust the horizontal scale and position of the diagram so that it maps to the actual world coordinates.







Another example is the following setup where the normals of the geometry are used to emit smoke. In this case, the normals are used in Object Space, so even if the object starts rotating, it would emit from the same areas. Note that the valid values for normals range from -1 to 1, instead of just 0 to 1. This way the negative values denote normals which point along the negative axis (in this case, to the left of the sphere), while the positive point along the axis direction from the object's transform (in this case, to the right of the sphere). In this example, the normal along the positive axis allows Smoke emission only when the normal's length along the object Y axis is between about 0.6 and 0.7, which means only from such normals which are at an angle and are neither horizontal nor vertical:







The following setup shows an accelerating ball which begins to emit smoke when it starts moving and emits denser smoke the faster it moves. The discharge modifier is set to the Smoke channel and the emission is set to Surface Force. This way the Surface Force will emit velocity out of the sphere during the entire sequence, but the smoke will get denser the faster the geometry moves and in the end when the geometry stops again, the emitted smoke density will go back to 0. You can check the range of the velocity value in the Simulation rollout's Cache File Content box - in this case the discharge modifier reaches the densest smoke emission when the speed goes above 150 and the emission starts when the speed goes above 10, so that a static object would not emit. These value are laid out on the horizontal axis, while the smoke density is mapped to the vertical axis of the Modifier Curve. Also note that the example uses Speed in Grid Space, but if you have a simulator connected to the geometry and moving, then it would be better to use World Space.


<iframe width="720" height="405" src="https://www.youtube.com/embed/RTZEQdLxwFs?version=3&loop=1&playlist=RTZEQdLxwFs" frameborder="0" allowfullscreen></iframe>