Home Technical Talk

A better way of aligning an edge/vertex on a certain axis in 3d max?

polycounter lvl 11
Offline / Send Message
Yozora polycounter lvl 11
Every so often I find myself copying the X, Y or Z coordinates for certain edges/vertices and then selecting other edges/vertices and then pasting the copied coordinates into the field.
For example this sometimes happens when I create a separate object and I want the bottom faces to be sitting on top of the top faces of an existing object.

Or sometimes I extrude things around the shape of an object, but the extrude does this rounded edge thingy and I dont want it to do that;

bla.jpg

So I literally select the "straight" edges, copy their X, Y or Z coords and paste it for every bent edge... Of course I dont do this everytime I extrude stuff around a mesh, especially if its a high poly that is gonna end up being subdivided anyway.

I was thinking maybe theres an easier way/script like the align tool but for components instead?

Occasionally the 4 make-planar tools do the job, it would be nice if the make-planar tools recognized which vertex was selected last so that it makes the plane the same position as the last vertex/edge, instead of averaging the 2 selected vertices/edges.

Also snapping isnt always desirable, because I mostly do this for floating geometry where theres nothing to really snap to~



On a totally unrelated note; does anyone know how to make a macro for "editable poly relax dialogue"? 3d max listener isnt very helpful, just gives me a $.EditablePoly.Relax () which is only the actual relaxing part of the function not the dialogue popup :/ Why is there hotkeys for every tool except this one anyway?

