TG Particles 2

PARAMETERS

The parameters for TG Particles 2 are very similar to those in the original Particles shader, with some extra parameters added for greater control. If you are already familiar with the Particles shader (or with the TG Noise shaders, which use the same “squares” processing), then it shouldn’t take you long to get to grips with TG Particles 2!

The sample images seen here use cylinders, viewed from the front, and rendered in Double Sided mode.

Listing :

  Noise Type
  Noise Scale
  Noise Scale (thousands)
  Octaves
  Squares
  Squares (thousands)
  Threshold
  Max Glow Opacity
  Min Glow Opacity
  Glow Fade Begin
  Glow Fade End
  Particle Fade Begin
  Particle Fade End
  Particle Power
  UV / Object / World
  Glow Fade Direction
  Noise Frequency
  Frame Change
  Reverse Fades

Noise Type

Range : 0, 1, 2

Set the type of noise to be used for the particle effect. 0 is Perlin, 1 is Classic, 2 is Sparse.

Noise Scale and Noise Scale (thousands)

Range : 0 to 999;  0 to 100

Together these 2 parameters control the overall scale of the noise.

The first parameter sets the scale of the noise in the range 0 to 999.

The second parameter adds so many thousands onto the value set in Noise Scale. For example, if Noise Scale is set to 600, and Noise Scale (thousands) set to 3, the final noise scale used will be 3600.

The noise scale is set in this way to allow very high noise scale values, as the higher the noise scale, then the smaller the particles will be. Also, setting extremely high values can give a more random look to the particle effect, and changing the noise scale can also be used as a “seed” to generate a different particle pattern.

The image on the right shows some of the effects of altering the Noise Scale value.

Noise Scale 500; Noise Scale 10

Defaults on the left, with Noise Scale set to 500; on the right, using a Noise Scale of 10.

Octaves

Range : 0 to 10

Set the octaves to use for the noise Higher gives more detail in the noise (but results in slower render times). It is usually not worth setting this value above 4, as little change will be apparent.

Squares and Squares (thousands)

Range : 0 to 999;   0 to 20

Together these set the number of squares to divide the noise into, working in the same way as the 2 Noise Scale parameters.

The higher the number of squares, then the smaller and more numerous the particles will be. Low values, such as 20, or 80, will give very obvious squares, while higher values will turn the particles in to dots as small as individual pixels.

Squares set to 51

Defaults with Squares set to 51, making the squares visible.

This parameter can be adjusted so that the effect works under Raycast, or with anti-aliasing, or with different output image sizes. With Scanline rendering, the individual particles can be clearly visible, whereas when anti-aliased, rendered to a smaller image, or rendered using Raycast, the resulting smoothing of the image can result in the particles becoming less sharply defined (or disappearing altogether!). This is a common problem which you may have encountered when rendering starfields, for example. By making the particles larger (setting the squares parameters to a lower value) or smaller (setting the squares parameters to a higher value), you can control how the particles render under different conditions.

Note that setting both squares parameters to a value of 0 will turn off the squares processing altogether, leaving you with a conventional noise effect (and making the processing slightly faster).

Important Note

If the Noise Scale is wholly divisible by the Squares, then unusual effects occur (often, the particle effect simply disappears). To avoid this, just add 1 to the number of squares for example. This was done in the sample image above, where the Noise Scale is 500, and the Squares was set to 51 (rather than 50).

Threshold

Range : 0 to 1

In order to create the particles, the shader looks to see if the value from the noise function is above a certain value. This value is set using the Threshold parameter. A higher value (closer to 1) will result in fewer particles, while a lower value (closer to 0) will result in more particles.

The image to the right illustrates the results of using a different Threshold value.

Threshold 0; Threshold 0.3

Defaults, with a Threshold of 0 on the left, and Threshold of 0.3 on the right.

Max Glow Opacity and Min Glow Opacity

Range : 0 to 1

These values control the opacity of the smooth glow effect. Max Glow Opacity controls the opacity at the start of the glow, and Min Glow Opacity controls the opacity the the glow fades to (the fade points of the glow are controlled in Glow Fade Begin and Glow Fade End).

Note that it is entirely possible to use a lower value in Max Glow Opacity and a higher value in Min Glow Opacity, to reverse the direction of the fade.

Glow Fade Begin and Glow Fade End

Range : -50 to 50

These values control the positions at which the smooth glow effect begins to fade, and when it reaches its final value.

Glow Fade Begin sets the point along the object (in the direction set by the UV/Object/World parameter in conjunction with the Direction parameter) at which the smooth glow begins to fade. Up until this position, the smooth glow effect will have the opacity value set by Max Glow Opacity.

Varying the Glow Fade Begin and End  parameters

Glow Begin 0.4, Glow End 0.75 on left; Glow Begin 0, Glow End 0.5 on right.

Glow Fade End sets the point along the object at which the smooth glow reaches its final opacity value, as set by Min Glow Opacity. In between Glow Fade Begin and Glow Fade End, the opacity varies smoothly between the 2 Glow Opacity values.

Note that the Glow opacity takes precedence over the particle effect, so you may need to adjust the Particle Fade Begin and End parameters too (see image on the left to see how the particle effect is “swallowed up” by the smooth glow).

