Hello,
I’m trying to get a color from a surface at a specific point as the image shown.
But when I use GetColorAtParameter, it asks for colorRange, which confuses me, because when I apply the picture onto the surface, i get a GeometryColor.
Is there a sample that shows that?
Thanks
As you observe GetColorByParameter is an action on a ColorRange rather than GeometryColor. If you have used Image.Pixel to turn an image into colours to apply to a surface, then you can query the colours directly by using the UV parameters of the point from the surface to find the nearest pixel and get its colour:
42397.dyn (62.8 KB)
Hope this helps,
Thomas
1 Like
I’m trying to use this script, but it doesn’t seem to be working with multiple points.
If i have a grid of points and would like to know every single point color I get all black.
Can’t understand why. It works fine with single points.
On the other hand, is it possible to map a picture on a surface and get the color without specific libraries?
Revised graph attached which can accept multiple queries using a small amount of Python (which could be done with normal nodes but it’s just a bit more concise this way)
42397-multiple.dyn (71.3 KB)
I don’t quite understand your last question? There are no specific libraries used here.
1 Like
Thanks.
Sorry for strange questions, but I am quite a noob right now.
I was doing something like that python script in codeblock, but didn’t work.
Changing from x*u to (x-1)*u fixed it. I need to understand why now
You answered my last question with that loop script. I was using Pattern toolkit for achieving the same result, but it doesn’t let me use my grid of points. So I was trying to create my own script to achieve that without using packages (sorry I wrote libraries).
Thanks a lot.
1 Like
this really bugs me too - I think it would be useful to be able to query the Display object for colors.
this would be the class I think that the functionality could be added to.
1 Like