Friday, April 18, 2014

If you're feeling lazy painting skin weights

Let's create facial blendshape targets....hmmm...I'm lazy to move verts around let's put some joints on the face and move it....hmmm....damn....to many joints....damn....too lazy to paint all those weights!!!

ทำเบลนเชปหน้ากันเถอะ....อืม...ขี้คร้านนั่งจัด vertex ใช้จ๊อยละกัน.....อืมมม...เชี่ย..วางไปวางมาจ๊อยเยอะเกิน....อืม....ขี้เกียจเพ้นเวท...


THIS IS EXACTLY WHAT YOU WANT AT THE TIME LIKE THIS.
สิ่งนี้ช่วยคุณได้...

Tutorial  http://www.kimonmatara.com/maya-deformation-smoothing/.
by Kimon-Matara


Tutorial : Volume preservation using joint and some node connections.

    I would like to share with you guys some trick I just learned about volume preservation on a bounded mesh. There are many ways to correct bad deformation, corrective blendshapes, helper joint with SDK, pose space deformer and etc. This is a simple way using joints and nodes to kinda 'push' out to restore the lost volume. This trick applys for any bend area. I tried it on elbow, finger, wrist, upper leg, worked just fine.


This is what we usually get...



With a couple of extra joints,
I ended up with this.



    To automate the push motion of the extra joint, I did a little node connection instead of set driven key, which of course, can be easily scripted. The idea is to have the extra joint properly aimed out from the bending spot.

The node connection.
On your far left is the upper arm(parent) joint. Next is the elbow(bend) joint.
On your far right is the extra joint and its parent group.


HOW TO DO:
1. Duplicate the bend_jnt(in this case: elbow_jnt). Will call this 'corrective_jnt'. 
2. Create 2 empty groups. 1. cons_grp' 2.'zero_grp .
   Snap the zero_grp to the elbow_joint (both translate and rotate).
   Parent the cons_grp under zero_grp.
3. Move the corrective_jnt over a little in the direction you want it to push the mesh out so it does not
   stays exactly at where the bend joint is. Depends on your joint orientation and your mesh, in my case,
   I moved transalteZ 0.3.
4. Parent the corrective_jnt to the cons_grp.
5. Point constraint the cons_grpto the parent_jnt(shoulder_jnt).
6. Orient constraint the cons_grp to both the parent_jnt and the bend_jnt with maintain offset checked.
7. Add a float attribute called 'multiplier' with the minimum value of 0 at the bend_jnt. This attribute is
   there to tweak how far the 'push' will go.
8. Create 3 multDoubleLinear nodes. 1.devideDegree_mdl 2.multiplier_mdl 3.inverseValue_mdl
9. Connect bend_jnt.roateX(in this case the axis is X) to the multiplider_mdl.input1.
10. Connect bend_jnt.multiplier to the devideDegree_mdl.input1 and set its input2 to 1/360(0.002778).
11 Connect devideDegree_mdl.output to multiplier_mdl.input2.
12 Connect multiplier_mdl output to inverseValue_mdlinput 1 and set its input2 to -1
13 Create a condition node set its second term to 0 and operation to 'less than'.
14 Connect multipliler_mdl.output to the conditon's firstTerm and colorIfFalseR.
15. Connect inverseValue_mdl.output to the condition node's colorIfTrueR.
16. Create a addDoubleLiner node, call it addTranslate_adl. Set its input2 to whatever value the
    corrective_jnt.translateZ(in this case the axis is Z) currently is.
17. Connect the conditon node's outColorR to addTranslate_adl.input1.
18. Connect addTranslate_adl.output to corrective_jnt.translateZ.

    We're done. Try adding the corrective_jnt to influence the mesh and tweak some weights. You can control how far the joint will push the mesh out by tweaking the multiplier attribute you added on the bend_jnt.
    You will end up with only one group which is the corrective_jnt parent group which should be parented under all mover control to move and scale with the whole rig. It's my personal preference to have this extra joint separated from the main joint heirachy.
    I'm planing on doing a little adjustment to have the joint push motion kick in exponentialy. Maybe add some limit to it(clamp?).


EXAMPLE FILE:
download


That's it! Have fun.
If you have any question, feel free to put them in the comment below.

Thursday, April 17, 2014

