Jump to content

Blender, problem when using the Transfer UV Maps tool


Aquila Kytori
 Share

You are about to reply to a thread that has been inactive for 2713 days.

Please take a moment to consider if this thread is worth bumping.

Recommended Posts

 

My project in Blender (2.75a) at the moment is a bi-plane which is now all UV unwrapped except the wires and struts mesh object that support the two wings from the fuselage.

This part of the mesh (1 mesh object with a mirror modifier ) contains multiple (20) duplicated copies (in Edit mode) of a part that anchors the wires to the wings/fuselage. What I’m trying to do is Unwrap and edit the Uv’s of one of the anchors then Transfer the UV mapping to all the others. Dree explained how to do this in this post:  https://community.secondlife.com/t5/Mesh/Blender-mesh-texture-problem/m-p/2923670/highlight/true#M31326   message number 8: note 3

and a 1 minute video showing the the process can be seen here:   https://www.youtube.com/watch?v=gORp5LC9xZk

4 of the anchor points.png

So what I am doing is this :

1: Selecting the 3 parts that make up one anchor point , adding seams , Unwrapping and scaling and repositioning the resulting UV islands.

2: One by one I select each anchor point and make each one a separate mesh Object. (P to open Separate menu and then choose Selection).

3: I Shift select all those objects, selecting the one I UV manually unwrapped last.

4: With them all selected I open the Make Links menu with Ctrl+L and choose Transfer UV Maps.

5: With all the anchor objects still selected I Shift select the original mesh (the one the anchor points were separated from earlier) and use Ctrl+J to join them all back to one mesh object again.

The result is that instead of all the anchors being unwrapped and mapped identically to the original one I manually unwrapped, only one of the anchors has been unwrapped and mapped correctly the rest have been unwrapped incorrectly.

To illustrate this I have separated four of the anchors to a different .blend file and coloured them: Red, Blue, Yellow and green.

The Red one is the one that was given seams and UV unwrapped and the resulting islands scaled and repositioned in the UV space.

The Blue one got unwrapped scaled and positioned correctly.

The Yellow and Green ones got unwrapped and scaled and positioned in the same space as the RED one but only partially unwrapped the same !

UV unwraps.png

Does anyone have any ideas why this is happening and how to fix it ?

I have tried applying Location, Scale, and Rotation even though this should not change anything because the Original Shift+D duplicating and dragging was all done in Edit mode.

I have even tried giving each anchor the same seams as the original one but that didn’t change anything.

I have tried exporting all the anchors to a .obj file then importing into a new .blend file. Didn’t change the result.

If someone would like to take a look at it and try to figure out why the Transfer UV Maps is not working as expected I have uploaded a .blend file which only contains the four coloured anchors to here:            http://www.pasteall.org/blend/37728

At the moment I have 2 options :

1: Delete all but one anchor point, unwrap that one and then use it to replace the ones I deleted. The difficultly with this is that there are 20 anchor points on each side of the air plane that have to be replaced and edited to get the correct rotations etc. I started doing this but its very difficult to get them in exactly the same position/rotation as before.

2: Add seams to all the anchors , Unwrap and manually (with help of snapping tool ) reposition all the islands. I started this as well but sooooo many islands to sort out I decided to take a break and ask here for a possible solution J

HELP !

Link to comment
Share on other sites

Still a bit tedious, but I could make it work in your example by sorting the mesh elements (Select all, Mesh->Sort Elements->xxx, then choose Vertices/Edges/faces in the tool panel). If they all have different orientations, then I snapped the cursor to the same point in each mesh, then used "Cursor distance" for xxx choice. After the sort, the UV map transferred as expected (or at most one vertex to move manually). I did all three sorts (V/E/F) in case. So I don't know which are required.

I assume this means the mirroring or other manipulation changed the element orders and that the transfer is dependent on the order in some way. It's also possible that you might be able to get the right effect by using a Data Transfer modifier, with the right methods of matching source and destination elements, but that would be tedious to work out and to apply.

Link to comment
Share on other sites

Hi Drongle :)

Thank you for taking  look at this .

I tried your suggestion of

1: Source mesh object (Red anchor), Edit mode, Snap cursor to a vertice, select all, Mesh>Sort Elements>Cursor distance,and selecting vertice,Edge and Face.

2: Repeat above for the Object mesh (Yellow anchor)

3: Select Yellow then Red anchor mesh and Transfer UV map as before and the result did look alot better.

But ................ in my original Transfert UV map borked UV's of the  duplicated anchors ...... on close inspection I saw that each quad/tri in the UV unwrap was a separate island and now with your method i still have some tris and quads that  should be part of a bigger island but are still separate islands, see image below.

Sort elements.png

Tedious is much to short word to describe all the work that would be necessary to get the UVs of all the anchors neat and tidy! :)

So tomorrow I will just have to finish the hand editing of those Uv's that I started editing this afternoon.

Lesson learnt.     When ever possible UV unwrap originals before duplicating.

