View Full Version : How can you easily line up verices?


chlywly
11 November 2006, 01:30 AM
In lightwave you can select ALL vertices and do a line up command etc, which lines them ALL up either along the X/Y/Z axis... I want to do the same in maya, to make sure they are ALL straight and lined up (ie either for mirroring or for other needs)...

Someone told me I can only pick each one individually and turn SNAPPING on and try that, but thats insane, is there a script?

Kind of like snap align objects but for vertices only, or edges etc... ! please

kungfuelmosan
11 November 2006, 05:02 AM
I was looking for some allign scripts for a while - couldnt find anything - you can allways select all your verts bar one and v-snap align it (select all verts bar the one you want to allign to - hold down V and use your x/y/z handles to snap allign it to the next vert) - if that makes sense

acidream
11 November 2006, 05:46 AM
It's certainly not the easiest way, but I always just scale the verts down in the direction you want them to line up and eventually they'll be aligned.

yencaray
11 November 2006, 05:59 AM
I've actually found that holding down the V key on your keyboard which is the Snap to verts/points and then using your move manipulator and clicking the axes you want to align to and moving it will align it to a vertice on just that axis.

acidream
11 November 2006, 06:21 AM
Here is a link to a MEL script at Highend that will align verts to one axis:

http://www.highend3d.com/maya/downloads/mel_scripts/modeling/curve_tools/4097.html

Scott

faultymoose
11 November 2006, 06:56 AM
1. Select your vertices

2. Select the move tool

3. Open the tool settings (click the SHOW OR HIDE TOOL SETTINGS button above the channel box)

4. Set it to WORLD SPACE and turn off RETAIN COMPONENT SPACING.

5. Hold X to snap to grid, then grab one of the move handles and move it.

Voila.

acidream
11 November 2006, 07:12 AM
All these snap to the grid and vertices work great if you want to snap to the grid, but more times then not I will want the vertices the remain in place and average them to the center or to a certain vertex, if that makes any sense. That's why I posted the scale trick and the MEL script. Like everything in maya theres 10 different ways to go about it.

If your trying to align multiple vertices to a certain vertex I typically select all but the one I'm lining up to and hit insert and temporarily move the pivot to the vertex and scale them down. After your done the pivot returns to the original position. I don't really like having to move my line of verts back from the grid line to where I think they used to be.

alec.tron
11 November 2006, 09:01 AM
faultymoose allready mentioned the most intuitive way, but for completion's sake:
YOu could also use the Component editor and numerically alter the World Position of the selected vertices...

c.

acidream
11 November 2006, 09:11 AM
faultymoose allready mentioned the most intuitive way, but for completion's sake:
YOu could also use the Component editor and numerically alter the World Position of the selected vertices...

c.

I don't really agree that it's intuitive to move your components to another location just to snap them in a straight line and then have to move them back. If your trying to snap to a grid fine, but if not then it doesn't really make much sense. Not to mention having to change your viewport from the perspective view to an orthographic view just to snap to the grid, and if the grid is hidden then you have to turn the grid on in order to snap to it.

faultymoose
11 November 2006, 09:31 AM
SOLUTION:

5. Click an axis on the manipulator to constrain it. Hold C to snap to a curve/edge and middle-click the curve/edge.

or

5. Click an axis on the manipulator to constrain it. Hold V to snap to vertices and middle-click the vertice.


Voila.


P.S. From what I understood of the original question, the request was to snap to the central axis. Also, the grid doesn't need to be turned on to snap to it.

cpan
11 November 2006, 11:43 AM
when you're aligning by the usual xyz axis, most of the times you'll prefer the MMB move + V combo, else, when you'll need to align the comps by the the local axis or a custom axis (axis made by 2 points, face normal, etc), here's a newer version of the alignComps script :)

if you find bugs, have suggestions, don't hesitate to mail me

chlywly
11 November 2006, 03:26 PM
Thanks guys! I actually found a MEL that does exactly what I need...
(http://www.highend3d.com/maya/downloads/mel_scripts/modeling/misc/2256.html)

jclepev
11 November 2006, 06:42 PM
Actually i find the Component Editor as the fastest and easiest way to align points (and you can put a value in World Coordinates), when modeling hard surfaces, i just put the Component Editor window in a corner (and i do the same with the outliner)

Of course that there's the snap option
Hope it helps

CGTalk Moderation
11 November 2006, 06:42 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.


1