Home Technical Talk

MODO - snapping item center to selected vertex

Tzur_H
polycounter lvl 9
Offline / Send Message
Tzur_H polycounter lvl 9
Hey guys,

I'm working on a modular environment right now, and from what I heard, if you export as FBX to UE4, UE4 will import the mesh with pivot under item center location (right? :D)

Anyway, when I go into center mode (7), hit W for move tool, click on the center gizmo to move it around, I can't use snap to vertices. Is there any way (maybe a script?) to select a vertex and tell MODO to move the item center there?

Replies

  • Beard3D Bandit
    Options
    Offline / Send Message
    Beard3D Bandit polycounter lvl 7
    Are you trying to center and entire piece by using the Move Gizmo, by using the snapping option?

    Is that what you mean? :D For e.g You have a cylinder with a collapsed floor ( all verts merge to a single point) and you want to center that entire object, by snap moving using the gizmo along the X+Z axis.

    I've been modelling all night, so my brain is potato sauce now. Wait, can you get potato sauce? I could do with some potato sauce.
  • Tzur_H
    Options
    Offline / Send Message
    Tzur_H polycounter lvl 9
    I'm trying to snap the item center gizmo (when you hit 7 on keyboard) to a certain vertex, but it doesn't work.

    Again, I've heard it works for exporting into UE4 instead of positioning the mesh where you want the pivot to be on 0,0,0 in MODO and then export - just saves a lot of time in my opinion but setting the item center pivot is a bitch process lol.
  • Bek
    Options
    Offline / Send Message
    Bek interpolator
    Shouldn't be any difficulties, you just need snapping enabled (with vertex mode on). Sometimes this can be problematic because modo likes to swap from vertex mode back to geometry when you change your tool or drop your selection. (that's with 701 era snapping anyway). The only other thing I can think of is maybe check that "active" or "both" is enable in snapping preferences and not "background". There might also be a simple way to take your center selection and move it to a selected vert (like doing a vert -> join -> move first selected to second) which would bypass the need to use the move tool / drag it across the screen at all. Maybe someone (seneca probably) has a script for that already?

    With 901 era snapping you might have the problem that the background constraint tool is in your pipeline (it got moved from the snapping pallet) and it LOVES to enable handle constraint for like, no reason (which will mess with snapping something horrid). So if snapping appears totally broken (like your mesh will only snap on certain areas of the screen) that's probably what's up.
  • Tzur_H
    Options
    Offline / Send Message
    Tzur_H polycounter lvl 9
    Hey Bek, I'm on 901, latest SP. Using Eterea snapping bar, no BG constraint, and only snapping to vertices is toggled.

    I did notice it's working in the orthographic views but not in the perspective view - do you have this issue as well? Know how to fix it?
  • Bek
    Options
    Offline / Send Message
    Bek interpolator
    Dunno; it kinda works for me but even though grid snapping is unchecked it still snaps to the grid, and snapping to verts fights with this (and you can only move the center in 1 or 2 dimensions even in perspective anyway it seems so don't bother). A way to select a vertex and run a script "move center here" would be the best way for this to be done. If that doesn't already exist it should definitely become a thing.
  • Bek
    Options
    Offline / Send Message
    Bek interpolator
    Okay so I took a stab at scripting it and I've the bare-bones working. You select a vert, fire the script, and it moves the center to that selection. If you want I can send you what I've got now, or you can wait a bit for me to polish it (currently you need to have the center manually selected, which is lame).
  • repete
    Options
    Offline / Send Message
    repete polycounter lvl 6
    They messed up vertex snapping in 901 as it was flawless in 801. Anyway here is a script I wrote for snapping the center to any selected vert.

    https://www.dropbox.com/s/hknbo7o71xrcd4u/Set_Center_2_Vert.zip?dl=0

    Just select a vert and run the script :poly121:

    cheers
  • Farfarer
    Options
    Offline / Send Message
    This will do similar - set the centre of the current mesh to the middle of the current selection (any element type). Works for all layers or layer at a time.

    http://community.thefoundry.co.uk/discussion/topic.aspx?f=37&t=108247
  • Tzur_H
    Options
    Offline / Send Message
    Tzur_H polycounter lvl 9
    Awesome guys! Thank you so much! :thumbup::thumbup:
  • Bek
    Options
    Offline / Send Message
    Bek interpolator
    Hah I knew this already had to be a thing...

    Interesting approach with the workplane repete, though it'd be cool if it saved your active workplate before changing/resetting. I used the "center.setPosition xyz" command in what I had; which has the benefit of not messing with the workplane in the 0.001% of times that would matter. Though I still had to figure out how to make the center selected (here's where I got up to if you're interested).

    Farfarer's version blows ours out of the water though :P
  • WarrenM
    Options
    Offline / Send Message
    James' scripts for this are AWESOME. I use them almost daily. I have them backed up several times as I won't be able to live without them if something bad happens. :)
Sign In or Register to comment.