View Full Version : [MaxScript] Sub-object pivot
Funky Bunnies
04-06-2011, 01:18 AM
Heyo all,
There may already be an easy way to do something like this but I made a maxscript for using on my brawl entry. Lemme know if you've got a better way though :)
I've been working on a little sub-d stuff for the first time in a while in 3ds max and one thing that bugged me a lot was trying to set a temporary pivot to align to certain sub-objects.
So I made this script called 'FB Sub-obj Pivot (http://www.funkybunnies3d.com/tools.php#fbsubobjpivot)' which allows you to select a single component on a mesh or poly object and toggle a working pivot onto it. [or alter the object's pivot]
http://www.funkybunnies3d.com/tools/3dsmax/FBsubobjpivot1.gif
http://www.funkybunnies3d.com/tools/3dsmax/FBsubobjpivot2.jpg
The script is pretty quick-n-dirty and makes lots of unnecessary assumptions :S but I could do more adaptive math whenever i have more time. I figured I'd post it in the meantime if anyone might have use for it :)
-----------------------------
installing macroscripts
-----------------------------
macroscripts or .mcr files should go in ...Program Files/Autodesk/3dsmax20XX/ui/macroscripts/
then restart 3ds max and it'll be available as a hotkey, toolbar button, or quad menu item in Customize->Customize User Interface
fearian
04-06-2011, 01:22 AM
Jesus the number of times I have been messing with pivot settings wishing for something like this! Cheers, I'll give it a run today and let you know how I find it!
CompanionCube
04-06-2011, 04:57 AM
thank you !
Nice! I've wanted something like this in max so often, next time I go back to working with max I'll definitely give this a try.
dtschultz
04-06-2011, 05:21 AM
That's sweet, man. There was an older thread where Bryan Cavett made one similar to this based on Modo's element action center. I have it set to a quad where I can select a subobject, hit "ActionCenter On" and it aligns the pivot to the selected suboject. Then I can go back to my quad and hit "ActionCenter Off" and it goes back to normal pivot mode. http://www.polycount.com/forum/showthread.php?t=65821&highlight=modo+element
renderhjs
04-06-2011, 05:35 AM
very nice idea and execution, this calls for a tiny maxscripts must have thread (tiny as in small things without UI but very powerful)
SimonT
04-06-2011, 05:38 AM
Sounds awesome. Shame that 3Ds Max is missing functions like that!
Bryan Cavett
04-06-2011, 06:45 AM
Nice Funky Bunnies... I'll have to give it a shot as there are some bugs in the one I made.
BeatKitano
04-06-2011, 07:20 AM
One of the many thing that in 2011 I still don't understand: Why not a native function ffs...
Thanks for sharing !
PatJS
04-06-2011, 08:57 AM
yussssssss
Thanks so much, this script is excellent!
Mark Dygert
04-06-2011, 09:41 AM
Lovely, I'll have to give it a spin in a bit!
Girando
04-06-2011, 02:00 PM
Yea!!! you the man :) Thx
Funky Bunnies
04-07-2011, 01:09 PM
whoa thanks a ton dudes!
ohh I'll give yours a shot Bryan, thanks for linking dtschultz
now I'm embarrassed for not having more advanced math and strange assumptions haha
I'll have to update it closer to the end of brawl or something :)
MattLichy
04-07-2011, 08:27 PM
I've had something like this in my toolbar for months, if not a year, but Its not as good as yours :).
Nice job dude
SimonT
04-08-2011, 12:27 AM
Tried it, it's really cool!
fearian
04-13-2011, 09:56 PM
Very nice script, been using it all day with few problems.
One issue that's a real pain in the arse is that it breaks down whenever snap is turned on. It aligns the pivot fine, but when I move a vert or something, it moves exponentially more than my mouse, so that while my mouse is snapped to a point, the vert is off in the distance doing its own thing!
Anyway, I still love it! Hope you find time to polish it off! Cheers!
Ace-Angel
04-14-2011, 12:00 AM
I love you...also, have been getting fearians issues, but not too much. It feels like the movement after the snap of the vertice is about 1.25 faster then my mouse.
Still, I can manage, thanks again!
Funky Bunnies
04-14-2011, 12:17 AM
hey guys, thanks :D
I think your issues may be out of my control though. I think that's just the way max's 3d snaps work. If you're using a particular axis I think it tries to take your start-cursor distance as the offset if it can't find something to snap to. So you might either have to change the snap type or try different settings in the Options tab
But I'm not sure, I haven't done any digging yet. Could you guys provide an example of what exactly you're trying to do next time you run into a problem? (and max version, 3d snap removed 1 option in max 2011+)
Ace-Angel
04-14-2011, 12:30 AM
hey guys, thanks :D
I think your issues may be out of my control though. I think that's just the way max's 3d snaps work. If you're using a particular axis I think it tries to take your start-cursor distance as the offset if it can't find something to snap to. So you might either have to change the snap type or try different settings in the Options tab
But I'm not sure, I haven't done any digging yet. Could you guys provide an example of what exactly you're trying to do next time you run into a problem? (and max version, 3d snap removed 1 option in max 2011+)
As soon as I get some downtime, I'll do the hell out of this script. Also, what do you mean a particular axis?
Funky Bunnies
04-14-2011, 11:05 AM
oh i just meant if you were sliding along the X, Y, or Z axis since you're grabbing the handle maybe it's interpreting that offset between the gizmo handle vs. the vert as the centerpoint of the operation until it can find something to snap to
AnimeAngel
04-14-2011, 11:15 AM
looks very useful, will have to give it a go. thanks
dustinbrown
04-14-2011, 03:57 PM
This is awesome, thanks Chris! In the past what I've done is:
- create a dummy
- normal align it to a polygon (this gives me a reference vector)
- then align the pivot of the object to the dummy so can I can use Parent transforms to translate sub-objects in the direction I want.
What a pain that was!
vBulletin® v3.8.4, Copyright ©2000-2013, Jelsoft Enterprises Ltd.