View Full Version : help me ,rotation base on surface normal
01-13-2008, 05:02 PM
hi all ,i want to achieve this: some locator attached to a surface (i.e ,a nurbs sphere ) CVs, and these locator must rotate base on the surface normal accurately when the surface deformed. icant control the rotation well, is there someone kind can help me? 3Q so much!
attached ma file .waiting.................
01-14-2008, 03:02 AM
i see that you have used pointOnSurfaceInfo nodes to place the locators around the ball.. now u can use the same node to have it control their positions and their orientation..
like if u connect the pointOnSurfaceInfo.position to translates of the locators, they will folow with the deformed mesh.. now if u want the orientation to line up with the normal of the deformed mesh, u hav to do few more steps !!
create another 2 transform groups - up and aim...
and then connect like so:
string $posi="pointOnSurfaceInfo1"; // ur node name
connectAttr -force ($posi+".tangentU") ("up.translate");
connectAttr -force ($posi+".tangentV") ("aim.translate");
then u : aim constraint -
aimConstraint -weight 1 -aimVector 0 0 -1 -upVector 1 0 0 -worldUpType "object" -worldUpObject ("up") ("aim") ("locator1") ;
where ur locator1 is the one u want to make it orient to ur mesh and so on for all the others ! u will need to check for the required aimVector and upvector options.. to get the correct results...
if you have hair module, u can just use follicles and parent ur locators underneath them ! follicle will position and orient themselves to the normals...too.. all this in the same node !
select ur surface, go to hair > create hair, set the required options, create hair, remove the hairsystems n output curves etc.. and just have the folicles and use them..
hope that helps .
01-14-2008, 03:05 AM
chk this thread to -
01-16-2008, 03:20 PM
hi ,3q so much!! i'll check it later!!:thumbsup:
01-16-2008, 03:20 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.
vBulletin v3.0.5, Copyright ©2000-2015, Jelsoft Enterprises Ltd.