Custom mapped object. UVs lost when moving squished piece

Interesting problem with UVs and custom mapping.

I do a lot of Squishing of textured surfaces and meshes. 99% of the time I UV map and paint/texture in 3DCoat and then come back to Rhino for flattening. This always works perfectly.

However I decided I wanted to use Rhinos UV Editor in this case. So I created model (a snippet of which is attached), UV unwrapped it, positioned and scaled the UV islands in the UV Editor and created an appropriate texture. All good - everything worked as advertised.

Then I squished it. At first all seemed good when the squished piece landed at the default 0,0 location. However if I move it at all then the UV coords are messed up.

Is there any way to “burn/bake” the UVs to the squished mesh so that they travel independently with the piece?

Thanks in advance, Steve
Custom_UV-Problem2.3dm (5.2 MB)

Oh! Even more interesting!
I thought I would open the UV editor on the gaga, moved squished piece. It shows exactly the correct UV layout it’s supposed to have
Now I’m really confused.


Hi @Steve_Howden
UVEditor applies custom mesh mapping - it is a separate mesh stored along the texture mapping. Squish appears to copy the custom mapping mesh but does not update it to match the squished form of the object. When you re-run UVEditor the object you see is that custom mapping mesh.

One solution would be to convert the custom mesh mapping on those meshes into surface parameter mapping before running squish. But I will have to figure out if there is a way to do that some how.

This appears to be the same issue as reported here: RH-59943 Squish: Moving the squished mesh object will cause its texture to disappear,

Yep, surface mapping works correctly, but l have no idea how to convert the custom mapping. If you come up with an idea I’d be VERY interested.
Thanks, Steve

Hi @Steve_Howden, have you tried the _Bake command ? (Note that it does apply the texture it bakes to a new material and assigns it).


Hi Clement. Yes I thought of that, but bake only works on surfaces, not meshes.
I might try baking the original polysrf, then mesh that and see what happens…

Nope. That doesn’t work either :frowning:

G’day @Steve_Howden and @Jussi_Aaltonen

The script below seems to work for baking the squished meshes results.
Possibly it can be used to bake the input mesh as well but I did not test that
( it’s quick and dirty and late at night in this side of the globe) (832 Bytes)

Let me know what you find!

1 Like

OK. Not a solution to the Rhino problem, however if I take the whole thing into 3DCoat and apply UV mapping there and then re-import it behaves and the mapping has been applied to the mesh correctly.

The missing link in Rhino with custom mapping has always been the disconnect between surface/mesh parameter mapping and the custom map.

Hi Willem,
Genius! You’ve done it again.

It works for the input mesh too.

Many thanks to you on the other side of the world.

Regards, Steve

1 Like

Hi @Steve_Howden, you can just export / import as obj with texture coordinates too and get rid of the custom mapping.

@Jussi_Aaltonen, it would be nice to have RemoveCustomMeshMapping in the TextureMapping class with an optional argument to preserve / copy the texture coordinates into the mesh object’s texture coordinates.


Thanks Clement, Got it.

Thanks @Willem and @clement for those work arounds. I filed a request for adding this feature in Rhino 8: RH-66671 Bake custom mesh mapping as surface parameters on a mesh object