Viz Plug-ins User Guide

Version 5.1 | Published December 12, 2023 ©

pxGradient

images/download/thumbnails/62194598/ico_pxgradient.png
The pxGradient plug-in has a similar functionality to the gradient function in Photoshop. It can be applied on a container that holds a geometry, an image, or even an empty container. You can define as many gradient stops as you wish, as well as their origin points, angles, and extent. You can also define the gradient on the alpha channel (256 levels) and introduce turbulence noise that complies with the defined gradient.

Note: This plug-in is located in: Plugins -> Shader -> PixelFX

At the top of the plug-in parameters, you see the controls that let you define the direction, radius and origin of the gradient. Below that you see a two radio button sets. The first lets you set the gradient type, followed by three Repeat types

Below that, you see the color slider, the color values and alpha ramp settings.

Note: Under the title Color Ramp and Alpha Ramp, you have an active/inactive option, should you want to have an RGB ramp and no alpha ramp, or vice versa.

Below the RGB and Alpha area of the editor, you find the option of adding Turbulence to the gradient. The turbulence has three simple parameters. Amount determines how aggressive the turbulence looks. Wavelength determines how big or small the turbulence increments are. Progress (similar to that in TextFX plug-ins) allows you to breathe life into the turbulence, providing interesting an effect when animated.

At the very bottom, it is important to make sure that you turn off the Show GUI button, whose default is On; if shown On Air, the effect is more embarrassing than dramatic.

Best Practices

It is important to understand that the Gradient plug-in is actually drawing pixels. Therefore if this plug-in is applied to an empty group or if it is applied to a geometry object that does not contain a texture, the gradient plug-in generates the texture into which it draws its pixels. So if you have a cube and add the Gradient to it, it behaves exactly as a texture. However it can also work in conjunction with a texture. If you then take an image and drop it on the cube, you give a color wash to the image that works in a gradient-like fashion. The gradient-generated texture can also be edited via the texture editor as any other texture would be.

The biggest benefit of using the Gradient is conservation of texture memory. Instead of storing very many different alpha and color ramps in your image pool, you can simply achieve the overwhelming majority of these effects by well thought out and judicious use of the Gradient plug-in. It has a minimum performance penalty and it can be animated. If you use ramps often in your designs, the Gradient is one of your handiest tools.

Tips and Tricks

Often you put reflection maps on a translucent geometry to create a glass-like reflection (think of a light box or an aquarium). For the reflection texture, one often uses an image of static noise or ramps of sorts. Since the texture is mapped on the object using a reflection mapping mode, it is very difficult to create the right intensity of noise in your texture so that the resulting reflection looks good. The Gradient turbulence functionality allows you to set the intensity of the noise of the texture “on the fly”, minimizing the round-trips to Photoshop.