Edited to note:  At least one time in my workflow this "wires and anchors mesh object" was joined to the "wings mesh object" which has an Edge Split modifier, perhaps somehow the 'wires and anchors mesh object" still contains a memory of this in its data ? This could explain why when this mesh is UV unwrapped using the Transfert UV map method all the tris and quads are separate islands?

Link to comment
Share on other sites

Very nice plane! Pam Galli kindly directed me to this thread.

I have only a moment here to glance at the issue and need tonight to to absorb this thread where I'll respond tonight in more detail, but off the top of my head when you use the UV transfer on an item created by the mirror modifier you are not actually transfering from one identical item to the other. It's mirrored.  So the result is unconnected UV faces.  It took me ages for figure out why I sometimes had this issue and otherwise not.  For example if you make copies via the array modifier you shouldn't run into this problem.

I recall I figured out a quick fix for this so you can correctly transfer the uvs to mirrored objects.  The procedure is something like mirroring the mirrored part,   THEN copy the UV and then flip it back and reset the normals...something like that, but I have to dig out my notes as I haven't been actively creating mesh this summer.

************** A few hours later***********

Yayy!  I found the video I made to remind myself about this issue.

Here's an example I just whipped up.  I made a quick coffee cup and mirrored it on the x and again on the y.  I then selected each copy and made them seperate objects (in this case the easiest way is to select each and press P>separate by parts which will seperate everything selected into it's own object in one go and since each copy s a single mesh it's a quick way to do this.)

Then I UVd the "master" and then selected each copied object with the master selected last. I pressed Ctrl L and transferred UVs.  Note that the best way to then visualize the problem with copying UVs on mirrored objects is to create an AO texture from the "master" and then assign this texture to all the mirror copied meshes:

 

Screen Shot 2015-08-25 at 8.00.14 PM.png

The "Master copy" is on the left in the back.  Note that the copy on the x axis and on y axis do not look right.  This demonstrates that that although the UV's appear to be correct, the faces are disconnnected and screwed up.  What is interesting is that the copy diagonally opposed to the "Master" copied correctly.  That's because it's a copy of a copy  - mirrored twice - so it's straightened out.

The Fix?  Seperate the mirrored meshes into seperate objects and then prior to copying the UVs,  flip the normals for the one's that would "break" (not the diagonal one because it "self-corrects").  After flipping the UVs, proceed with copying the UVs.  Then re-flip the normals back on the copies that needed this correction.

Tadaa!: 

 

Screen Shot 2015-08-25 at 8.01.48 PM.png

Link to comment
Share on other sites

I would also like to mention that while I absolutely  agree it is ideal to make the UV's prior to mirroring or creating an array,  I can imagine situations where one might make the UVs before copying, but yet later find that the original UVs are not optimum and one might then choose to rework them at some later point.  So  if the scene is complex and there are many and the parts are repositioned after mirroring the only reasonable option would be to copy the UVS.

Link to comment
Share on other sites

Inspecting even the transferred map of anchor-3 using synched sselection and selecting a face at a time reveals that it is worse than it looks. Some of the polys are mapped very wrong even when they look normal. You can also see this with a test grid pattern. Most of the errors seem to be use of the wrong one from a set of split vertices (split by UV seams).

The sorting works a bit, but not well enough. The time I tested it, there was only one misplaced vertex, but that isn't reproducible. However, the Data Transfer modifier does give much better control of the matching between source and destination meshes. Surprisingly, it seems that you need to transfer the UV map, which is a face/corner property, using the "Nearest Face & Nearest Matching Face Normal" option. Here are pictutes of anchor-1 (top) and anchor-4 (which is much worse than anchor-3) before (middle) and after (bottom) applying the data transfer modifier set up as shown.  It looks about perfect. It wasn't good with other options.

Note that the option for evaluation in global space (buton with sphere and cube at end of source name box) is off. The "nearest" is then evaluated in local space for each object. For that to work the origin has to be in the same place relative to the geometry. I made sure of that before adding the modifier by Transform-Origin-to-Geometry for each object.

uvtransfer.jpg

I also agree that this is still MUCH more work than mapping before duplicating!

 

  • Like 1
Link to comment
Share on other sites

Thanks Pam for dragging Dree into this :)

Dree, the four anchor points I used in the example are 4 taken from the 20 used in the left hand side of the air plane. Its this left hand side that has the mirror modifier which creates the right hand side so there shouldn't be any mirroring used in these four objects.

I tried using your flipping normals fix on the yellow and green anchors but the Uv’s came out even worse.

I next tried your fix on a completely new test mesh and it worked as you said it would.

There is something else going on in these borked meshes. There should be no mirroring used in making these 4 anchors, if I remember correctly I created the first wire which has an anchor point at each end, one of which is that Red one. Then in Edit mode Shft+D dragged copy to create the wire containing the BLue anchor, then with both of these wires selected Shft+D dragged a copy to create the next two wires with the Yellow and Green anchors. The other anchor points would have originated from one of these four , I did use S Z -1 (for example) to flip the orientation (then had to flip normals) of some of the others. But as I have said earlier at one point at least this wire and strut mesh was joined to the wing mesh that contained an Edge Split modifier and also somewhere along the line I may/probably have hit one or two keyboard keys that did… who know what to the mesh !

