Can you copy UV mapping to mirrored side?

Become a member of the CGSociety

Connect, Share, and Learn with our Large Growing CG Art Community. It's Free!

Thread Tools Search this Thread Display Modes
  05 May 2012
Can you copy UV mapping to mirrored side?

I have a helicopter model already beautifully unwrapped but I had to delete polygons on one and mirror the geometry as things needed to be fixed on the model, nothing has been changed on the part of the mirrored geometry but now I need to have the UV mapping from one part of the unmirrored side over to the other.

Is this possible in Maya? I just need to copy the UV map to the other identical side.
My life is one constant tweak, always trying to run before I walkcycle

Last edited by stoob : 05 May 2012 at 06:16 PM.
  05 May 2012
When you mirrored it, it should have retained the UV mapping it already had..., and in the exact same position and orientation in the UV viewer. Delete the one side again I guess and mirror it again.
  05 May 2012
Like a character, if you delete one side, make changes. and mirror it. You will still have to mirror the uv's. It would be nice if Maya respected uv's based upon its geo, but there is not an option for it.
.. Dont' worry, I'm sure they'll fix this in the next release.
  05 May 2012
I am still a bit confused, I need to have the mirrored UV (Decals on helicopter's letters are back to front? How do I reverse the UVs or is it a case of reversing the art made from the UV snapshot??

Sorry, very noob questions
My life is one constant tweak, always trying to run before I walkcycle
  05 May 2012
Well, if it flipped the UV's, then your texture seams wouldn't match up anymore. That's why by default it wouldn't flip it, because it doesn't usually make sense to. But when it comes to things like text or logo decals, then yeah it can be an issue. And thus such things are often applied secondarily in a shading network.

But anyways, if seams not matching up isn't an issue, after mirroring the geometry, merely select the UV shell for the mirrored portion, since you should have at least two UV shells, one for each side, but it will be hidden directly underneath the other (move UV shell tool, at the top left of the UV editor), and scale it along the X axis while holding down J. This will flip it over, so your text is no longer reversed on that side of the mesh.
  05 May 2012

They probably could add options for mirroring UVs when using the Mirror Geometry command, feature request it and see what happens.

In the meantime these two mel scripts should do the trick.

After running your Mirror Geometry command, select all the faces on the mirrored half of the object. Easiest way to do this would be make a rough selection in the viewport then go into the UV editor and go Select>Select Shell.

Once that's done, run this in the script editor...

string $getFaces[] = `ls -sl -fl`;

string $shellFaces[];
string $removeFaces[];
string $newFaces[];
clear $removeFaces;
clear $newFaces;
clear $shellFaces;

int $size = `size ($getFaces)`;

string $selectFace = $getFaces[0];

while ($size > 0)
	select $selectFace;
	string $shellFaces[] = `ls -sl -fl`;
	float $uvbb[] = `polyEvaluate -bc2`;
	polyEditUV -pivotU $uvbb[1] -scaleU -1;
	//change $uvbb[1] to $uvbb[0], $uvbb[2] or $uvbb[3] in the above line for flipping along -U, +V or -V axis.

	appendStringArray($removeFaces, $shellFaces, `size ($shellFaces)`);

	string $newFaces[] = stringArrayRemoveExact($removeFaces, $getFaces);

	$size = `size ($newFaces)`;

	$selectFace = $newFaces[0];
	clear $uvbb;

It should go through all the UV shells that you've selected and flip them along +U.

Once your happy with that, select either the object or if you want to be safe just select the UVs along the seams and run this...

polyMergeUV -d 0.01 -ch 1;

Edit the distance attribute on the polyMergeUV node until the seams are sewn up how you want it.
  05 May 2012
Excellent posts guys, thanks. I try this and the script at work tomorrow, this has helped loads.
My life is one constant tweak, always trying to run before I walkcycle
  05 May 2012
Thread automatically closed

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.
CGTalk Policy/Legalities
Note that as CGTalk Members, you agree to the terms and conditions of using this website.
Thread Closed share thread

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Society of Digital Artists

Powered by vBulletin
Copyright 2000 - 2006,
Jelsoft Enterprises Ltd.
Minimize Ads
Forum Jump

All times are GMT. The time now is 12:23 AM.

Powered by vBulletin
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.