PDA

View Full Version : Trying to align vertices


polygonfreak
01-25-2011, 08:48 PM
http://i53.tinypic.com/2afii3m.gif
What I am trying to do is make the center vertices all uniform, so that the polygon is straight and is the same width at each vert. I think I saw a method for this a long time ago, but just can't remember. I tried planer and planer view... but that didn't work. Any advice would be such a big help.

luke
01-25-2011, 08:54 PM
do you mean like, select a row of verticies and align with each other?
select your row of verts and hit which ever X,Y,Z that corisponds to the angle you want in the graphite modeling tools
http://www.behindthecreation.com/site_uploads/image_2011_01_26_03_52_52.png

polygonfreak
01-25-2011, 09:22 PM
Luke, That is just what I was looking for... I guess the first time I tried that I selected the wrong verts or the wrong axes. Thanks for the help.

Stradigos
01-25-2011, 09:30 PM
You can also select multiple verts and scale them closer so they line up. It's the dirty approach.

Playdo
01-26-2011, 03:31 AM
Is there a way to select multiple vertices and move them to the same coordinates, without having to align them first? ie like an absolute mode transform type-in for 'Local' coordinates. Hopefully that makes sense :)

perna
01-27-2011, 03:29 AM
Meshtools has Flatten X/Y/Z.
http://www.scriptspot.com/3ds-max/scripts/meshtools-3-with-cspolytools

Maxscript doesn't support vertex scaling. Yeah, I know.

Mark Dygert
01-27-2011, 05:17 AM
The make planar XYZ tools are in edit poly also, no need for graphite modeling tools, there is so much redundancy between the two its retarded.

Remember that you can run that on edges too, which is great for flattening loops. too bad it doesn't work on rings like the flatten UV Tools do, where it operates only on connected edges meaning you can flatten a few rings without them being smashed absolutely to the same spot.

Playdo
01-28-2011, 06:29 AM
I know about make planar. I was hoping I'd missed a way to select a bunch of vert/edges and right click on the transform spinner to 0 them, instead of having to planar them first. I'd have thought it would work when set to local, but it doesn't.

Just looking for those little shortcuts :)

perna
01-28-2011, 07:17 AM
Playdo: I wouldn't call anything involving having to manipulate a spinner a "shortcut".

Here's a one-line barebones script to align all currently selected epoly verts to zero on the x-axis:

for i in (polyop.getvertselection $.baseobject) do(polyop.setvert $.baseobject i [0,(polyop.getvert $.baseobject i).y,(polyop.getvert $.baseobject i).z])

Playdo
01-28-2011, 07:26 AM
Thanks for the script Perna. I presume I'm right then that there isn't a Reference Coordinates System or setting that will move them all to the same coordinate :(

perna
01-28-2011, 07:35 AM
Playdo: I can help you if you describe what you want, but what you just said makes no sense to me.

Playdo
01-28-2011, 07:54 AM
:) ok, I'll try again:

Say I select a bunch of verts which all have different coordinates in the z-axis. I want to move these verts so they are in a straight line at 10cm on the z-axis. If I type in 10cm in the Z axis type-in box, it won't move each vert to 10cm on the z-axis, it will take the selection/pivot centre. So they need to be made planar first before typing in 10cm, so that all vertices end up at 10cm.

I would have thought that if the 'Local' Cordinate System was selected that it would move each vert to 10cm without having to make planar first.

Is that any clearer?

perna
01-28-2011, 08:18 AM
Playdo:
ok, check your current workflow here:

-click the shortcut for "make planar"
-click the type-in box
-press 1
-press 0
-press enter


.. there are so many operations here, so how is it going to make you any more efficient to have a mode that will set all verts absolutely instead of moving them relatively? You need a key to enable that mode anyay, so you're right back where you started.

You're really barking up the wrong tree as far as improving your efficiency goes.

The most efficient approach here, if working the way you do, is to have two type-in boxes.. one for each mode. I've made a script fox a box like that, but not for this reason.

When inspecting this closer - why would you want to move all verts to 10cm or any other position? The most common answer would be because you want to align them to existing verts at that position. In that case what you need is a copy/paste vertex position script, not some fancy type-in mode. Such a script is a MUST-HAVE no matter what, and I'm sure you can find ready-made solutions on scriptspot, preferably one that lets you paste in both modes.

Playdo
01-28-2011, 09:36 AM
The most efficient approach here, if working the way you do, is to have two type-in boxes.. one for each mode.

You made a script for a type in box that move objects to the same coordinate?

You're right, I'd still need to activate an absolute mode if I wasn't already in it.

This is such a minor thing anyway, but I'm curious.

perna
01-28-2011, 10:18 AM
You made a script for a type in box that move objects to the same coordinate?

Subobjects. It's an advanced dockable version of the standard max type-in that was originally written because the max one doesn't show up unless you simultaneously enable a bunch of other unnecessary ui elements. So the custom type-in can be used in expert mode, and has a lot more options.
It's straightforward to put together if you want to mess around with maxscript. Then again, yeah, it's not something you need for efficiency in the case you've described.

Playdo
01-28-2011, 12:30 PM
Ok, thanks for the info Perna

Bigjohn
01-28-2011, 12:52 PM
I must be missing something, cause it sounds like this is being ridiculously over-complicated.

If you have some verts that you want aligned vertically, all you'd do is select them, then hit Make Planar X. That's 1 operation.

If you want them to be vertical, but also have them at X-zero, you'd hit Make Planar X, then right click the X spinner at the bottom of the screen. That's 1 extra operation, 2 total.

I'm not sure what a maxscript could possibly cut out of that workflow. Unless I'm misunderstanding something, which seems likely.