Replies

  • Bryan Cavett
    Offline / Send Message
    Bryan Cavett polycounter lvl 19
    I wrote this script awhile back to align verts in a straightline. It doesnt use the average position as the plane it use the verts on the outer edges of the selection and projects the middle verts onto the line connecting the first and last vert. Just select a row of verts and run the script. You dont need to select them in any particular order.

    http://www.bryancavett.com/maxscripts/alignVerts.ms


    This method would still take some time to fix up your current situation but its all I have online at the moment.

    align_verts.gif
  • TheBat
    Offline / Send Message
    TheBat polycounter lvl 10
    Interesting script, i'll get it and see if i can put it to use. mostly, when it's just one vert i do it by hand just using vertex snapping and an axis constraint, but as you already mentioned it's not always an option.

    Thanks for the tip on the script.
  • SyncViewS
    Offline / Send Message
    SyncViewS polycounter lvl 13
    Hi Yozora, about first question I have to say: hang in there. I already coded a new "flatten along axis/normal with selected vertex position reference" (well the tool should be named something like AxisAlign :) It is included in IllusionCatalyst.Shape 2.0 and will be released soon, for free. (see the signature)

    About second unrelated question, here is the script to access Relax dialog from every sub-selection level in EditablePoly and EditPolyModifier. It is undocumented in the MaxScript Reference too :/
    Evaluate once and find the command in customization under IllusionCatalyst Tools.
    macroScript RelaxWithDialog
    category:"IllusionCatalyst Tools"
    buttonText:"Relax with Dialog (Poly)"
    toolTip:"Relax with Dialog (Poly)"
    (
        on isEnabled do
            return Filters.Is_EPoly()
    
        on isVisible do
            return Filters.Is_EPoly()
    
        on isChecked do
            return false
    
        on execute do
        (
            try
            (
                if (subObjectLevel == undefined) then
                (
                    Max Modify Mode
                )
                else
                (
                    local theItem = Filters.GetModOrObj()
                    theItem.popupDialog #Relax
                )
            )
            catch
            (
                messageBox "Operation Failed" title:"Poly Editing"
            )
        )
    )
    
  • Yozora
    Offline / Send Message
    Yozora polycounter lvl 11
    thanks for sharing your script bryan, although I dont think I run into that kind of situation that often, but I'll try it out anyway :p

    ooh that sounds good syncview, can't wait for the new release!
    Thanks for the relax dialogue script, works fine :)
  • Turoid
    Offline / Send Message
    Turoid polycounter lvl 17
    I'm also looking for a script like yozora explains in the first post. In maya, when you hold down the 'v' button and move a vertex (on one axis). It automatically aligns if you drag the mouse over another vertex in the scene.
    A little hard for me to explain, but it does what yozora wants in max ;)
  • SyncViewS
    Offline / Send Message
    SyncViewS polycounter lvl 13
    If you need to align a single vertex to another one along one axis you can already do it in Max by enabling 3d Snap, in its options (right click on Snap button in main toolbar and choose panel options) make sure all checks in Translation sections are on, then select your vertex and drag it by grabbing the axis, over the target vertex.

    I hope it is clear enough... Anyway this work for each single vertex, quite annoying.

    (shameless tease: just wait a little longer for IC.Shape 2 :)
  • Turoid
    Offline / Send Message
    Turoid polycounter lvl 17
    Thaanks! Oh man.. that I never looked into that snap menu any further.. This is just what I need.
    I hope it is clear enough... Anyway this work for each single vertex, quite annoying.

    It works fine for me with multiple selected verts :)
  • SyncViewS
    Offline / Send Message
    SyncViewS polycounter lvl 13
    It shifts the whole selection, but don't flatten it on the plane perpendicular to shifting axis, therefore if you want to align an array of vertexes, you need to drag them one by one. That's tedious :)
  • Krypteia
    A small hijack, cause this pretty much deals with what I'm looking for:

    I'm using Maya, and in the UV editor there are buttons to align UVs - i.e Align to Farthest Right, Farthest Left, etc.

    I was wondering if there was a way to do that with vertices in the orthographic views? Basically I want to be able to select two or more points, hit a button like Align to the Farthest Right or Down, etc. and have them make a straight line.

    It looks like that script Bryan posted does what I want, but is there a Maya version of it?

    I know about the "v" key, but wanted something like the UV editor's align options.

    Or if anyone knows of any other aligning tools for vertices, please share! :-)
  • Sage
    Offline / Send Message
    Sage polycounter lvl 19
    I just use view align in max when I have to align verts, faces etc. I have it to a short cut and select the viewport where I want the verts to be aligned in. If I need them aligned in top view I select that and hit the view align short cut. It seems fast enough for me. Bryan script looks cool though.
  • Mark Dygert
    The script(s) look promising I'll have to check them out. I've always done like sage but instead of align view I use make planar XYZ.

    If I need it to line up with something in particular then in polygon mode I turn on 3D snaps,set it to vert, and grab the corner vert and drag it to the other corner and weld.
  • SyncViewS
    Offline / Send Message
    SyncViewS polycounter lvl 13
    I'd like to give a bit of substance to my teasing with this little preview of a new tool included in IC.Shape 2.0. I hope you like it.

    AxisAlignToVert.gif
  • Bryan Cavett
    Offline / Send Message
    Bryan Cavett polycounter lvl 19
    IC.Shape 2.0 is looking promising SyncViewS.
  • gannonroader
    Offline / Send Message
    gannonroader polycounter lvl 8
    select the verts, then select the viewport that they lie flat in. Then select "view align". Works great. You can also copy the coordinates from another vert, and paste it onto yours.
  • airbrush
    Offline / Send Message
    airbrush polycounter lvl 13
    Krypteia wrote: »
    A small hijack, cause this pretty much deals with what I'm looking for:

    I'm using Maya, and in the UV editor there are buttons to align UVs - i.e Align to Farthest Right, Farthest Left, etc.

    I was wondering if there was a way to do that with vertices in the orthographic views? Basically I want to be able to select two or more points, hit a button like Align to the Farthest Right or Down, etc. and have them make a straight line.

    It looks like that script Bryan posted does what I want, but is there a Maya version of it?

    I know about the "v" key, but wanted something like the UV editor's align options.

    Or if anyone knows of any other aligning tools for vertices, please share! :-)


    Also looking for a simplified vertex aligning script for max 2011... a small gui that aligns selected verts min/max/average, toggles for x/y/z
    ...i had one like this for maya was very useful.
  • Progg
    Offline / Send Message
    Progg polycounter lvl 11
    I thought there was an align gui in Max.. atleast in 2011 I have one. Little flash style popout attached to the top of the viewport.
  • airbrush
    Offline / Send Message
    airbrush polycounter lvl 13
    Something like this...

    VertexAlign.jpg
  • airbrush
    Offline / Send Message
    airbrush polycounter lvl 13
    Any max scripters out there that can do something like this...?
  • MattLichy
    ^
    Don't think that would be too hard to do.

    I might make it if someone else hasn't or doesn't want to.

    What does Buffer Height do?
  • airbrush
    Offline / Send Message
    airbrush polycounter lvl 13
    MattLichy wrote: »
    ^
    Don't think that would be too hard to do.

    I might make it if someone else hasn't or doesn't want to.

    What does Buffer Height do?

    I've searched creative crash and scriptspot for something like this for max, but no luck.

    Here is a link to the maya script and description/example gifs

    http://www.creativecrash.com/maya/downloads/scripts-plugins/utility-external/misc/c/vertex-align-tools-corner-align

    I used this all the time, was so much more convenient than snapping or aligning manually...click/done
  • pior
    Online / Send Message
    pior grand marshal polycounter
    VertexPlacer from the Blur script pack might help you a bit. Its not doing all yo want but it is still a great help. Keep us posted!
  • airbrush
    Offline / Send Message
    airbrush polycounter lvl 13
    pior wrote: »
    VertexPlacer from the Blur script pack might help you a bit. Its not doing all yo want but it is still a great help. Keep us posted!

    Tried it, doesn't have the functionality i want. Basically just does make planar or align to global position.

    Anyone, want to give a go at the script I mentioned below?
  • airbrush
    Offline / Send Message
    airbrush polycounter lvl 13
    MattLichy wrote: »
    ^
    Don't think that would be too hard to do.

    I might make it if someone else hasn't or doesn't want to.

    What does Buffer Height do?

    You up for scripting it?...looks like it doesn't exist yet for max.
    Much appreciated
  • MattLichy
    I looked at the example gifs, which was something diff than I had in my head.

    But... it seems like it would be something like checking each verts pos and moving it along an axis and seeing if it intersects with another vert, and it so, stop moving.

    I can poke around and maybe try some simple stuff, but I can't guarantee anything... heh...

    Render or Sync have alot better grip on this stuff than me.
  • airbrush
    Offline / Send Message
    airbrush polycounter lvl 13
    MattLichy wrote: »
    I looked at the example gifs, which was something diff than I had in my head.

    But... it seems like it would be something like checking each verts pos and moving it along an axis and seeing if it intersects with another vert, and it so, stop moving.

    I can poke around and maybe try some simple stuff, but I can't guarantee anything... heh...

    Render or Sync have alot better grip on this stuff than me.

    the corner feature is nice although I rarely used it, the min/max/average x/y/z are the most useful, a great little time saver.
  • yiannisk
    Offline / Send Message
    yiannisk polycounter lvl 7
    I remember in the past there were scripts in max that were doing exactly that. also even distribution etc. I was using one quite a bit.

    unfortunately i do not remember the name. it's been too long. but i remember a friend using it in 3dsmax9 last time i saw it.

    you can use make planar in a certain axis but this will align them by averaging distance between them all.
  • airbrush
    Offline / Send Message
    airbrush polycounter lvl 13
    After some more google searching I found this one which has the basic min max align I was after.

    http://www.studiosyntax.net/maxscript.html
  • airbrush
    Offline / Send Message
    airbrush polycounter lvl 13
    Anyone want to take a stab at doing a gui version like the one i posted earlier.

    After using the previous script I found some things that weren't desirable. When you have verts that are just slightly off and you want to align them, the handles are scaled based on the selection it seems...so if they're off just a hair and you want to straighten them out, the handles to align are not easily selectable or visible.

    Or if someone could modify the script so the handles are always a set size that would be great too...
  • airbrush
    Offline / Send Message
    airbrush polycounter lvl 13
    Tried contacting the owner of the script, just kept getting bounced emails.

    A call out to our scripter's on the forum...can anyone modify the script as per my previous response?
  • Ricky
    Offline / Send Message
    Ricky polycounter lvl 12
    SyncViewS said:
    If you need to align a single vertex to another one along one axis you can already do it in Max by enabling 3d Snap, in its options (right click on Snap button in main toolbar and choose panel options) make sure all checks in Translation sections are on, then select your vertex and drag it by grabbing the axis, over the target vertex.

    I hope it is clear enough... Anyway this work for each single vertex, quite annoying.

    (shameless tease: just wait a little longer for IC.Shape 2 :)
    Thank You! Copying and pasting the translation numbers for each vert like I was originally taught at work as a nightmare coming from Maya's easy 'hold v' snap. <3
Sign In or Register to comment.