shoulder/rib cage deform rig

http://petershipkov.com/development/shoulderrig/shoulderrig.htm

Old technic. Sounded promising.
Example file in the link at the bottom.

ริกหัวไหล่ ช่วงซี่โครง (ตัวด้านบน)
นี่เป็นเทคนิคเก่าแล้ว แต่ดูเหมือนจะเวิร์ค
ไฟล์ตัวอย่างอยู่ในลิ้ง ล่างๆ

Sunday, April 6, 2014

R&H Voodoo

http://www.cgmeetup.net/home/rhythm-hues-oscar-winning-technology-voodoo/

Oh yeah, from what I can see, this is definitely VOODOO.

ใช่แล้ว framework เมพแบบนี้มันต้องเป็นเวทย์มนต์วูดูแน่ๆ

Thursday, April 3, 2014

Rio2 Behind the scenes: RIGGING! ริโอภาค2 เบื้อหลังRigging!

http://vimeo.com/90634433

This lady really got it. *RESPECT*

แม่นางท่านนี้วิทยายุทธสูงส่ง *คาราวะ*

Wednesday, April 2, 2014

Placing a follicle - the smart way.

He shows a very interesting technic about re-positioning a joint after it was bound to a mesh without effecting the mesh deformation and still maintaining skin weight painted.

But, that's not what I wanna talk about here.

Placing follicle on a mesh is kinda hard to get it at the exact point(of course, the mesh must not have overlap UVs). You have to tweak the U and V values around until it goes where you want, still, not the 'exact' point that you had in mind. In the tutorial he talked about his script(his comment) that place a follicle at exactly the point specified on the mesh or the closest possible. I wasn't be able to use it, because it was written using Maya python API 2.0. So, I dig into his code and modify some part of it to use the old python API and to better suite my needs. Take a look at my code. I commented on almost every line of it for you.

To run it just execute the whole function once select a vertex or 2 transforms(1.the mesh 2.any locator) and type:
    createFollicleFromPosition()

PS. the script requires PyMel.

ไปเจอ tutorial นี้ ของคุณ .
ในคลิปเขาแนะนำเทคนิคน่าสนใจมากเกี่ยวกับการย้ายตำแหน่ง joint หลังจากที่ bind skin ไปแล้ว โดยที่ไม่ต้องเพ้นเวทใหม่(ย้ายเอาดื้อๆเลย) น่าสนใจมาก

แต่..นั่นไม่ใช่ที่จะพูดถึงวันนี้

การแปะ follice บนโพลิกอนนั้นค่อนข้างยากที่จะวางในตำแน่งที่เราต้องการเป๊ะๆ(โพลีก้อนต้องไม่มี UV ซ้อนนะ) เราต้องนั่งปรับค่า U กับ V ไปทีละเล็กละน้อย เรื่อยๆ จนมันไปอยู่ในที่ๆเราต้องการ แต่ก็ยังไม่ "เป๊ะ" ในคลิปเขาพูดถึงสคริปของเขา(ในcomment) ที่เป็นสคริปสำหรับวาง follice บนจุดที่กำหนดบนผิวของโพลีก้อน(หรือถ้าไม่ใช่ก็ใกล้เคียงที่สุด) ผมเอาสคริปมาโมนิดหน่อย เนื่องจากเขาเขียนใช้ Maya Python API 2.0 ผมเลยโมให้มันใช้ API ตัวเก่า(เผื่อไว้) และก็โมส่วนอื่นๆให้มันใช้ง่ายขึ้นสำหรับผม
ลองอ่านสคริปดูครับ ผมคอมเมนต์ไว้เกือบทุกบรรทัดแล้ว

วิธีใช้ก็ execute ทั้งฟังก์ชั่นก่อนทีนึง แล้ว เลือก vertex หรือ เลือก transform 2 อัน(อันแรกคือ mesh อันสองคือ locator หรือกรุ๊ปอะไรก็ได้) แล้วพิม
     createFollicleFromPosition()


ปล. จะใช้สคริปต้องมี PyMel นะเออ


THE LINK TO THE SCRIPT

Pixar presto demonstration

MOMMMMMMMMM! I WANT THIS!!!

Our animator here at Picture This would jump around with joy while animating if we have something like this. Check it out.

