Applying and baking color in grasshopper

hi, everyone
I am wondering if there is any way to assign a bitmap texture in grasshopper to a desired mesh and then analyze this texture to find the average color of any of the mesh surfaces and assign it to that surface.

somehow I’m trying to achieve effects like the attached photo with a specific bitmap not just by gradients and in 3d

for example, something like this with any bitmap as material:

and if it’s not possible to find the average color maybe assigning the color of one vertex of the face to the whole face would do so.

ty all for your help:pray:

You can specify vertex colors when constructing a mesh with Construct Mehs component.

Weaverbird has a blur mesh component and you can use EleFront to bake a mesh.


You can use Image Sampler to insert a bitmap in Grasshopper. Use its settings to define a domain, then if you provide a point as an input, it will return the color at those coordinates. You can use these colors in Construct Mesh, or Mesh Colors, or Mesh Spray.
If you need a single color for each mesh face, use the center of the face as a reference.

1 Like

thanks for your reply,
but I don’t get it clearly, how do I assign a bitmap material in grasshopper and then analyze that material in the vertex to find the color of the vertex, to then assign it to construct a mesh component for the whole face?

thanks for your reply,
yes, I used an image sampler a lot, but it works for a single plane. my question is how I do that for a box for example.

I could see this working for a single suface, because you can map the UV coordinates to a rectangle that is your image and get the colors from there.
I don’t know if there is a generic solution for Breps or Meshes, especially in 3D, and I assume not unrollable.

1 Like