![]() ![]() |
|
You can modify any of the following parameters programmatically (listed in alphabetic order):
| Parameter | Default Value | Description |
|---|---|---|
| active | true |
Boolean flag saying whether generator is active. Set this to true or false to start or stop the generator. |
| angle | 270 |
Base direction (angle) to release particles. For example, 270 is straight up, 90 is straight down. |
| bright | 100 |
Brightness of the particle (0-255). |
| brightChangeStart | 15 |
How many steps before the end of the lifetime that the particle starts changing brightness. This feature is designed to allow one to lighten or darken the particles as they reach the end of their lives. |
| endFadeoutOpacity | 0 |
Opacity value for particle when it reaches the end of its fadeout period. The generator fades the particle out from fadeoutStart to the end of its lifetime using the difference of the particle opacity value and endFadeoutOpacity. For example, if opacity is 100 and endFadeoutOpacity is 0, the particle fades from completely opaque to completely transparent starting at fadeoutStart and ending at the particle's lifetime. |
| fadeinDone | 10 |
When (in terms of lifetime) the fadein is done. |
| fadeinOpacity | 0 |
Starting opacity value for fadein. Particle will fade in from this value to the particle opacity value over fadeinDone updates (modulated by fadeinVariance). |
| fadeinVariance | 0 |
How much variance (in terms of lifetime) to complete fade in of particle. |
| fadeoutStart | 45 |
When (in terms of lifetime) to start fading the particle out (lifetime minus this number). |
| fadeoutVariance | 5 |
How much variance (in terms of lifetime) to start applying fade out. The fadeout point is determined from the base fadeoutStart plus half of this value. |
| friction | 0 |
Percentage of speed (100 == 100%) to slow down particle after specified time (frictionStart) |
| frictionStart | 0 |
When (in terms of lifetime) to start friction. Use -1 for no friction. |
| gravity | 0 |
Amount of gravity to apply to each particle per update. One can simulate friction using this parameter by applying a small amount and shooting the particles mostly in the vertical direction). |
| heightScale | 120 |
Height to scale the base particle. |
| initAcc | 25 |
Number of steps (0 to lifetime) it takes to go from 0 velocity to the set velocity. By setting this to a non-zero value, it lets you accelerate to the set velocity. |
| lifetime | 80 |
Number of updates for each particle (the particle's "lifetime"). The generator removes the particle once it reaches the end of its lifetime. |
| lifetimeVariance | 10 |
Produces randomness in how long a particle is displayed. Each particle's lifetime is set to the base lifetime plus or minus half of this value. |
| opacity | 85 |
How opaque the particle is, 0 (invisible) to 100 (completely opaque). Referred to as density in the interface. |
| orient2spread | true |
Rotate the particle in the direction it is being released (release angle plus spread). This parameter is not accessible through the user interface--if you want to turn it off, you have to set it programmatically. |
| particleID | 4 |
Linkage ID for the particles generated. |
| partPerFrame | 0.175 |
Number of particles to release per frame of animation, for example, 0.5 means release 1 particle every other frame. |
| partScale | 120 |
Size to scale (percentage) the base particle at the beginning. Size sets the widthScale and heightScale to the same value. |
| preCompute | 80 |
Number of computations to apply before first update. |
| randomXVariance | 0 |
A random value used as starting x value for the particle. Starting x value is chosen between negative half this value and positive half this value. |
| redrawInterval | 40 |
How often (in milliseconds) to update the visuals. A higher number will produce a smoother result, but involve more computation. This is respected if updateOnFrame is false. |
| scaling | 2.9 |
What factor to use in scaling the particle per update, beyond the scalingStart moment. |
| scalingStart | 18 |
When (in terms of lifetime) to start scaling the particle. |
| scalingVariance | 3 |
How much to vary the scaling factor. A particle's scaling is determined by the scaling factor plus half of this value. Determined on a per particle basis, not per particle update. |
| sizing | 100 |
Overall size of the plume (100 means full size; lower number is smaller plume, higher is bigger plume) |
| spread | 20 |
Spread of dispersion to release particles. For example, 20 means release particles randomly within +/- 10 degrees of the release angle. |
| startX | 0 |
Horizontal (x) starting position of the particle stream. This is a program-only property that you can use to move the base of the plume over time, for example, to simulate a moving vehicle’s exhaust |
| startY | 0 |
Vertical (y) starting position of the particle stream. |
| targetBright | 100 |
0-255. Setting this value makes a particle start changing from the current brightness to this value, beginning at the brightChange update and beyond. The system computes the brightness steps needed to achieve this. |
| tintBlue | 50 |
Amount of blueness to apply, if tinted is true. |
| tinted | false |
Boolean flag saying whether or not to tint the particles. |
| tintGreen | 50 |
Amount of greenness to apply, if tinted is true. |
| tintRed | 50 |
Amount of redness to apply, if tinted is true. |
| turbIncr | 0 |
Simulates turbulence by assigning a rotation (per update) for the particles. How much to rotate each particle per update. |
| turbIncrVariance | 0.87 |
How much to vary the rotation increment, namely the turbIncr parameter plus or minus half of this value. |
| updateOnFrame | true |
Determines whether updates and redraw happens each frame (default) or whether the redraws happen at the redraw interval (used to tune performance). |
| velocity | 4.5 |
Velocity of particle, in pixels/update. |
| velocityVariance | 1 |
Produces randomness in how fast each particle is traveling. Each particle's velocity is set to the base velocity plus or minus half of this value. |
| widthScale | 120 |
Width to scale the base particle. |
| wind | 0 |
Wind direction and strength. A number that is the x-offset to add for each update. |
| windAcceleration | 5 |
How quickly the wind accelerates to reach its set strength (wind). |
| windStart | 30 |
When (in terms of lifetime) to start applying the wind value. |
| windStartVariance | 0 |
Variation on when to start the wind. |
| zOrder | true |
If true, the system places new particles in front of the old particles, giving the appearance of the smoke drifting away from the screen. If false, it places new particles behind old particles, to give the appearance of the smoke coming toward the viewer. |
CS Effects exposes the following methods:
| Method | Description |
|---|---|
| fastForward(steps) | Update the particle stream by steps updates. |
| getParametersString | Retrieves the effect code from the CS Effects instance. |
| resetStream() | Clear all particles and re-start generator (if already started, otherwise, leave it stopped but cleared) |
| setParametersByString | Sets the instance effect to the effect code passed in. The effect code is produced in the CS Effects user interface, with the first and last elements removed. |
| startStream() | Start the particle generator. |
| stopStream() | Stop the particle generator. |
![]() ![]() |
|