QUOTE(MaxtorAG @ 08/11/08, 10:43 AM) [snapback]289497[/snapback]
1. How to do it faster. With more meshes = nodes or with more particles, the setAttr and getAtt method gets too slow. I was thinking whether there is a command/procedure to do this without creating the actual nodes. I tried "closestPointOnMesh" as command, but maya tells me that it is a nonexisten procedure.
Dont use setAttr or getAttr. If you EVER catch yourself doing this inside a partcile expression more then once for ALL particles than youd oing something terribly worng.
In reality is day Api time. As theres isnt much mel or expressions can do faster here.
QUOTE
2. I have shape.worldMesh connected to closestPointOnMesh.inMesh. But whenever I modify the transform, the resulting closest point on mesh stays at the original position (as if the mesh did not move), unless I freeze the transform on such shape. But I need to animate the meshes. How to do that? Is there a mathematical way to take into account the transformation of the shape's transform node?
Shapes dont actually move in world they stay put in fact yous should not connect the outMesh!!! you should connect worldMesh
QUOTE
3. What attribute of NURBS shape should I connect to the closestPointOnSurface to get the same as with mesh example?
worldSpace
QUOTE
4. Relevant question: how do I set the local rotation of an object based on read normal values, which are normalized vector?
You can't one piece of the puzzle missing. You need some reference to decipher the rotation along normal. Usually you can just use a up vector. in wich case you can create a axis angle representation. Wich can be converted to euler. Tough easier just to use axis angle representation for particle data.