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?
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.
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 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…
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)
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 @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 @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