Third Party Fuses/SparseColor Description

From VFXPedia

< Third Party Fuses
Revision as of 19:43, 9 March 2013 by Tilt (Talk | contribs)
(diff) ← Older revision | Current revision (diff) | Newer revision → (diff)
Jump to: navigation, search
SparseColor Description

[ Main Manual Page ]


SparseColor_v1_0 Download

A Fuse to draw gradients in a variety of ways. It can extrapolate a ramp between two or three colors, serve as a four-corner gradient with movable corners and fill the image using inverse distance or Voronoi weighting (based on a feature in ImageMagick). It is fully OpenCL-accelerated and supports DoD. For inverse distance and Voronoi, multiple SparseColor tools can be chained to define more than 4 color spots. The necessary information is passed between tools via image metadata.

Image:Tilepic_SparseColor.png

This tool can serve several purposes. You can use it as an extrapolated 2, 3 or 4-corner gradient. I wrote the fuse to see if this feature would have helped me in a matte painting situation I had to solve last year. I had to remove something on a street with cars passing by which changed the brightness of the asphalt in unpredictable ways. I was looking for a procedural solution that would at least get me 90% of the way. You can use the probe modifier to sample the original footage and create a gradient directly or with the use of expressions create relative multiplication factors for a still frame matte painting.

Image:SparseColor_Screenshot.jpg




Main Inputs

The following inputs appear on the tool's tile in the Flow Editor:

Input Image:Node_Input_Gold.gif
Source image. Required.
Effect Mask Image:Node_Input_Lavender.gif‎
Defines the areas where the effect is applied. Optional.





Controls Tab



Number of Points

Slider control. Defines the number of color swatches (seed points) this tool provides. If you need more than 4 colors, use chained tools (see metadata description below). If this is set to 1, the whole image will be filled by a solid color.

Gradient Interpolation

Multibutton. Defines the type of gradient produced.

Linear
creates a linear interpolation between 2, 3 (barycentric) and 4 (cornerpin-like) gradient.
Inverse Distance
each pixel's color is a weighted average defined by it's distance from all the "seed points".
Vornoi
each pixel receives the color of the closest seed point. This will result in flat areas of color with sharp transitions between them.
Extrapolate Gradient

Checkbox control. The colors will be extrapolated beyond their defined locations (linear interpolation only).

Distance Map

Checkbox control. Each pixel's distance from the closest seed point will be written to the alpha channel (Voronoi only). This can be used to generate a plasma-like pattern.

Strength

Slider control. Defines the strength factor for inverse distance weighting. A value of 2 corresponds to the so-called "Shepard's method". A value of 1 will create sharp points of color with a quick falloff. If this slider is below 1, the whole image tends towards an average color of all seed points.

Clipping Mode

Multibutton control. By default, this tool will fill the whole frame. You can also select "Domain" to make it fill the input's DoD only or "None" to make the gradient extend beyond the image borders.

Store Metadata for Downstream Tool

Checkbox control. Write a "SparseColor" table to the image's metadata which contains position and RGBA values of each color swatch.

Use Metadata to Combine Gradients

Checkbox control. In addition to the colors defined by this tool, values from previous tools will be included in the gradient (if appropriate metadata is present)

Use OpenCL

Checkbox control. Uses your GPU to draw the image, which results in real-time performance compared to the CPU algorithm.

Internal Proxy

Multibutton control. In CPU mode, the tool's speed can be increased by drawing a smaller version internally that is subsequently scaled up to the final size. This often results in no visible loss of quality and is independent of Fusion's own proxy/auto proxy setting.



Download SparseColor_v1_0

Development History and Discussion on PigsFly



--Tilt