Got this idea from Substance Designer which offers an option to sample a whole palette of colors from a reference image for their gradient node. Now you can do the same for Blender's color ramp node. With a color ramp node selected, just go to the Node menu and select Color Ramp Picker. An eye dropper will appear and you can sample from anywhere within your Blender window by clicking and dragging. Unfortunately it is not possible to sample outside the Blender window so you should have your reference image loaded in BlendeÅ› uv-image editor.
I have also made a small video that illustrates the proces:
Availability
You can download the add-on from GitHub. (click right on the Raw button and save the python file anywhere you like and then in Blender select File->User preference, Add-ons, Install from file... Don't forget to enable the add-on as well after installing it.)
If you would like to write add-ons yourself, you might want to take a look a my books on BlenderMarket.
Alternative
After publication I learned about a similar and much more versatile tool to generate (and sample) gradients. Check this BlenderArtists thread to learn more.
Good job! Nice add-on!
ReplyDeleteGit"H"ub by the way :)
:-) fixed
DeleteReally useful addon!
ReplyDeleteIs there any plans for 2.8 implementation?
Thanks
Any chance to get this addon updated for 2.8? It seems the Github link doesn't work.
ReplyDelete