Wednesday 30 May 2012

Notepad++ Mel script

download from http://boscripts.blogspot.com/2009/09/notepad-mel-language.html
unzip it
there has three files.
After I tried couple times we only need this file : " userDefineLang.xml"

selecting View->User Define Dialog
press import select " userDefineLang.xml"
reOpen Notepad++
you should find Mel in the very bottom of Language list.

if you want know more about User Defined Languages
go to help contents (Shift+F1)
Languages/User Defined Languages

Friday 25 May 2012

Facial stabilization in MoBu(Motionbuilder)


This tutorial is going to show you how to stabilize mocap data in MotionBuilder

Usually, the face data that I got, has been cleaned and stabilized in vicon blade.
But this time I got a cleaned but not stabilized face data.
I have no idea how to do the cleaned and stabilized job in a proper way.
maybe this http://www.studiodaily.com/2008/12/set-up-a-facial-retarget-in-dcg-facepro/

Finally I figure out a way which works well in MotionBuilder.

Let's see the final result.


The idea is using Rigid Body constrain to get the mainly translation and rotation data to a copy root.
Then clean all the trans info of the root.

Constraints
Rigid Body
Relation

Object
marker data
face bone
stabilized rig(copy from maker data)

mocap system : vicon
software : motionbuilder

Make sure the data is facing Z axis in Mobu.



Pickup the stabilized markers which don't affect by face muscle.
For example: The top of head markers, tip of noes etc...

Drag them onto source of Rigid Body Constrain.
Duplicate marker data. And make them different color, so we could see what's different. (optional : make a new Maker/Null as root for copy one)




Set the "Copy:FaceMocap" as  Constrained object.




Drag FaceMocap markers, except stabilize ones, onto relation plan as senders. Drag copy one onto relation plan as receivers.


Now connect marker's translation to copy's. And iterate this step to the last one.
Well.. This is kind boring job but just for the first time setup.
(I wrote a simple python script to handle this boring job. Read and download from Here!)






Okay, we have everything setup.
playback they all move in same motion( of cause we duplicated them and use reation)
click Snap on the Right body.  playback again the null start moving but not in the center.
Find a facing straight neutral pose then click Zero button.
Right now the null should in the center of the face marker.





Final step:
Select copy markers and do plot.
Deactivate all constrains
Select copy null and clear it trans info

I've seem a lot people are interested in this article. Sorry for my bad skill of English writing. If you have any questions. Feel free to send me messages.




Saturday 19 May 2012

Eyeball constrain 眼球運動設定


I made a quick sample to show how eyelid follow eyeball's movement.




Skeleton骨架
Head - EyeBall (0,0,0)
Head -UpperLid_Aim (0,0,0)- UpperLid_Ctrl (0,0,0)-UpperLid_end (0,0,x.x)
Head - BottomLid_Aim (0,0,0)-BottomLid_Ctrl (0,0,0)-BottomLid_end (0,0,x.x)
Head - HeadEnd #This is for ObjectUp of Aim Constrain

1. All bones are Y axis up.
2. Skin my creepy eye model.













3. Setup Controller in maya or mobu.
Controller(Mark) Group( Null)
Eye_GP-Ctrl_Eye-  UpperLid_GP- Ctrl_UpperLid
Eye_GP-Ctrl_Eye-  BottomLid_GP- Ctrl_BottomLid

4. Add 3 Aim and one Relation constrains
















EyeLip follow Eye movement Setting眼皮跟著眼球運動
Constrains
Aim_EyeBall      [EyeBallCtrl_Eye] Object up #控制眼球
Aim_UpperLid  [UpperLid _AimCtrl_Eye ] weight 50~30 ; Object up#跟隨眼球
Aim_BottomLid [BottomLid_Aim / Ctrl_Eye ] weight 50~30 ; Object up#跟隨眼球
ObjectUp[HeadEnd]

Relation_EyeLid # 控制眼皮上下左右
[Ctrl_UpperLid:ty / UpperLid_Ctrl :rx]
[Ctrl_UpperLid:rz / UpperLid_Ctrl :rz]
[Ctrl_BottomLid:tyBottomLid_Ctrl:rx]
[Ctrl_BottomLid:rzBottomLid_Ctrl:rz]
#important that the nodes should in local mode, and the Number for Multiply is depend on the envirment size.

Kinect MoCap

http://www.kinecthacks.com/guides/kinect-motion-capture-tutorial/
http://motioncapturedata.com/2011/06/kinect-motion-capture.html
http://nuicapture.com/

======
http://www.scannerkiller.com/getstarted.html
http://reconstructme.net/what-is-reconstructme/

======

http://processing.org/

Thursday 3 May 2012

mobuBoneCreator mel script

The basic function of creating joints base on MotionBuilder order is completed.

How to use??
First  :
source  "oOmobuBoneCreator.mel";
run oOmobuBoneCreator() without select any object, it will creat temp locators named for MotionBuilder.
place locators to fit your model.
For the locators of finger, please using duplicate 3 times. then parent them.
Notice1: Once you add new locators please add a prefix name "P_". and re-parent it.

Second:
To create all joint by selecting all the roots of locator and run the script again.
it will automatically create joint base on locator and do mirror.
if you just want create a row then just select one root of locator.
Notice1: Right now this script only support a straight hierarchy or single joint. it is not support a hierarchy has branch.

maybe I should record a demo video, if I have time.