Home Technical Talk

3ds max snapping scripts?

I have trouble snapping vertices or edges inside max.
It's glitchy sometimes the markers disappear and sometimes it freezes.

Very hard for me to snap a vertex on gridpoint, cause 1 out of 3 times it won't snap accurately.

Making life hard when geometry has to tile.


Does anyone know any scripts that can perform snaps like in maya?

in maya i can like hold the button X and vertices snap like they should.

Replies

  • glib
    The biggest difference coming from maya that I found is that there's no middle-button dragging. In maya you need to grab your vert, hold x and middle-click drag in the general vicinity of a gridpoint, and your vert will snap there. In max, you grab your verts, pick which one you want to snap to a grid point and click drag it to that gridpoint.

    It's different, but you'll get used to it if you give it a chance.
  • Jet_Pilot
    Offline / Send Message
    Jet_Pilot polycounter lvl 10
    go into your snap settings and make sure only Grid points ans vertex are checked... now when you want to snap the vertex try and grab IT not the gizmo. also i like to turn on axis-constraints and snap to frozen objects in the next window over in options..

    this should give you a little more control with less things for it to accidentally snap to
  • Mark Dygert
    Make sure 3D snap active, not 2D or 2.5. Right click it and go to the options tab and check on "Use Axis Center As Start Snap Point". Why they have the default set to off I'll never know... screws everyone up the first time they try to use it.
  • renderhjs
    Offline / Send Message
    renderhjs sublime tool
    if it helps I have somewhere a unit-snap script I wrote for a game engine. The script snaps vertex points indivdual (not offset or as a group - it processes each vertex individual) on a typical internal grid (not the max grid).
    E.g if you model prefabs for unreal, source,quake,... the editor and engine usually work on a grid like 4,8 or 16 units each. This makes sure that the prefabs fit perfectly when placing them in the editor.

    Individual sets like just x,y,z / x,y / y / x or just z lets you snap verts to a exact (later in the editor/engine) grid unit. The special thing that it calculates to which grid line it would be the closest and the place it on that grid unit/line - where as the max snapping system usually moves things in a realativ manner- so once you are off- grid you have to manually type in grid unit.

    Here is a screenshot:
    ms_engine_editing_tools.gif
    I would have to modify it though as this one was a tool for a project that is still in production. I was at some point thinking of creating a set of engine/low poly modeling specifc help tools like this.
  • nubnub
    Thanks for the support, everything works great now.

    thanks again
  • Neox
    Offline / Send Message
    Neox godlike master sticky
    Yeah necropost

    i have a somewhat similar yet different task to do. i'm currently working for a client who outsourced a lot of assets to another company, don't want to rant or something but the work is somewhat messy and i'm cleaning up some thing, finishing assets etc.
    What i right now would need is a script that allows me to snap vertices from one object to the closest vertices on another object. i have a hand it's twisted in space i can get it rotated somewhat close to the original hand but not entirely the same, but i would need that to happen, of course i can go through it vertex by vertex and snapping it but maybe there is an automatic solution.

    oh and shrink, grow or conform wrapping is not what i need, i changed only a few things and i'd like snap anything else exactly to the new positions
  • renderhjs
    Offline / Send Message
    renderhjs sublime tool
    Neox wrote: »
    ...What i right now would need is a script that allows me to snap vertices from one object to the closest vertices on another object...
    What it would need is some algorithm that analyses booth models and find a match in the topology (so it knows which area represents which area in the other model). But this is rather hard to script (I know because I tried it for TexTools - aligning shells on existing ones).

    Some of the ideas I had were to create a unique hash value for each vert based on: vertex normal, number of sharing faces or edges and the length of each of the edges connecting to the other verts.
    Based on that one could build a heuristic model and predict with a certain probability which vert might be the closest match of the other one from model B.

    Anyway: I think if the existing models were mostly build tightly on some grid or set of rules that can be defined in scripts as well it would be a lot easier.
    I use snapping scripts all the time when I build prefabs. That way I can snap them back like in Unity with my custom snapping scripts as well and all the verts connect tight where they should (or I can control some bleeding in the scripts).
  • Neox
    Offline / Send Message
    Neox godlike master sticky
    i guess in my case it would "just" (no clue if thats even possible) need both meshes merged into one taking a vertex and snapping that onto the next vertex inside a radius which is in no way connected to the element that said vertex is from. in the end i snapped all 1200 vertices by hand and just projected the changed topology.
Sign In or Register to comment.