View Full Version : Alligning objects to Meshs normal?

11 November 2004, 01:59 PM
I got a landscape, and I need to place LOADS of objects on it, but they need to be perpendicular to the ground i.e. in line with the normal.

Is there a handy way to do this?

Cheers, TBK

11 November 2004, 02:04 PM
use the object as a particle emitter with superlow speed (this way they will align to the normals of the emitter but the movment won't be apparent) and instance the objects on particles.

to get control on where the objects are placed you can paint the emission.
if you need further control you can shrink wrap a grid on top of the terrain, the grid will only have vertices where you want the objects to be, and you can use it to emit the particles from vertices.

11 November 2004, 10:57 AM
'VBScript CloneByComponents.vbs
'author mail: (Softimage.Ru)
'select subcomponets (points or edges or polygons)
'run script and pick object for cloning
set list = selection(0)
PickElement "object", "pick", "pick", myCln, mbutton, 0, modifier
for each i in list.SubComponent.ComponentCollection
set Cln = Clone (myCln, , 1, 1, 0, 0, 1, 0, 1)
ApplyCns "ObjectToCluster", , i
SetValue Cln&".kine.objclscns.tangent", True
SetValue Cln&".kine.objclscns.upvct_active", True

or you can shrink wrap nurbs grid (or curve) by your polygonal landscape and constrain your objects (Constrain-Surface,Constrain-Curve(Path))

11 November 2004, 02:02 PM
Cheers guys, Im about a week away from needing to deal with this part of the animation...Ill keep you posted...

12 December 2004, 06:09 PM
depol - cool script! thanks man, unfortunately, its does the job a bit linearly if you get me! i think we may use it for distance shots...

Jaco, got the general concept almost working, and had the objects being emitted along the normals, but their orientation wasnt lining up. So i tried ticking "align on velocity" but didnt seem to have any effect - any pointers?

Cheers guys, TBK

12 December 2004, 06:21 PM
align on velocity should do the trick really.
how is it not working? did you resimulate?
make sure you are not reading off the same cache all the time.

CGTalk Moderation
01 January 2006, 12:00 AM
This thread has been automatically closed as it remained inactive for 12 months. If you wish to continue the discussion, please create a new thread in the appropriate forum.