So next was drongles method……….

Edited to add in red.

Warning everything below this no longer applies. I didn't do enough testing before posting.

See Drongles post below. Message number 8

And it worked perfectly …………on the left hand side of the mesh but the right hand side, (the mirrored side) the UV’w were terrible. The Flip normals fix worked on the right hand side but meant having to do them one by one using the original from the left hand side each time.

The “shorter” workflow I came up with was deleting the Mirrored side and then use Drongles method. When the left hand side was correct and joined to become a single mesh object again re-added and applied a mirror modifier.

The Transfer Data modifier only needs to be manually set up for one of the objects. By selecting the others and then lastly selecting the object that has this modifier and opening the Makes links menu (ctrl+ L) and choosing Modifier, this modifier is copied to all the objects selected.

So for anyone following along and has a messed up mesh like mine and so can’t use the usual Transfer UV map method here is the Drongles workflow again:

1: If you have a mirror modifier in this mesh or have applied one , Delete it.

2: Separate all the parts that need to share the same UV mapping into separate mesh Objects.

3: Select one of these and UV unwrap and edit the UV’s as required. All the other objects will eventually have this same UV layout.

4: Next you need to set the Origin to Geometry of each of these objects. Select one of the objects, Tools panel> Set Origin>Origin to Geometry. (For the rest its quicker to select each one and use the shortcut key for Repeat last Action, Shft+R).

5: Select one of the Objects and Add the Data Transfer modifier. See Image below. There are only 4 options that need selected/enabled/disabled, the rest are left as default.

Data Transfer panel.png

6: Copy this modifier to all the other objects. The quickest way of doing this is to select all the objects, except the one that has been UV unwrapped, making sure you select the one that has the modifier last. Then with Ctrl+L open the Make Links menu and choose Modifier.

7: Apply the modifier to all the objects. All objects will now have the same UV mapping as the first one.

8: Join all the objects back to become one mesh object again.

9: If necessary Add and Apply a Mirror modifier.

Drongle, how you ever work out what all the options do in these advanced panels of Blender I'll never know ! 

This may be a very small "Blender" forum but always seems to come up with the answers. How many Blender users would have known about Dree's fix or have worked out how to use the Transfer data modifier to transfer UV maps (or for anything else ) ?

Thanks again Dree and Drongle (and Pam)  :)

Link to comment
Share on other sites

Hmm. I was over-optimistic there. It turns out that the data transfer modifier only worked because the shackles in your example file were in the same orientation. That means you would have to rotate them to match the source before doing the transfer, then back again afterwards. That's more than twice as much work as simply deleting all but the mapped one and replacing each one with a duplicate. So it's completely useless.

Here's the evidence. First I tried some very simple objects, using the make-link-transfer-UV method, to mirrored versions, and they all worked perfectly. So maybe it requires a certain complexity before the matching a;gorithms run into trouble. So I resorted to the coffee cup. The one on the left is the "original", which was UV mapped after the others were duplicated and mirrored and normal flipped in edit mode, then separated (actually, one mirrored one was made that way, then it was duplicated in object mode. A and B use Make-links-Transfer UV from the original; A was without doing anything else, B was after mirror/flip-normal/transfer/mirror/flip-normals. If you look at the UV maps, these two look as id they have about the same amout wromg, but from the texturing it is clear that A is a complete disaster, while B has quite a lot of properly matched faces. Neither is useable. C was made by rotating the whole object 180 degrees before using the data transfer modifier (then rotating it back again). The transfer is perfect, but if you look carefully you can see that the result is not a mirrored version of the original. If you don't do the rotation, you get D, which is as useless as A or B.

Uvtrans2.jpg

 

Link to comment
Share on other sites

"Makes links menu (ctrl+ L) and choosing Modifier, this modifier is copied to all the objects selected."

I didn't know that one - brilliant. I can't count the number of times I've been frustrated with repeating the same modifier setup over and over.

"how you ever work out what all the options do in these advanced panels of Blender"

Experiment. Like the proverbial monkey with a typewriter.

I'm still a long way from understanding the data transfer modifier though ... what is a "Layer" in the context used there. anyone?

ETA: I guess it wasn't as useless as I thought because you only had a couple of orientations to deal with. If they had been all over the place, it would probably have been much more difficult.

 

 

Link to comment
Share on other sites

Damn ! ............ damn damn damn !

Your right.

I just tried making copies of one of the bad anchors and rotating them some in all 3 axis then running the Separate/Data Transfer modifier etc and eventually adding and applying a mirror modifier on them and then texturing with a colour grid.

The one that was in the same orientation worked fine but now with a grid texture on them I see the mirrored versions are wrong. And the rotated versions just bad !

Data transfer rotated.png

OH Well nearly worked.

Now I will have to put a line through my previous post.

Link to comment
Share on other sites

You are about to reply to a thread that has been inactive for 2713 days.

Please take a moment to consider if this thread is worth bumping.

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
 Share

×
×
  • Create New...