Jump to content

Aligning


mskin
 Share

Recommended Posts

there is a x-tree creation plug in ( i cant remember the name of it) that has neat feature. after you have placed all of your trees (on the same plane) there is an option to "plant" your trees. it plops all the trees on to your terrain model perfectly.

 

of course, this only works on their trees and not others... but there must be away.

Link to comment
Share on other sites

Hi

If you need to create, merge or import objects on the surface of other objects then AutoGrid is a good choice, because it lets you automatically create objects by generating and activating a temporary construction plane based on normals of the face that you click. This serves as a more efficient way of stacking objects as you create them, rather than building objects and then aligning them.

Best regards.

Mihai

Link to comment
Share on other sites

Beware the glue-tool. It can be very handy and all of a sudden, very weird. It sometimes messes with the display properties of a file and the graphics driver has problems with recognizing face normals.

But if its having a good day, its great!

 

Nisus, do you know where one could download the move to surface script?

Link to comment
Share on other sites

not gonna read through all the posts, i just scanned and it seems you still don't have an awnser.

 

well, until now. you do this by using the normal align (check the image)

 

first pick the object (well, the face that should be aligned) , you'll get a blue arrow, then pick the face it should be aligned to (green arrow). the two arrows will be the same points.

 

ps, keep the mouse button in to see where you want the arrow to be

Link to comment
Share on other sites

Nisus, do you know where one could download the move to surface script?

 

download??? it should be in your max already ,-)

 

gonna do a search...

 

 

not gonna read through all the posts, i just scanned and it seems you still don't have an awnser. well, until now.

 

**"çe"yeh"e--WHAT?--"é"é§!?é"çè"é§**

 

 

nisus

Link to comment
Share on other sites

For a couple hundred objects, I would use the "glue" plugin from itoosoft. It's meant primarily for splines, but works with meshes also. If it's the same thing as referenced above (glue 3d) Iv'e never had any problems with it.

 

As far as normal align goes, it's great for several objects, but not for several hundred. Way too time consuming.

Link to comment
Share on other sites

Here is the original script... it IS in the help files... (Maxscript reference)

 

Because I think most people are NOT familiar with implementing maxscripts... here is a small description how to do it...

 

1) copy the script in a *.txt file and call it 'a name'.mcr

2) place it in your scripts startup directory

3) restart max

 

The macroScript will be called MoveToSurface. To use the script, you can go to Customize... and drag the script from the category "HowTo" to a toolbar, a menu, a quad menu or assign to a keyboard shortcut.

 

For a description how to use it: see my above post...

 

and here is the script...

 

macroscript MoveToSurface category:"HowTo"

(

fn g_filter o = superclassof o == Geometryclass

fn find_intersection z_node node_to_z =

(

local testRay = ray node_to_z.pos [0,0,-1]

local nodeMaxZ = z_node.max.z

testRay.pos.z = nodeMaxZ + 0.0001 * abs nodeMaxZ

intersectRay z_node testRay

)

on isEnabled return selection.count > 0

on Execute do

(

target_mesh = pickObject message:"Pick Target Surface:" filter:g_filter

if isValidNode target_mesh then

(

undo "MoveToSurface" on

(

for i in selection do

(

int_point = find_intersection target_mesh i

if int_point != undefined then i.pos = int_point.pos

)--end i loop

)--end undo

)--end if

)--end execute

)--end script

If it doesn't work... RTFM...

 

(ow hell... and who got busted because he said RTFM a while ago... told you... it IS in there... a tremendous amount of information VERY well documented... moeha!)

rgds,

nisus

Link to comment
Share on other sites

Yes, I agree... but I have also read the original post well...

 

i want to drop a tree onto an irregular terrain - a couple of hundred times.

 

it says: TREES --> no rotation, stand up vertical

and COUPLE OF HUNDRED TIMES --> I don't wanna do that manually! (Got a few hours? Sure not, I wanna go home tonight...)

 

I recommend the script

 

rgds,

 

nisus

Link to comment
Share on other sites

Just to make it clear: it is NOT my script, I happen to have found it somewhere in the superb manuals ,-)

 

(I myself DID make a more advanced script though: a real database-driven objectpainter in a 'click-an-asset' style with advanced options like placements on terrains and levels, random rotations etc. Have it since max3, now finally re-written for max9... but NO it's not publically available...)

 

rgds,

 

nisus

Link to comment
Share on other sites

  • 6 months later...

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...