Image Sampler works as pattern, how to spread the image over 1 surface?

Hello everyone,

For an architecture project I am making a script for rotating bricks according to de brightness of a certain image. I made the script in a way that the input is a surface of random dimensions, from which a new surface with correct dimensions is created to fit the standard dimensions of the brick.

I’m satisfied with the angle translation I got out of the image sampler/remap functions. But i’m doing something wrong with the domain of the image sampler. What I would like to achieve is that the image is spread out 1 on 1 on the surface, instead, it repeats the image multiple times, if I make the surface larger, the image doesn’t scale with it. How can I achieve that the image is just used once?

I made a sketch:

250627 - GH McNeelforum.gh (180.7 KB)

250627 - GH McNeelforum_1.gh (187.6 KB)


By default the image sampler has a U and V domain from 0 to 1, so you have to reparametrize your surface for it to match the u and v on the image sampler

You are completely right. I knew it had to be something simple. Thank you very much. Another question, do you know why the image is mirrored in my output?

U and V also have a direction, so maybe try flipping the surface