Friday 8 August 2014

How to: Joints follow Mesh vertex

http://forums.cgsociety.org/archive/index.php/t-728087.html
$pos = `getAttr mesh.vrts[ some_num ]` + `getAttr mesh.pnts[some_num]`;
import maya.cmds as cmds
cmds.emitter()


pointPosition pCube1.vtx[1];


It looks like a good way by using emitter and parentConstraint for the facial rig.
But, if emitter as the parent obj will be easy crash maya when do undo. So it will more stablelize adding locator as child.
I need do more test.
emitter+parentCons看來是不錯的方法
但是,如果直接用emitter當做父物件,如果undo似乎很容易照成Maya當機
多加上locator跟emitter連結,當調劑似乎又比較好一些
還要再多測試


Recently I've been tyring use point on poly constraint for facial rig. The result also quite good.
But when the mesh be changed the vertex position, the following obj which using point on poly constraint will not only change the translation but rotation, so need to add one more child obj to avoid this kind situation.
And one more thing, the face mesh for using point on poly needs to be triangular.


近來測試了利用Point On Poly constraint效果也還可以,也不會讓outliner有一堆因為使用emitter而產生出的set,雖然不影響功能,但看了很不舒服。但用point on poly會讓跟隨的物件連同旋轉值一起被約束,原想把旋轉的約束再解除,但似乎會造成檔案存檔後再開啟會損壞。所以還是在中間多加了兩層物件,一先跟隨模型的點,二是用來約束臉的骨骼。
使用這方法另一個要注意的是,臉部的模型必須都為三角面,才不會造成電腦計算位置錯誤。


FaceDrMesh(Must be triangle)


create followingNode(group) for each vertex point on FaceDrMesh and using Point On Poly constraint connecting them.


create frzNode(group) and hookNode( joint ) as a set for each followingNode and using point constraint connecting them.





No comments: