Jump to content

A Blender tip re: Transferring UVs


Nacy Nightfire
 Share

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

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

Recommended Posts

I finally solved a problem with my workflow in Blender and I thought someone might benefit from what I've learned.


I tend to jump into a project with a great deal of enthusiasm and begin by creating an impractically dense model.  It's simple enough to reduce the geometry at a later point and generally I use that dense model only for baking texture maps.  As I start removing edge loops and work my way through the LOD levels,  I often discover the lower LOD's inherited UVs become either messed up or  get deleted somewhere along the way - or I completely forget to make UV's in the first place.  The tedious task of recreating UVs for each LOD version which need to match up with the High LOD version is unappealing - so much so that I usually just tank the project and start over.


Tonight I played around with the  Data Transfer Modifier.  I suspect if I knew enough about how to set it up this would likely have worked nicely to transfer the UV set up from the high LOD model onto the other LOD versions, however after spending  a few hours researching this tool and testing it out,  I couldn't get it to work.


I then stumbled across info about Blender's data transfer Operator ( as opposed to Blender's  Data Transfer Modifier) and I found it works great for copying a UV set up from a high poly mesh to lower poly versions.  (Note: the CTL L shortcut for the  "Make Links"  operator which copies UVs from one object to an identical object or objects, wasn't what I was after.)

 

 

  • The highest LOD should have a UV set up
  • Position the  "Transfer From" and "Transfer To" objects at the exact same location, such as at the world origin.
  • In Object Mode, select the mesh with the UV set up  then "shift" select the object for which you want Blender to create UVs for based on the first object selection.  
  • In Search mode (F3) type "Transfer Mesh Data" (Note there is also something similar called Transfer Mesh Data Layout, but that's not the correct choice).  
  • Once you select Transfer Mesh Data a menu grid will appear. Select UV's from the Face Corner Data column. 

1766194038_TransferMeshData.jpg.bb4809609eedb0443976dac940acac54.jpg

Works like a charm.
I hope someone finds this helpful.
 

  • Like 3
  • Thanks 1
Link to comment
Share on other sites

To me it sounds like your whole workflow somehow is a bit wrong.

Workflow for building mesh is:

  • Build your highpoly object, no uvs needed at all on that.
  • Retopo your highpoly object. That means, you rebuild a lowpoly mesh ontop of your highpoly one, the highpoly is just the reference for baking maps later.
  • After the retopo, you build the UVs on the lowpoly object, bake your maps and texture the low poly one, NOT the highpoly one
  • When you're done, you build the LODs. As long as you don't delete border edges, no uvs are affected in that step.
Edited by Tonk Tomcat
  • Like 1
Link to comment
Share on other sites

Just wanted to say that the is no perfectly CORRECT workflow. We spent months talking about this in Opensim.  What works for one person doesn't necessarily work for another.  

 

For example I HAVE NO HIGH POLY MODEL  :D.  So there goes that edict. 

And I always unwrap and texture as I go along and usually work in "materials" view (Cycles)

It what's works for YOU that is important.  

  • Like 1
Link to comment
Share on other sites

On 8/31/2021 at 7:20 PM, Chic Aeon said:

Just wanted to say that the is no perfectly CORRECT workflow.

Thats valid if you start working on lowpoly directly. But if you use a highpoly, then the above described workflow is the one and only correct one. In no way it ever can happen that you start doing LODs and even forgot to make UVs, because in that case you would have start to reduce polys on an untextured object, what absolutely makes not sense at all. So if somebody has issues like that, only explanation would be, that they textures the highpoly model aleady or used vertex paint on them. And this is wrong.

Link to comment
Share on other sites

 I removed my latest response as I didn't want to go  "off topic" from my original  post.  Tonk, I fear you are simply baiting readers to engage with you in a tedious argument. I was not soliciting a general  critique on my workflow other then as it relates to this method of UV transfer in Blender - a useful tip some Blender users might find beneficial.

Your efforts, although I'm sure are well meaning,  will only serve to discourage other potential participants. Even the least experienced person can have something to contribute to this forum and can pass along a brilliant tip or interesting work approach useful to someone else.  Why would you want to crush their enthusiasm and discourage their contributions?     I suggest you start your own thread based on the subject of your remarks.  As you present your ideas here it is difficult to actually understand your meaning.  I encourage you  flesh out your thoughts and ideas on  your topic and provide some content that would be interesting to those looking for advice on workflow.  

Link to comment
Share on other sites

Hey Nacy, good to see you are still around! :SwingingFriends:

Your post made me finally lookup how to transfer UVs between differring topologies in 3ds Max (since I don't use Blender). And voilà, there is indeed a method to do just that in Max as well. By projecting the UVs. I got mixed results on my very limited tests with it so far. But it's always good to know how certain things can be accomplished.

So, thank you for the inspiration on that one.

Edited by arton Rotaru
Link to comment
Share on other sites

arton, thanks for your welcoming words!   

I suspect the reason I found it so difficult to find this information is it's has limited usefulness. Still I really found it handy when I needed it.   I ended up with  much nicer result then I expected in Blender, but it might just be due to the geometry I was working on. Even to get an automated rough approximation of where the geometry should be split up and where the islands should be placed and orientated is a help - a little hand work to improve the results is a lot better then starting from scratch.   I also suspect this function has some use that I haven't quite put my finger on.  I'll report back if I every learn its intended use. 

  • Like 1
Link to comment
Share on other sites

On 9/3/2021 at 11:11 PM, Nacy Nightfire said:

arton, thanks for your welcoming words!   

I suspect the reason I found it so difficult to find this information is it's has limited usefulness. Still I really found it handy when I needed it.   I ended up with  much nicer result then I expected in Blender, but it might just be due to the geometry I was working on. Even to get an automated rough approximation of where the geometry should be split up and where the islands should be placed and orientated is a help - a little hand work to improve the results is a lot better then starting from scratch.   I also suspect this function has some use that I haven't quite put my finger on.  I'll report back if I every learn its intended use. 

I do copy UVs from time to time as well. On similar topology that's as easy as just dragging and dropping a UVW modifier on the mesh in the viewport. That breaks the moment the vertex order has changed between the models, though.

I still prefer to do my baking by using a cage. So I have to explode the model, setting up a cage. I keep an un-exploded version of the mesh, though. While texturing I might become unsatisfied with the UV layout, though. So I go back and change the UV layout. But now my exploded model still has the old UVs. Rather than doing the whole cage setup again, I try to just copy over the UVs and be good to go. But most of the times, just copying the UVs doesn't work due to the detaching and re-attaching of the mesh elements when exploding the model.

So a less restrictive method of transfering UVs would be handy. As I said, your post made me finally lookup how to do it in Max. Since Blender can do it, Max should be able to this as well, right?  However, since the UVs are projected, the models need to have matching shapes. So that does not work in my case of the exploded vs the un-exploded model.

But now I know how it's done and what it can do. I'm sure this will come in handy one day or another.

  • Like 1
Link to comment
Share on other sites

1 hour ago, arton Rotaru said:

I do copy UVs from time to time as well. On similar topology that's as easy as just dragging and dropping a UVW modifier on the mesh in the viewport. That breaks the moment the vertex order has changed between the models, though.

I still prefer to do my baking by using a cage. So I have to explode the model, setting up a cage. I keep an un-exploded version of the mesh, though. While texturing I might become unsatisfied with the UV layout, though. So I go back and change the UV layout. But now my exploded model still has the old UVs. Rather than doing the whole cage setup again, I try to just copy over the UVs and be good to go. But most of the times, just copying the UVs doesn't work due to the detaching and re-attaching of the mesh elements when exploding the model.

So a less restrictive method of transfering UVs would be handy. As I said, your post made me finally lookup how to do it in Max. Since Blender can do it, Max should be able to this as well, right?  However, since the UVs are projected, the models need to have matching shapes. So that does not work in my case of the exploded vs the un-exploded model.

But now I know how it's done and what it can do. I'm sure this will come in handy one day or another.

I don't know 3dsmax, but since Maya can actually transfer uvs from world positions, meaning that geometries don't really need to match, I guess 3dsmax can too, just need some adjustments in the tool settings.

Link to comment
Share on other sites

Is it possible this tool/modifier is what is generally used to adapt the UVs of custom human avatars to align with  the UVs of the SL avatar?  I've often wondered what kind of work goes into that kind of project although I am not actually interested in delving into such a project, myself.   Likely this method would not produce an immediately perfect result, but might get one well into the ball park.  I've taken a long absence here so I'm not fully  up to date with more relatively new features in SL such as BOM. No doubt this topic been discussed at length and doesn't need to be commented on, however I'll just mention it here as an example of where one might want to transfer UVs of two similar, but not identical models.

(As an aside I'll just say it's difficult to categorize one's skill level,  but, as a Blender user, I've reached a point where I can somewhat understand what Maya and 3damax are discussing and translate it into "Blenderese"!  I now watch youtube videos and learn a great deal from tutorials geared to those programs.  It's very rewarding.)

Link to comment
Share on other sites

19 hours ago, OptimoMaximo said:

I don't know 3dsmax, but since Maya can actually transfer uvs from world positions, meaning that geometries don't really need to match, I guess 3dsmax can too, just need some adjustments in the tool settings.

Well, in Max it's done with the projection modifier, which has limited options regarding projecting the UVs.

Link to comment
Share on other sites

8 minutes ago, Nacy Nightfire said:

Is it possible this tool/modifier is what is generally used to adapt the UVs of custom human avatars to align with  the UVs of the SL avatar?  I've often wondered what kind of work goes into that kind of project although I am not actually interested in delving into such a project, myself.   Likely this method would not produce an immediately perfect result, but might get one well into the ball park.  I've taken a long absence here so I'm not fully  up to date with more relatively new features in SL such as BOM. No doubt this topic been discussed at length and doesn't need to be commented on, however I'll just mention it here as an example of where one might want to transfer UVs of two similar, but not identical models.

(As an aside I'll just say it's difficult to categorize one's skill level,  but, as a Blender user, I've reached a point where I can somewhat understand what Maya and 3damax are discussing and translate it into "Blenderese"!  I now watch youtube videos and learn a great deal from tutorials geared to those programs.  It's very rewarding.)

I don't know if this is generally used to adapt the UVs, but it's certainly a possibility, and worth a try for sure.

Link to comment
Share on other sites

On 8/31/2021 at 8:33 AM, Nacy Nightfire said:

In Object Mode, select the mesh with the UV set up  then "shift" select the object for which you want Blender to create UVs for based on the first object selection.  

Shouldn't this be the other way around ?

First select the mesh with no UV's (destination) and then shift select the mesh with the UV's (source) ............

Link to comment
Share on other sites

I thought so too Aquila, but I tried this both ways and I got better results selecting in the manner I described.  I double checked my work a few times  before I posted, as it did seemed odd.  But I encourage anyone trying this out (saving the file first, of course) to try it both selection methods and evaluate the results.

........

I just  tested this out with two copies of the Blender monkey head, making changes in the geometry of the target version.  It does seem you need to select the  "UV FROM" object (source)  and then the" UV TO" object (target), however, in this instance, my results were a bit were messy with connected edges crossing islands. 

There is an operators panel that has a a number of features to play with so I'll do a bit more research here  when I have more time. I had accepted the default settings when using this on my initial geometry I was working with. It may have just been a bit of "beginners luck"  that I got nice results in that instance.

Transfer Mesh Data Operators.jpg

Edited by Nacy Nightfire
Additional thoughts and some changes for clarification (hopefully)
  • Like 1
Link to comment
Share on other sites

Note the settings on I last posted are not the default settings.  I continued to mess around working on my monkey sample some time trying to get a good result. I could not understand the  the settings as described  in the Blender manual, however by using my trusty "many tedious re-dos and fail" method,  I landed on these settings.  It worked perfectly and it only cost me a pound of ground beef neglected on the counter until it became too warm to safely cook (because I couldn't let this go and time stands still when I'm trying to figure something out in Blender...)

Here are the operator settings that worked for me:

1856675589_Thisoneworked.jpg.00d923780cf6b1a45d9c4b08e3cb846d.jpg

 

  • Like 1
Link to comment
Share on other sites

An example of transferring legacy female avatar upper body UV's to a Ruth2 upper body that has had its original UV map deleted :

For this model I found the best results when using the Nearest Face Interpolated and Only Neighbour Geometry options :

1153682958_Meshdatatransferpanel.thumb.png.fa00b95f613231394fc29a11db57686b.png

 

 

The legacy Ruth UV's as source :

250653179_LegacyRuthUVs-min.thumb.png.fb8ff57c08fef7e6375fb13fd0e48d45.png

 

The result of transferring Ruth UV's to Ruth 2 :

1058445295_LegacytoRuth2-min.thumb.png.8c177930281c957d78c74ff2614f4e78.png

.......  wasn't .....to bad.    Looking at it again ......... the shoulders are bad !

  also quite a few of the quads on the UV island borders ended up on the wrong islands  but if necessary they could be separated and joined back to the correct islands.

 

For comparison the original Ruth2 UV's :

1441597762_Ruth2_UVs-min.thumb.png.78587e0bba77172525b4aa0cec4f6de4.png

 

So for non matching geometry I would suggest trying the Nearest Face Interpolated  and enable Only Neighbour Geometry option instead of the default Nearest Corner and Best Matching Face Normal.

Edited by Aquila Kytori
  • Thanks 1
Link to comment
Share on other sites

Aquila,

Thank you so much!  I know that took a great deal of time to put together.  And I really appreciate the help with the settings!   I tried my best to read and understand the Blender manual on the topic, but without success.

If I am suggesting a selection order different then yours, I defer to your expertise.  I'm not sure why I get the order mixed up, but I'm probably suffering from opposite-itis. 😄

(And I've been absent from SL so long I didn't even know there is a Ruth2!  I'm pretty overwhelmed with all the changes.)

Link to comment
Share on other sites

You are about to reply to a thread that has been inactive for 964 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...