Various issues with UV mapping

All described things are when using unwrap and UV Editor - to limit I’ll talk only to stuff happening for mesh objects - not considering any breps only pure meshes.

So… Let’s start with this as it persist for a long time. When I have two open meshes and I’m joining or doing SplitDisjointMesh UVs should be merged without any problems while sometimes those go totally wrong - important here is that i join those it looks ok i save and reopen the document and those are completely wrong. I don’t know if this has any impact but usually when I manually unwrapped first and second and joined. Interesting is that when ill do unwrap outside for eg in blender import and ill do such operations everything is ok - like only rhino edited uvs are messed up. Basically this should be always attach/detach mesh operation am I right?

The second huge problem when exporting meshes via 3ds,obj,fbx - uvs in rhino looks ok but when I’ll export and import somewhere else I get rly wide range of weird results from uvs which are ok thorough uvs partially corrupted to uvs which are unusable.

Third, why UV editor is shifting 0,0? I mean even if FitLargeUvs=Yes should give me always zero in the first picked point when “drawing” UV space?

Mesh uvs + moving UV origin

Same mesh uvs in blender no matter what 3ds,obj or fbx and no matter which rhino 5,6 or 7

1 Like

Um… @Jussi_Aaltonen @nathanletwory ? Not sure who could take care of that.

1 Like

@D-W That would be me.

@Jussi_Aaltonen let me know if you need models that I used to reproduce :wink:

1 Like

@D-W please, send models that won’t export texture coordinates correctly. That would help testing my improvements. If they’re confidential use our file upload page but otherwise add to this discussion thread.

Sorry to dig this up, but I am also experiencing a similar phenomenon in Rhino 7. I use unwrap to mark my seams, then I adjust the layout using the UV Editor to move/scale my islands until they’re just right, then I mesh my object, export it as an obj file, import it into Blender, and inspect the UV Map to see that a large number of points have moved, sometimes off into random spots, sometimes to connect to other islands. I can provide screenshots of what I am experiencing as well as the model (Though, this happens to EVERY model I try to use this way)

@Keith1 Please, send in some example models that you have troubles with.

One trick that will help you to get UVs export correctly is to set the final meshing settings for the object render mesh before unwrapping. That way your mapping primitive mesh will match very closely to the mesh you get by meshing that object. And when export applies per vertex UV’s from the mapping primitive there won’t be so many places to stumble over.

@Jussi_Aaltonen Can you point me in the direction of the render mesh settings you were talking about? I’d like to play around with those to see how it affects the unwrap. I suspect these settings are possibly/probably destructive to existing maps, so if this is going to be one of those things where I have to change the rendermesh settings, and re-unwrap the model multiple times just to find out if the rendermesh settings will work, then this process is a bust. I really like the unwrap tool and the UV editor, but it seems like they are not ready for use exporting to OTHER 3D apps, and since my pipeline is from Rhino to Blender for rendering/animation, I probably won’t use them anymore.

I think I can see what you’re talking about (I THINK), but it sounds a bit like black magic instead of a repeatable process. For any given object that I plan to use outside of Rhino, I need to adjust the rendermesh settings, and even if I get that right, performing the unwrap on the NURBS object does not ensure that the EXACT same mapping will be used on the final export MESH. I can see that in the UV Editor when I edit the UV of the mesh, it does not match the geometry of the mesh, it matches the geometry of the RENDER MESH (Assumption, since I can’t actually SEE the render mesh). If I perform the unwrap on the mesh instead, I get the results I want but marking seams this way is INCREDIBLY tedious to do this for complex models, AND if I later discover that I need to edit the original NURBS object again, or export a more dense mesh, all that mapping I just did is lost completely because I have to re-export the mesh again after I make my changes.

There is a 3dm importer for Blender, that seems to import the rendermesh directly, so in theory, I could build my NURBS model, unwrap it and save it, and then directly import it into Blender, but the mapping info is completely missing once I get the model into blender. I assume this is because the rendermesh doesn’t actually HAVE the mapping info, it’s just used as a BASE to generate the mapping. This is a shame, since this method seems to preserve scaling, orientation and normal direction perfectly, while exporting to OBJ can sometimes affect that stuff.

It would be optimal if I could do unwrapping on the nurbs object (So if I need to export the mesh again later, the mapping info is still there) and have the seams match what is generated from the mesher, without all the vertices flying off willy-nilly. I mean, I don’t know about other people, but I might export a mesh from a nurbs object 10 or 20 times before I’m happy with it. Having to re-unwrap every time is just not something I want to do.

I have attached my 3dm file to this post. I have 2 copies of the model in my file, the NURBS version and the mesh version that I export. I originally mapped the NURBS object, because it’s WAY easier to pick out seams, so both the mesh and NURBS object have the same mapping.

I guess the biggest question I have is WHY the rendermesh has ANYTHING to do with the mapping and later export of the mapping.

AT-ST_right_weapon_array.3dm (1.8 MB)

@Keith1 umm well because actually do display anything on screen you need so called render mesh or in other words mesh aproximation of your NURBS model. Second important thing is that every render engine uses meshes to do its job. As you’ve mentioned I also saw inconsistencies during whole thing and if i can advise anything. Clean mappings then first setup your render mesh settings in object properties custom mesh after that unwrap it after that try exporting it i use mostly fbx for that purpouse. Hope this will help you somehow!

@Keith1 Thanks for the model. Most of the issues on exporting that nurbs to obj are the exact same type I was trying to solve last time I worked on it - spherical caps on cylinders. And I am tempted to get back to it as soon as possible and overcome it.

When you run Unwrap Rhino takes a copy of the object render mesh, sets the unwrapped texture coordinates on that copy and sets it as the custom mesh mapping primitive. UVEditor will show you that mesh mapping primitive projected to the UV space and allows you to modify it. As long as you don’t modify your object the mesh mapping primitive will match your object render mesh. As @D-W said render mesh is what you see in rendered display mode, raytraced display mode and renderings - almost all places where the object surface is somehow visible. Applying the texture coordinates from the mesh mapping primitive to the object render mesh works best when those meshes match perfectly.

Sorry for the delay getting back to this, work has me really busy right now, and thanks for the explanation as well. I do understand how the rendermesh works, what I am having a problem with is why it can take my seam selections from the NURBS model and apply them perfectly to the rendermesh, but doesn’t repeat that process when I actually generate a mesh for exporting. It seems like, in order to get this to work in any sort of consistent way OUTSIDE of Rhino, I simply cannot generate my own mesh and I must use the rendermesh if I want the mapping to stay correct, and that’s just not really something I want to do. I mean, the rendermesh is not exactly ideal from a topology standpoint, and that’s kind of why I am modeling in NURBS to begin with, because I can create my model, and then export it at whatever mesh density I want.

If the UV coordinates don’t work on MY exported models and only work on the rendermesh, than the UV unwrap tool is basically useless to me, except in those rare occasions where the rendermesh happens to be good enough to use in other apps. It’s a shame, because I really like the unwrapper.

You had mentioned something about setting the “final meshing settings for the object render mesh before unwrapping” but I am unsure what you mean by that. If you mean to generate my mesh first and then unwrap that, then no, absolutely not. The unwrapper works fine on meshes, but I have to select every single generated face edge to mark a seam, which may number in the hundreds or even thousands, where the NURBS model I can simply select the whole edge. The unwrapping tools in Blender are much better with edge loop selection for MESHES than Rhino is, but not as good as it is with NURBS.

Hi Keith - - you can set custom render meshes per object in the object Properties - that should help, if I understood your comments.

-Pascal