Warp image to fit surface?

Hi everyone!

I’m trying to apply an image inside of a surface. Bottom left is an example of the original image input, and on the right an example of what I want the output to look like once applied to a surface.

I’ve found that the Human plugin component ‘Custom Preview Materials’ is able to fit an image within a given surface, but as you can see in the following image it does not warp the image in the desired manner.

I see that the image is somewhat stretched in order to fill the surface. The rotation of the image is also something that I cannot set. I am assuming that the component works by defining a rectangular bounding box which encompasses the shape, and then stretches the image according to its dimensions, which determines the rotation. I want to be able to warp the image to suit the surface.

Any idea how to go about this? Rhino file attached of the shape outline.

warp image.3dm (3.7 MB)

It seems your target surface is a “trimmed” surface which is a portion of the underlying original rectangular surface patch.
That’s why your image was mapped out of your surface boundary.
Try to prepare an “untrimmed” surface(by using Edge Surface or Network Surface command)first.

Wonderful, thank you! Yes, I’ve noticed that the output surfaces of my definitions are normally trimmed surfaces (I generally use Boundary Surfaces to turn generated curves into surfaces that I can then apply colours to) but it’s never been an issue until now. Gosh, I thought it was going to be much more complicated!

Appreciate your help, screenshot below of the application. Only some raccoons were spaghettified in the making of this definition. :wink: