The graph WkGradientDrawer is a specialized version of WkFunctionDrawer. It is dedicated to the visualization of curves resulting from the standard Gradient nodes. Because the manipulated data are not the same (maths functions for WkFunctionDrawer, images for WkGradientDrawer) the use of WkGradientDrawer is a bit different: its graph can be dropped directly inside an image graph and there is no need to edit its Pixel Processor node as for WkFunctionDrawer. It is still possible to edit is though, if you want to compare a Gradient curve and a maths function in the same graph.

The manipulation of the graph range and the chose of the curves to display is then done from the Attributes Panel itself.

**Note:** WkGradientFunction is just a visualizer. It will not help you to connect the curves resulting from the Gradient node interpretation to be used in a graph. For that you need the Gradient Curve tools.

## Features

- Displays up to 3 Gradient curves
- User-defined graphic range on X and Y axis in the Attributes Panel
- Changes on the Gradient nodes are visible in real-time in the 2D-Viewer

## Visualizing Gradient curves

Pick the node WkGradientDrawer in the Library Panel and drop it into your material graph.

Right-clic on this new node and choose *View Output in 2D-View* to visualize its content.

**The various UI elements of WkGradientFunction:**

**To display a Gradient curve:** Connect a properly configured Gradient node to one of the 3 connections of the WkGradientDrawer node instance. The curve will be displayed immediatly.

**To change the display range of the functions:** Set the range of each axis in the Attributes Panel of the WkGradientDrawer node instance, in the section Graph Range.

**Setting up a Gradient node to use it as a curve:**

## Gradient Curve tools to get the curve values

The package also contains a tool to make the use of Gradient Curves easier in Pixel Processor nodes: WkRemapGradientCurve.

This function graph has to be called in a Pixel Processor node on which a Gradient node is connected. It will sample the input with the specified index and, for a give abscissa value it will return the corresponding ordinate value.

**Getting the curve values in a Pixel Processor node:**

**And the result is...**

**A bouncing ball!**

Open the Samples graph provided in the package and see how Gradient curves are used to animate a pattern.

Watch **this video** to learn more!