Move To Surface

23 votes

The following will let the user move objects along their Z axis to fit a specified surface. Such a script can be used to automatically plant trees, poles etc. on the ground.

This script is straight out of the 3ds Max MAXScript reference file. Its part of the MAXScript 'How To' lessons that teaches how to use MAXScript with practical problems. Load your MAXScript reference (the one that ships with 3ds Max) and do a search for 'align surface' and it'll be the first result.

I did not write this script I merely copied the code here as aligning to a surface is a very common request. Make sure to read the other 'How To' tutorials in the 3ds Max MAXScript reference - they're all really good!

Additional Info: 

To install go to MAXScript / Run Script and select this file. Now go to Customize / Customize User Interface and you'll find the script in the 'How To' category on the left. Add it to a menu bar, assign a shortcut, whatever you want.

To use, select all your objects you want to align, run the script then select the object to align to and voila they align!

Video URL: 
AttachmentSize
MoveToSurface.mcr889 bytes

Comments

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
martincg's picture

thank you - very usefull

thank you - very usefull script - i think it is much faster with lots of objects than scripted-glu

Admin's picture

Here's another script that

Here's another script that does all this and more. Its called 'Scripted Glue' by Andrei Kletskov and enables you to specify the axis you want to glue to and even glue along a specific vector. Check it out at http://www.scriptspot.com/3ds-max/scripted-glue

Christopher Grant
Admin, ScriptSpot.com

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.