Mirror vertices from one side to the other

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
Old 02 February 2005   #1
Mirror vertices from one side to the other

Hi I want to mirror my vertices from +X to -X.

I only want to model one side of the face and then copy that information over to the other side. I have tried to negativley duplicate it and all that but it doesent work well with blendshapes, I guess the vertexID gets messed up?

I can get the world posistion using : pointPosition

But I cant figure out(have no brain) how to get that information over to the negative side to the correct vertex....

Is there away or is there perhaps a smarter solution out there??


Last edited by pigbelly : 02 February 2005 at 09:33 AM.
Old 02 February 2005   #2
I've been meaning to get around to working this out myself too.

Here's a bit of code I clipped from one of my old commands that I thought might be related...
Quote: // Procedure flipVert is designed to change the value of one vertex location in X, Y, or Z space
// from positive to negative, or from negative to positive. This will later be used to compare
// with other vertex locations on the target side of the object, to determine which corresponding
// vertex has the closest location.
proc float[] flipVert(float $targetVertName[], string $axis)
float $flippedVert[3] = $targetVertName;
case "YZ":
$flippedVert[0] = $flippedVert[0] * -1;
case "XZ":
$flippedVert[1] = $flippedVert[0] * -1;
case "XY":
$flippedVert[2] = $flippedVert[0] * -1;

But basically, you'd have to break each vert in the geometry into either a positive or negative group, based upon it's X, Y, or Z position (using whichever axis you wish to mirror over,) and use this to query and store the position of each vert in both positive and negative groups... then switch these values across the axis to be flipped.

...This is just what I've been thinking in my head. I have another script for splitting the verts into pos and neg groups as well, I do believe...
Old 02 February 2005   #3

but how dose maya know which vertex to move?

and how do i assign
loat $targetVertName[], string $axis

I'm really a beginner in Mel....so dont be suprised by the stupid Q's


Old 02 February 2006   #4
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 05:16 AM.

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