Gradient Sampler

Gradient Sampler

After watching a workshop video of Substance Designer, I was impressed by the way, they allow editing gradients. Especially the gradient sampler, that allows stroking over a reference image, was inspiring. Shortly after I finished watching the video, this add-on for Blender was born.

Download the add-on directly from GitHub: https://github.com/FrankFirsching/gradient_sampler

Blender minimal tested version: 2.83

Usage

The add-on creates a new context menu entry, when a color ramp node is selected in the shader editor. After activating it, the mouse turns into an eyedropper and you should stroke over an area, that shows the intended gradient from a reference image (e.g. in the image viewer of blender)

Advanced usage

The add-on also supports sampling gradients from other applications (e.g. PureRef). Since blender doesn’t capture the mouse completely in case no button is pressed, the add-on supports a two button press workflow. You press the right mouse button within blender, then draw over to the external application. Afterwards stroke over the reference gradient having both the right and left mouse button pressed. The add-on takes care to take the shorter sampled gradient.

Limitations

Blender only supports up to 32 entries within a gradient. In case the referenced gradient is longer, the add-on will resample the gradient down to this maximum number of entries. This can lead to inaccuracies.

3rd party software

The add-on uses the MSS screenshot library of Mickaël Schoentgen under a MIT license.

7 Likes

GitHub repository was updated with a new feature. The stroke being drawn is not point-sampled anymore, but the whole line is sampled. That way fine details will not be lost and strokes can also be drawn fast.
Next feature to implement will be to support specific interpolation modes. Currently the add-on assumes a linear interpolation mode.

2 Likes