Grasshopper

algorithmic modeling for Rhino

Using Image Sampler to sort geometry using colour values - unresolved

Essentially I want to communicate the colour of a source image in three dimensions. This partially inspired by Munsell's colour theory, and by the use of voxels (3 dimensional pixels) to output to 3D printers.

How I want to communicate this: The depth of transparent cubes is relative to the brightness of a picture (low depth = bright, high depth = dark). Then I assign each cube as red or blue depending on the RGB values of the cube column's corresponding pixel - this is where I'm stuck.

What I've done: I have one image sampler containing a greyscale version of my image which is outputting the brightness measurements. This made into lines, which are divided to create the points from which the cubes are created. (I have had to invert the image in photoshop as brightness gives black a low value when I need a high one, and vice versa)

What I want to do next: In the second image sampler I have an image which has a Red to Blue gradient applied to it. I want to group my cubes into reds and blues depending on the colour values in this image (so they could eventually be saved as a "blue" and "red" stl to be 3D printed).

So columns that correspond to a blue part of the image will contain a completely blue stack of cubes, and the same with red. But where there's a combination of blue and red values I need a combination of blue and red cubes mixed together. I was hoping to do this by turning the RGB values into some kind of ratio that will help assign each cube a group but I'm struggling.

Would love any thoughts on resolving my problem, even if it's only for part of it! This was quite hard to explain so let me know if there's anything that needs clarifying.

Thanks

Views: 2926

Attachments:

Replies to This Discussion

Hi.

Something Like this?

Attachments:

Yes but not quite!

The areas which are purple would ideally be made of stacks of blue and red to give the appearance of purple when viewed from the top (assuming the cubes are transparent).

I guess it's similar to dithering but in 3 dimensions, like this:

The patterning/dithering of the red and blue cubes could be random or formulaic, I don't mind. As long as it gives the appearance of a colour blend when viewed from the top.

I guess this is another way of approaching it but it's probably no closer to a solution:

Only problem is, the brightness values aren't expressed here so I think the density/height of each column is pretty uniform. So some columns would have to be shortened depending on brightness.

The stacking would have to be rearranged so one side of the surface is flat like the original file. And then the red and blue cubes would have to be randomly arranged within each column to get the colour blend/dithering correct.

I feel like this would involve sorting and domains or something, which I'm pretty inexperienced with unfortunately.

If it helps, I'd ideally 3D print this with a colour multimaterial printer, so I'd need to group the cubes based on colour so I can export an stl for each colour group.

Attachments:

I don't understand what are you try to do, anyway check this as well.

Attachments:

That's alright, thank you very much for your help!

RSS

About

Translate

Search

Videos

  • Add Videos
  • View All

© 2024   Created by Scott Davidson.   Powered by

Badges  |  Report an Issue  |  Terms of Service