Paste image onto parametrized surface

I have a parametrized surface on which I’m hoping to paste an image using the Image Sampler and Surface Closest Point components. I believe I’m running into difficulty with Srf CP as the output from uvP seems all over the place. My preview in Rhino doesn’t resemble the input image at all, which I think is happening due to the uvP output being at odds with my image X and Y domains. However, my image domains match the domains of my surface.

I had this exact code running on a machine from a year ago, but I just can’t seem to recreate the results on this new machine, leading me to believe this should have a simple fix? Thanks for all the help! (59.4 KB)

Image to be pasted

You must use UV size that is included in UV size of image sampler.
Image sampler was [-1, 1][-1, 1]
Surface [0 18][0 18] but depends on the number of points you choose
So the best is to remap values to [0 1] (classical)

I don’t understand why you use triremesh for the mesh. But in order to have a better looking you need a low “length”. (60.8 KB)

1 Like

Hi Laurent,

Thank you very much for solving my problem. Could you elaborate a bit on where the [0 18] domain came from? What would you recommend instead of using TriRemesh?

Ideally I would have the program set up so that I only change a single input, the “Resolution” slider, and everything updates accordingly.

Thanks again!

It comes from the surface from points component and it depends on how much points you use for the surface.
If you want a consistent domain, click on Reparameterize

You could make a Quad Mesh using Mesh From Points components (Mesh Edit plugin), or you could directly use A Mesh component.

So it could become more simple and fastest

1 Like