View Full Version : UV mapping a rigged and weighted model?
09-11-2007, 06:39 PM
I am revisiting an old model that I would like to UV map, problem is that I have already rigged and weighted it.
My understanding is that maya utilizes the UV map of the object to retain the painted weights of the model, so any alteration of said UV map will negate the painted weights stored.
Is this correct or am I way off? And regardless of my accuracy in that question is there a way to keep the rigg and painted weights while changing the UV map?
Thanks for any help or explanations in advance. :)
09-11-2007, 11:17 PM
There are a number of ways to do this.
1) just UV map like normal without un-binding and hope that "Delete->non-Deformer History" works properly. It doesn't always.
2) dupe your bound geometry, UV the duplicate, transfer UVs to the bound geometry. Again transfering UVs doesn't always work properly.
3) my favorite and the cleanest and most reliable. save the weights out by point number not UV. There are a couple of scripts floating around that can do this. My favorite is called mbExportSkinWeights.mel by Michael Bazhutkin, but it's easy enough to write your own if you're a scripter. Do your UVing. Delete history. Re-bind. Import your weights using mbImportSkinWeights.mel
This all works because internally Maya doesn't use the UV map for weighting at all. It uses point number. They've just written an interface that matches point number to UV space so you can paint your weights and write them out. It's not like everything that you ever weight has to have an image map lookup associated with it or anything. You can weight something that has no UVs at all.
Hope this helps.
09-11-2007, 11:52 PM
Thanks very much for the advice, and for explaining the process in which maya catalogs the UV map. Nice to have a solution and perspective at the same time.
09-12-2007, 06:00 AM
you can even use "substitute geometry", so just duplicate your bound mesh, delete all history, skinning and connections, then uvmap it, and replace the other model with this, with substitute geometry function :)
09-22-2007, 04:50 AM
first of all..UV has nothing to do with UV maps !! why u doubt ! b'se skinWeight is like a percentage of influence weights of bones per vertex.
its like .. ok, for vertex 1 - joint 1 will weight it by 40 and joint 2 by 60 % and for vertex 2 - joint 1 by 55 % and joint 2 by 45 %.. and so on... thats it, nothing else !!
UV comes into play ONLY if u want to use maya's default export skin weights tool.. when u fire this, maya looks at the UV map and for each joint in the skin cluster, exports an image out..
ok, since this is clear now, i wud also suggest this :
dup ur skinned mesh, UV what u want on this. since ur mesh is a 'deformed' object, select it , go to deform menu > show intermediate object (this is the orig model copy maya uses to compare to find out resulting deformations - pls correct me if i'm wrong) and then u can select ur dup mesh (with new uv on it) and select this intermediate object, try UV transfer tool.. then if u want to remove even this node (to keep lesser history), <read carefully> select the intermediate shape node, in hypergraph, only disconnect the incoming connections from the polyTransfer node to the shape node.. and then delete the polyTransfer node.. this way ur uv is put no the shape and the history is gone !
this way u can avoid the skin weights xport and import but if u want to do this, yes i suggest usign a tool like arcsecond suggested... non-UV dependent export tool..
hope that helps !
09-22-2007, 08:02 AM
ignore pls.. double post !
btw.. did u try this ??
09-23-2007, 06:57 PM
Duplicate your rigged geo. Do the UV work on the duplicate. Setup a blendshape with the rigged geo as the target for your new clean UV'd mesh. Easy and no messing with buggy tools.
Or animate your rig mesh. Cache it out. Apply caches to the same mesh with good UV's. It's even cleaner and allows you to render meshes without rigs or extensive history. Animation changes then just mean updating the cache without needing to do anything with lighting scenes.
01-24-2008, 12:30 PM
ashishdantu you just made my day
01-24-2008, 02:40 PM
Another variant of the technique ashishdantu described is to connect the outMesh attribute of the new UV geo to the inMesh of the intermediate object, this transferring the whole shape with UVs and whatnot. That`s how I used to do it.
01-24-2008, 02:40 PM
This thread has been automatically closed as it remained inactive for 12 months. If you wish to continue the discussion, please create a new thread in the appropriate forum.
vBulletin v3.0.5, Copyright ©2000-2013, Jelsoft Enterprises Ltd.