Jhavna
11-01-2004, 04:19 PM
Hello,
What I want to do is create a MEL script that places a number of poly objects along a user defined plane (which is aligned along x,z, but can have varying y along the surface).
If I were to use a NURBS surface as a reference, then I could evaluate the height of the surface at given points using pointOnSurface (the new objects will be places randomly).
However, how do I then go about determining the correct orientation? I'd like to align the objects along the surface normals, which aren't present in NURBS (if I'm not mistaken).
If I convert to polys afterwards, I still need to know how to get the surface normal at the poisiton of the new object, which isn't necessarily going to be on a vertex. [how would that be done?]
Anyone have any advice for me? Essentially I am looking for a surface detection algo.
Thanks
What I want to do is create a MEL script that places a number of poly objects along a user defined plane (which is aligned along x,z, but can have varying y along the surface).
If I were to use a NURBS surface as a reference, then I could evaluate the height of the surface at given points using pointOnSurface (the new objects will be places randomly).
However, how do I then go about determining the correct orientation? I'd like to align the objects along the surface normals, which aren't present in NURBS (if I'm not mistaken).
If I convert to polys afterwards, I still need to know how to get the surface normal at the poisiton of the new object, which isn't necessarily going to be on a vertex. [how would that be done?]
Anyone have any advice for me? Essentially I am looking for a surface detection algo.
Thanks
