Trouble translating colors from Image to Hexagrid

Hi guys,

I ran into some problems trying to color my hex meshes with image sampler, as the image proportions seem to get distorted. I tried using various bounding boxes into the image sampler domain with no luck.My image is a square but I can edit it to be whatever I need to be really, I just thought making it a square would make things easier… which might no be the case so far.

The correct image being the one on the left, and the result on the right.

image here:

Def here:
image colors to hexgrid_v01.gh (769.5 KB)

use the correct domain

Hello
you still make newbie error, if you input bad coordinate in image sampler you can’t have a precise mapping

Here I use a 0 to 1 mapping.

You can check the position using that import image


image colors to hexgrid_v01_LD.gh (773.1 KB)

Thanks guys, image sample has always been rather cryptic to me, didn’t realize the domains ends were actual coordinates on the Rhino workspace!

Thanks @laurent_delrieu for the 0 to 1 mapping method, its nice to avoid editing the domain of the image sampler all the time!