แอนิเมเตอร์ที่ออฟฟิศผมคงเริงร่า ยิ้มแป้นไม่มีหุบแน่เลย ถ้าเรามีซอฟต์แวร์แบบนี้ไว้ใช้ ลองดูครับ

Tuesday, April 1, 2014

Blendshape...chop off the head!

From this useful post by Janifer Conley (http://www.lessthanthreesetdrivenkey.com/)

    I just wanna share this to you guys who didn't know this trick.Connecting blendShape  from  a mesh to another especially from the head (with facial expressions) to the full-body mesh can be troblesome and often require a heavy heavy wrap deformer have the full body mesh deforms with the head mesh.

    You'll end up with tons and tons of full body meshes all over your scene if you just duplicate the whole mesh to do blendShape targets.

WHY NOT JUST THE  "HEAD"?
warning: by using this method, the mesh topology will change. Make sure it won't effect other ppl in the pipeline.

1. Select the face components you want to do blendshape sculpt out of the full body mesh.
2. Go to Mesh>Extract. Then, delete history. Now, we have the head separated from the body.
3. Duplicate the head mesh. This will be our default blendshape head.
4. Combine the head mesh and the body mesh together.
     **IMPORTANT** You must select the head first then the body. Go to Mesh>Combine.
5. Merge vertices on the edge of the combined mesh. Delete history.

    Now, you're set! Try blendshape from the duplicated head mesh to the combined mesh with 'check topology' checkbox turned OFF. Now, turn the blendshape weight to 1 and try moving vertices on the head mesh around. The full body mesh should deform along.Whola! this works like a charm, if not, go back and read every line carefully. *face slap*

If you're feeling lazy, go grab my script at the download page. It' called separateReorderMesh.py

///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
จากโพสนี้ post ของคุณ Janifer Conley (http://www.lessthanthreesetdrivenkey.com/)

    ผมอยากจะแบ่งปันเคล็ดลับนี้ให้กับคนที่ยังไม่รู้ การทำเบลนเชปส่วน facial expression ห้กับคาแรคเตอร์ที่โมเดลมาชิ้นเดียว(หัวกับตัวติดกัน) ในอดีตเราจะตัดส่วนหัวออกมาแล้วใช้ wrap deformer ห่อ โมเดลเต็มตัว ให้ตามโมเดลส่วนหัวที่มีเบลนเชป ซึ่งมัน...หนัก... หรือไม่ เราก็จะยอม duplicate ออกมาดื้อๆทั้งตัว แล้วทำเบลนเชปซึ่งมันก็...หนัก...

แล้วทำไม่มีทำเบลนเชปแค่ "ส่วนหัว" ล่ะ?

คำเตือน: ใช้วิธีนี้แล้ว topology เปลี่ยนนะจ๊ะ ระวังกระทบคนอื่นๆที่ทำงานด้วย เดี๋ยวงานเข้า

1. เลือก face ที่ต้องการจะตัด
2. ไปที่ Mesh>Extract แล้ว delete history ตอนนี้เราแยกหัวกับตัวออกจากกันละ
3. Duplicate ชิ้นหัวเก็บไว้ ชิ้นนี้จะเป็นชิ้นที่เราจะต่อเบลนเชปหาชิ้นตัว
4. Combine หัว กับ ตัว เข้าด้วยกัน
     **สำคัญมาก** ต้องเลือกชิ้นหัวก่อน แล้วตามด้วยตัว แล้วเลือก Mesh>Combine.
5. Merge จุดบริเวณรอยต่อที่ combine แล้ว delete history

   เสร็จแล้ว! ลองเบลนเชปจากชิ้นหัวไปหาชิ้นที่เรา combine ดู โดยใน option box ของเบลนเชปให้ติ๊ก check topology ออก แล้วเปิดเบนเชปเป็น 1 โมเดลต้องนิ่งสนิท ลองดัดๆ vertex ชิ้นหัวไปมา ชิ้นที่เป็นตัวก็ต้องขยับตาม หากเปิดแล้วพัง *ตบ* กลับไปอ่านข้อ 1 ใหม่

ถ้าขี้เกียจทำซ้ำๆหลายๆรอบไปโหลดสคริปได้ที่ download page. สคริปชื่อ separateReorderMesh.py