I post it here because it could be an interesting idea for a Python tutorial. And I'd love to see more python tutorials. (-:
SD has a very handy gradient node that lets you to mouse over an external image (being it open on the desktop or on a webpage) to sample its color over time while you drag the cursor over it. It then loads those colors in a gradient ramp.
My level of Python is pretty basic, and this project might be too difficult for me, but why not try anyway?
Could you point me in the right direction, please?
I don't really know how to start.
1) What should I study to implement it?
2) What would be the ideal roadmap/structure for this implementation?
thanks a lot for any input.
[python] Color gradient sampling from images like in Substance Designer?
2584 2 1- Andr
- Member
- 900 posts
- Joined: Feb. 2016
- Offline
- goldfarb
- Staff
- 3455 posts
- Joined: July 2005
- Offline
you could look at openCV's ‘lineiterator’
https://docs.opencv.org/2.4/modules/core/doc/drawing_functions.html#lineiterator [docs.opencv.org]
https://stackoverflow.com/questions/32328179/opencv-3-0-python-lineiterator [stackoverflow.com]
https://docs.opencv.org/2.4/modules/core/doc/drawing_functions.html#lineiterator [docs.opencv.org]
https://stackoverflow.com/questions/32328179/opencv-3-0-python-lineiterator [stackoverflow.com]
- Andr
- Member
- 900 posts
- Joined: Feb. 2016
- Offline
-
- Quick Links