Home Technical Talk

3ds max - Align multiple objects to a certain array of objects... PLEASE HELP

Hey there!

First of all, I searched for my problem but couldn't find any matching threads. Sorry if I missed the right thread. My boss came to me and asked me to find a solution for a problem we're facing at work.

It's about aligning multiple Planes to an array out of Planes (in this case leaves of a 3D-tree). I already tried using the align and normal align tool as well as the morpher modifier. I grouped the planes and tried again, but didn't get the result.

Maybe there is no other way and I need to write a script, but even if you check all options for the MacroReader, the listener still doesn't show every executed action. Now, I hope I can find some help here and my Problem is clear for everyone.

Thanks in advance and sorry for my english.
Greetings from Germany!

Replies

  • Mark Dygert
    Options
    Offline / Send Message
    So you have a tree full of planes and you want to replace the planes with other planes?
    I'm guessing because the original planes where not UV mapped and you want to unwrap new planes and replace the old?

    If that's the case, you could probably unwrap the planes with the "UVW Map" modifier (not the same as UVW Unwrap) and use the "face" option.

    You might want to check out SoulBurn's scripts. I seem to remember he has a few scripts for dealing with similar things.

    It wouldn't be too hard to script what you're looking to do, if everything is separate objects and their pivots all match, you could just build two arrays and use a for loop.

    Like Perna said, your message is pretty cryptic I'm not sure what the problem is or if there is a better way to solve it, some more info would be helpful.

    Without knowing more about the objects it's hard to say how to build the arrays and process them with maxscript, but it is possible to move one array of object to another.

    The code might look something like this:
    OldObjArray = #($Plane001,$Plane002,$Plane003)--List of the OLD objects 
    NewObjArray = #($Plane004,$Plane005,$Plane006)--List of the NEW objects 
    
    for i=1 to NewObjArray.count do (
    	for j=1 to OldObjArray.count do (
    		NewObjArray[i].transform = OldObjArray[j].transform 
    	)
    )
    
  • Skylez
    Options
    Offline / Send Message
    Finally I got a simplistic Screenshot from my problem:

    On the right side there is this small array of planes and the planes on the left side are supposed to get aligned to it in transformation and rotation. It's not about mapping the faces/planes once again but aligning the position and rotation (maybe scale too). I hope you're now able to help me out.
  • Mark Dygert
    Options
    Offline / Send Message
    Separate them all as separate object, make sure their local pivots are set how you want them to be aligned (hierarchy tab > Affect pivot only). Then drop the names into the script that I posted and run it.
  • Noors
    Options
    Offline / Send Message
    Noors greentooth
    Let's hope the leaves aren't collapsed.

    Lil trashy, but if you have to make that for a whole tree, instead of typing their names, you might want to select all the new planes and execute
    NewObjArray = $
    Then select all the old trees leaves and execute
    OldObjArray = $
    then the rest of Mark code
Sign In or Register to comment.