Unrolling Surfaces while Preserving Texture Mapping?

Hi Guys-

I’m trying to unroll a polysurface with a texture map applied and, ideally, when that polysurface is unrolled, the texture is unrolled with it, distortions and all. As you can see from the example screenshot, the polysurface has curves (only single curvature) so one would expect the unrolled texture to be distorted, etc. However, when one unrolls the polysurface, Rhino seems to just re-planar map the parts, eliminating all distortions, pixel stretching, etc. which is what I actually want to preserve. Is there a way to unroll and preserve the texture mapping?

Background: the idea behind this is to f’up images in Rhino as a kind of 3d photoshop and then to be able to actually “fabricate” (e.g. print and glue together) the distorted 3D images.

Is this possible within Rhino? I have a hunch this might be a grasshopper job, but I’d like to avoid that if possible…

Thoughts? Images below…

Thanks in advance.

-Andrew

This is the base model with texture applied, as I want it:

This is the junk you get when you unroll it:

Hi Andrew- see if UnrollSrfUV helps - it may if the textures are UV mapped, Otherwise Squish may help.

-Pascal

Hey Pascal-

No dice with squish. I don’t have the UnRollSrfUV command, is this a command from a newer version of 5? I’m on 5.1.2X.

Thanks!

-Andrew

UnrollsrfUV doesn’t seem to do it for me. It doesn’t keep the material on it at all. There is no keep properties like on unrollsrf. I used the unwrap mapping to apply the image in the first place. But unrollsrf gives me bunk results after as well.

This is a limitation of UnrollSrf that I filed a while back (RH-19493 for future reference). There is however one way to keep the texture on the unrolled surface but it’s labor intensive and not perfect… but it’s still something that might help with your project.

You’ll have to explode the model into separate surfaces. Then use one texture mapping method for all of them at the same time… like Planar for instance. You then will need to use the Bake command on each separate surface saving out an image file for each when prompted. Lastly, unroll each surface separately and orient it to match up with the others if you plan to print and fold the result or just need to keep track of the pieces. The result has a black border on each piece which is why I say it’s not perfect. I’ve nudged the bug report I made about joined polysurfaces not preserving mapped textures as well so maybe this will be possible at some point as you originally tried it.

Unwrap_Texture.3dm (1.1 MB)

Hi Andrew,

Here is a possible solution - a hacky script that produces unrolled meshes that retain texture coordinates.
Maybe there is a way to develop it a bit more to convert the meshes to surfaces again with the correct text coords., but I was thinking maybe for your needs this output will be enough.

You will need to explode your polysurface into single surfaces first, before using the script.

Here is how it ‘should’ work:

hth,

Jarek

PS. It will mark RED any surfaces that can’t be unrolled.

UnrollWithTextCoords.rvb (3.5 KB)

Hi Andrew- what happens? It may help to mesh the object, then explode the mesh and Squish the mesh parts.

-Pascal

1 Like

@pascal Nice, that was better than I had hoped for. Hope it works for asmithrasmussen

Hi Andrew,

ExactFlat for Rhino can do exactly what you’re looking for. ExactFlat will flatten meshes and surfaces of any shape and give you a 2D optimized flat pattern. It was designed with fabrics in mind, so the patterns won’t be 100% strain free. This allows us to easily flatten shapes with double curvature. And of course, texture coordinates are preserved through the flattening process.

-Luke

Jarek-

Thanks for the script, that’s beyond the call of duty. Unfortunately, it doesn’t seem to work as well for me and it outputs invisible lines (seriously). I tried moving closer to the origin, but then it produced deformed pieces that didn’t seem to be proper UnRolls. So I dunno. I’m about to try the squish trick. Thanks again!

Ok, it looks like baking the texture, meshing it, then squishing the parts actually work with a ~1% tolerance.

Hi Adam,

I just tested it with basic shapes. And not sure what you mean by invisible lines… perhaps you can post/send the file you are having problems with and the script can be tweaked. I think the squish should do the trick though.

best,

jarek

Ok, here is the file and the image I’m working with. Maybe it will work for you. Thanks again for all the help.20140418_Proof_of_concept.zip (318.1 KB)

Adam, here is what I get on my end with the script as a result (attached).
Is that a wrong output? All seems to be OK at first glance.
Still not sure what the ‘invisible lines’ are. You know that the output is actually meshes, not surfaces, right? (same with Squish). Just make sure your Display Mode shows meshes correctly.

~j20140418_proof of concept-for_rhino_forum_JB.zip (94.3 KB)

PS. Tried Squish as a comparison - texture-wise, it looks pretty much the same. I believe the script should produce more accurate results since the the output meshes are closely based on unrolled surfaces. But - I don’t know exactly what the end-result or next steps in your process are, so - I may be missing something obvious.

Wow, weird. It totally works now. I’m not sure what I was doing wrong?! Thanks so much for your help. I think this may be the solution!

Andrew- great, I’m glad you got it to work. Btw-sorry about mixing up your first name before!

No worries! Thanks!

Hey,Jarek. Can you help me? I have some kind of problem. Maybe I’m doing something wrong. Watch the video. Video 019.rar (148.7 KB)

Hi Dmitriy, sorry, the video will not open over here.

Try this