Trimmed Image as Texture/Material

Hello, I am trying to work on numbering stained glass.. I imported an image(which became surface in rhino) and started to trim each piece separately.. The workflow works perfectly i can move/scale/rotate and each piece maintains the trimmed part of the image… I tried to use these pieces in grasshopper but when i reapply the texture on them the original Untrimmed image apply on the pieces… Is there any solution to save and reference the trimmed texture ?

Thanks

I am also trying in GH to trim a texturized planar surface against simple rectangles that i placed here and there…
let’s assume i imported a picture (the jpg representing a building section on the left)

objective: in GH, I want to trim it with multiple rectangles and move these “grabbed portions” around, How to do in GH?

Hello
see this if it helps

Surely doable on V9 WIP with trimmed surface. It doesn’t work on R8, trimmed surface UV are not derived from the initial surface.

it could work on R8 with Nautilus plugin and meshes.
Lets say you have a surface with image on Rhino, material name IMG_6703m in my Rhino

I reparametrize the surface/image, and then trimmed it using a 2D domain.


Then 2 solutions, the one I showed or the use of UV from mesh toe Meshes

Nautilus plugin needed

trimmed image.gh (7.8 KB)

Thank you Laurent,
I am interested in in the RH9 workflow, I prefer to build without plugins for now.
i have experience in gh but I never worked with mapping and I am having a really hard time achieving my result,

Could you please help out?

try mapping.gh (16.6 KB)

try mapping.3dm (223.2 KB)

i did not understand how to achieve this in with trimmed surface in RH9, how to do the mapping, etc…

GOAL: (as shown tol left) to trim 2 portions of that image and distribute them on a line, for example. everything in gh in RH9

INPUT: a filepath to reference the image, and the rectangles to select the portions

I looked a bit to the file, I quite understand but not fully.
When I bake the model object image is moving, it means that meanwhile a position and size of the texture was set, moving the object make them move !!! I don’t know if it is a feature or a bug ! @BrianJ have you some idea how to fix some texture coordinate on object in RH9 ?

See this discussion if it helps

try mapping.gh (20.0 KB)

Hi @bie and @laurent_delrieu ,

In the Rhino WIP I’d do this like so…


GH_v9_split_texture.zip (303.6 KB)
Use the Model Object component from Params to reference your surface…

Make sure the line that you move the new isotrim srfs to starts at the end of the referenced model object srf either horizontally like this or vertically. This will prevent the shifting of the resulting textures.

thank you Brian for your help,

I would need a solution where I don’t input the srf from rhino through referencing it with the model object component…
• the solution should take the size of the imported bitmap and self create a surface… (this part i was able to code).

•also i would need more freedom to place and distribute the trimmed portions wherever i want, in GH, without having to bake

•Also, your solution requires me to use the "rendered " viewport style, which is inconvenient, i use shaded for a variety of reasons…

i know, i have lots of constraints, sorry to bother

Filed as https://mcneel.myjetbrains.com/youtrack/issue/RH-95541

I asked @AndyPayne for help on that bit and he made the below version which creates and moves a new planar mapping for the isotrims. You need to make and reference two points in the 3dm. The origin can be anywhere but is the most logical if placed at lower left on the first mapping rectangle.


SplitTexture_AP2.gh (26.8 KB)

thank you again Brian and Andy!

it seems this last solution from @Andypayne works!
I will continue my script, before flagging it as solved i will make sure i don’t have anything else.

Also, i found out there is a new “concept” visualization style in RH9 which allows visualizing textured srfs while keeping it “CADdish”, which is one thing i needed