PDA

View Full Version : haw can i match polygon normal and join torient?


i-mage
08-14-2011, 09:22 PM
I'm trying set bone to a polygon which are imported from other program in maya 2010.
polygon is planer face and have 4 vertexes and aim direction randomly.
I want set 3 or 4 bones in center of polygon for bend or something like that.
so, first I divided polygon to get center of edge.
then draw joints with snap to vertexes.
i can set joint orient manually by attribute editor window.
but in case I have a lots of polygon to set.
I'm trying to write mel script.
I think I can manage it with polygon normal and vector with 2 vertexes which vector match joint aim.
I tried some of commands like "polyInfo" and "angleBetween".
but i cant get anser yet.
please give me some clue.
thanks.

pazrot
08-24-2011, 06:21 PM
I am not sure I understood your requirements, but this are the options I guess are useful for you:

If you only want to set the orientation for an initial pose you can just create and delete a normal constraint from the geometry to the joint.

If you want to have the joints always follow your geometry, this are some options:
- Since Maya version 2011 there is a pointOnPolyConstraint that works with UVs. I have not compared it's performance to follicles. But it should be as fast or a little bit faster.
- Follicles: They are positioned with UV values and are quite fast. Just parent your joints below the follicle node and set all transform values to 0.
- Rivet script: It has been used in the past (before follicles were available) to attach objects with orientation to geometry. Their position is not easy to edit and they are rather slow. I am not sure it is useful today (maybe if you can't use UVs).

CGTalk Moderation
08-24-2011, 06:21 PM
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.