It is possible to reverse the direction of the glow effect by setting the first part of the Reverse Fades parameter to greater than 0.

Particle Fade Begin and Particle Fade End

Range : -50 to 50

These values control the positions at which the particle effect begins to fade, and when it reaches its final value. These work in much the same way as the Glow Fade Begin and Glow Fade End parameters.

Note that the particles are faded by altering the Threshold value, and they always fade to a Threshold of 1 (no particles). This is done so that the particles not only get less frequent as they fade out, but the same particle will “shrink” as it moves along the direction of the particle fade. This gives quite a convincing effect, similar to a particle cooling down as it gets further from a flame for example.

It is possible to reverse the direction of the particle fade by setting the second part of the Reverse Fades parameter to greater than 0.

A Note About Fade Points

The “meaning” of the glow and particle fade points will change depending on whether you are using UV or Object / World co-ordinates, so you will have to adjust the values according to which you are using. Also, if you are using Object co-ordinates, then the values may need to be adjusted if you stretch or scale the object in particular directions (this is because the range of values covered by the Object Co-ordinates can vary - by default on a standard primitive, they range from -1 to 1, but when stretched this range can increase).

Particle Power

Range : -10 to 10

This parameter lets you increase the opacity of the particles - higher values (above 1) make the particles less transparent, resulting in particles which are more solid, larger, and tend to overlap more. Values of less than 1 make the particles more transparent.

Although raising the Particle Power is similar to lowering the Threshold value, the effects of raising the Particle Power can be more pronounced. The image on the right illustrates the effect of changing the Particle Power (compare this with the changes in the Threshold value).

Particle Power 0.6; Particle Power 2

Particle Power of 0.6 on the left, and Particle Power of 2 on the right.

UV/Object/World

Range : 0, 1, 2

This parameter sets the type of co-ordinates used to generate the noise, and also affects the meaning of the Direction parameter. 0 sets the shader to use UV space (you may get a visible seam, particularly with lower Noise Scale settings), 1 sets the shader to use Object Co-ordinates, and 2 sets the shader to use World Co-ordinates.

Note that for both Object and World co-ordinates, the glow and particle fade effects still happen along the Object space. However, with World co-ordinates the noise (and so the particle) effects will be calculated using the World space, which means the particles will alter if the object itself was animated to move through the scene - this can be used to give a trail of particles being deposited behind a moving object, without the use of the Frame Change parameter.

Glow Fade Direction

Range : 0, 1, 2

You can control the direction that the fade effects happen in using this parameter.

If set to 0, then the glow and particle fades will occur across the U direction (if UV space is used), or along the x axis (if Object or World space is used).

Varying the Glow Direction parameter

Using Object Co-ords, Glow Direction of 0 (x axis), 1 (y axis) and 2 (z axis).

If set to 1, then the glow and particle fades will occur across the V direction (if UV space is used), or along the y axis (if Object or World space is used).

If set to 2, then the glow and particle fades will occur along the z axis (this overrides the UV setting, and ALWAYS does the fade based on the z axis).

Noise Frequency

Range : RGB Values (-10 to 10)

This lets you scale the noise used to create the particle effect independently in the X, Y and Z directions. It works in conjunction with the Noise Scale and Noise Scale (thousands) parameter. This allows you to stretch or squash the noise in a chosen direction, particularly effective for stretching out the particles in the direction of movement (as set in the Frame Change parameter) to give a “smearing” effect.

Varying the noise in particular directions

Some of the effects of stretching the noise in particular directions.

Frame Change

Range : RGB Values (-10 to 10)

This parameter controls the animation of the particle effect, setting the amount of shift in each direction that occurs for each frame of the animation. Normally, this would be set to move the particles in the same direction as the fade effects (as set using the Direction parameter).

If using UV space, then the first part of this parameter sets the change per frame in U, and the second part sets the change per frame in V.

If using Object Co-ordinates, then the three parts of this parameter set the change per frame in the X, Y and Z directions in Object space.

If using World Co-ordinates, then the three parts of this parameter set the change per frame in the X, Y and Z directions in World space.

Reverse Fades

Range : RGB Values (however, only 0 or greater than 0 has any meaning).

This parameter lets you reverse the directions of the fades. The first part of this parameter reverses the glow fade effect, and the second part of this parameter reverses the particle fade effect (the third part of this parameter has no effect).

A value of 0 will result in ordinary fades, and a value of greater than 0 (it is suggested you use a value of 1,  for clarity) will result in the fade still running along U or V, or x, y or z, but in the opposite direction.

Note that when the fades are reversed, the Begin and End fade points will reverse their roles - the opacity will remain at the Max opacity down to the End Fade value, then it will begin to fade, reaching Min opacity at the Begin Fade value.

Note that you can reverse the glow and particle effects independently. Also note that reversing the direction of the fade does not affect the direction of movement, which is controlled separately by the Frame Change parameter.

TG Particles2 Intro

TG Particles2 Parameters

TG Particles2 Tips

TG Particles2 FAQ

TG Particles2 Samples

TG Pack Index