cglandlogo First Page
°í°´¼¾ÅÍ   
gallery media job community contentsmall  
  dbrush Blizzardfest 2014

Warning: main(/data/cgland/public_html/r06inc/gnb_edu.html) [function.main]: failed to open stream: No such file or directory in /data/cgland/public_html/r06inc/top_menu_common.html on line 91

Warning: main(/data/cgland/public_html/r06inc/gnb_edu.html) [function.main]: failed to open stream: No such file or directory in /data/cgland/public_html/r06inc/top_menu_common.html on line 91

Warning: main() [function.include]: Failed opening '/data/cgland/public_html/r06inc/gnb_edu.html' for inclusion (include_path='.:/usr/local/php/lib/php') in /data/cgland/public_html/r06inc/top_menu_common.html on line 91
  ȸ¿ø ȸ¿ø»ç º¸¾ÈÁ¢¼Ó
 
IDÀúÀå
  °³ÀÎȸ¿ø°¡ÀÔ ¤Ó ±â¾÷ȸ¿ø°¡ÀÔ
  ¾ÆÀ̵ð l ºñ¹Ð¹øÈ£ ã±â
ÀÔ»çÁö¿øÇÒ¶§ ÆÄÆ®¸¦ µÎ°¡..
¸¶¾ß¿¡¼­ ¸·´ë ±×·¡ÇÁ¸¦
°ÇÃàµðÀÚÀÎÂÊ Áø·Î¸¦ »ý°¢..
¿µ»ó°ü·ÃÇؼ­ ¹è¿öº¸°í½Í..
½Ã³×¸¶Æ÷µð¸¦ ¹è¿ì°í½Í½À..
Maya Script¸¦ ÀÌ¿ëÇÑ Ä³¸¯ÅÍ ¼Â¾÷ view : 9871 | Ãßõ : 0 | 2007-06-07
3D | Maya Ãâó : Áøżö
2-2-2. joint Orientation


¡á À§¿¡¼­ ¡° joint -e -zso -oj xyz -sao yup joint12; ¡± ¶ó´Â ¸í·ÉÀ» Á¦°ÅÇß´Ù. ÀÌ´Â jointÀÇ È¸ÀüÃà Á¤·Ä¿¡ °ü·ÃµÈ ¸í·ÉÀε¥ º» ¿¹Á¦¿¡¼­´Â À̸¦ ´Ù½Ã ÇØÁÖ°Ú´Ù.


root_joint¸¦ ¼±ÅÃÇÏ°í jointÀÇ ÃàÀ» Á¤·ÄÇϱâ À§ÇØ Skeleton¡¬Orient Joint ¸¦ ½ÇÇà½ÃŲ´Ù.

Note > ¿©±â¼­´Â Orient Joint¿¡ ±âº»À¸·Î ÁöÁ¤µÈ ¿É¼ÇÀ» »ç¿ëÇß´Ù. Orient JointÀÇ ¿É¼Ç¿¡ °ü·ÃÇÏ
¿© ÀÚ¼¼È÷ ¾Ë°í ½ÍÀ¸¸é Help¸¦ Âü°íÇϱ⠹ٶõ´Ù.


Script Editor¿¡ ´ÙÀ½°ú °°ÀÌ Ãâ·ÂµÉ °ÍÀÌ´Ù.

select -r root_joint ;

joint -e -oj xyz -secondaryAxisOrient yup -ch -zso;


ÀÌÁ¦ jointÀÇ ¸ðµç ȸÀüÃàÀº À§ÀÇ ¿É¼ÇÀ» ±âÁØÀ¸·Î ÀÚ½Ä joint¸¦ ¹Ù¶óº¸°Ô Á¤·ÄµÇ¾ú´Ù.


¡á ´Ù¸®¸¦ Àâ°í ¿òÁ÷¿©º¸ÀÚ.

Á¶ÀÎÆ®ÀÇ È¸Àü °ª¿¡ ´ëÇØ µ¿ÀÏÇÑ ¼öÄ¡¸¦ ºÎ¿©ÇÏ¿´À» ¶§ ¾Æ·¡ ±×¸²°ú °°ÀÌ ¿òÁ÷ÀÌ´Â °ÍÀ» È®ÀÎÇÒ ¼ö ÀÖÀ» °ÍÀÌ´Ù.



ÀÌ´Â ´ëĪÀûÀÎ Å°¸¦ ÀâÀ» ¶§ ºÒÆíÇϹǷΠÇØ´ç joint¸¦ ã¾Æ À̸¦ ¼öÁ¤ÇÑ´Ù.

select -r right_leg_joint.rotateAxis ;

select -tgl right_foot_joint.rotateAxis ;

select -tgl right_toe_joint.rotateAxis ;

rotate -r -os 180 180 0 ;



select -tgl right_leg_joint.rotateAxis ; - ÇØ´ç ¿ÀºêÁ§Æ®ÀÇ È¸ÀüÃàÀ» ¼±ÅÃ


µÚ¿¡ ¿À´Â .rotateAxis ´Â ÇØ´ç ³ëµå°¡ °¡Áö°í ÀÖ´Â ¼Ó¼ºÀÇ À̸§(ȸÀüÃà)ÀÌ´Ù. Áï ¿©·¯ºÐÀº ÇØ´ç ¿ÀºêÁ§Æ®ÀÇ À̸§¸¸ ¾Ë°í ÀÖÀ¸¸é È­¸é¿¡¼­ Á÷Á¢ Èûµé°Ô ã¾Æ¼­ ¼±ÅÃÇÏ°í ȸÀü½ÃÅ°Áö ¾Ê¾Æµµ ´ÙÀ½°ú °°Àº Çü½ÄÀ¸·Î ¼öÁ¤ÇÒ ¼ö ÀÖ´Ù.


select -tgl ÇØ´ç¿ÀºêÁ§Æ®À̸§.rotateAxis ;

select -tgl ÇØ´ç¿ÀºêÁ§Æ®À̸§.rotateAxis ;

select -tgl ÇØ´ç¿ÀºêÁ§Æ®À̸§.rotateAxis ;

select -tgl ÇØ´ç¿ÀºêÁ§Æ®À̸§.rotateAxis ;

select -tgl ÇØ´ç¿ÀºêÁ§Æ®À̸§.rotateAxis ;
:
:
:
rotate -r -os 180 180 0 ; - ȸÀü ¼öÄ¡ °ª X Y Z


¡á ´ëĪÀûÀÎ ¿òÁ÷ÀÓÀ» º¸ÀÌ´ÂÁö È®ÀÎÇÑ´Ù.

2-2-3. IK


¡á left_leg_joint¿Í left_foot_joint¿¡ IK¸¦ ¼³Á¤ÇÏ°í ikHandle1ÀÇ À̸§À» left_foot_ikHandleÀ¸·Î effector1ÀÇ À̸§À» left_foot_effector·Î ¹Ù²Ù¾îº¸ÀÚ. À̸¦ °£·«È÷ ÇÏ¸é ´ÙÀ½°ú °°´Ù.



select -r left_leg_joint.rotatePivot ;

select -add left_foot_joint.rotatePivot ;

ikHandle -sol ikSCsolver -s sticky;

rename "ikHandle1" "left_foot_ikHandle";

rename "effector1" "left_foot_effector";



¹Ý´ëÂÊ ¹ß¿¡µµ µ¿ÀÏÇÑ À§Ä¡¿¡ IK¸¦ ¼³Á¤Çغ¸ÀÚ. ÇØ´ç jointÀÇ À̸§À» ¾Ë°í ÀÖ´Ù¸é, ÀÏÁ¤ÇÑ ±ÔÄ¢¿¡ ÀÇÇؼ­ jointÀÇ À̸§ÀÌ ºÎ¿©µÇ¾ú±â ¶§¹®¿¡ ´ÜÁö left ¶ó´Â ¹®ÀåÀ» right ¶ó´Â ¹®ÀåÀ¸·Î ¹Ù²Ù¾îÁÖ¸é µÈ´Ù.

¿©±â¼­´Â °£´ÜÈ÷ ¿øµµ¿ìÀÇ ¸Þ¸ðÀåÀ» »ç¿ëÇϵµ·Ï ÇÏ°Ú´Ù. ¸Þ¸ðÀåÀ» ¿­°í À§ÀÇ Script¸¦ º¹»çÇØ ³Ö´Â´Ù.

ÆíÁý¡¬¹Ù²Ù±â(Ctrl+h)¸¦ ¿­¾î ãÀ» ³»¿ë¿¡ left ¹Ù²Ü ³»¿ë¿¡ right¸¦ ¾²°í ¹Ù²Ù±â¸¦ ½ÇÇàÇÑ´Ù.



select -r right_leg_joint.rotatePivot ;

select -add right_foot_joint.rotatePivot ;

ikHandle -sol ikSCsolver -s sticky;

rename "ikHandle1" "right_foot_ikHandle";

rename "effector1" "right_foot_effector";


À̸¦ Script Editor ÀÔ·Ââ¿¡ ³Ö°í ½ÇÇà½ÃŲ´Ù.



´ÙÀ½ ±×¸²Ã³·³ ¹Ý´ëÂÊ ¹ß¿¡µµ µ¿ÀÏÇÑ À§Ä¡¿¡ IK°¡ ¼³Á¤µÇ¾úÀ¸¸ç ÇØ´ç ³ëµåµéÀÌ ÁöÁ¤ÇØÁØ À̸§À¸·Î º¯°æµÈ °ÍÀ» º¼ ¼ö ÀÖ´Ù.

¡á À§´Â ¾ÆÁÖ °£´ÜÇÑ °æ¿ìÀÌÁö¸¸ ¾ÆÁÖ º¹ÀâÇÑ ¼Â¾÷ÀÇ °æ¿ì¿¡µµ ÀÌ·± ¹æ¹ýÀÌ µ¿ÀÏÇÏ°Ô »ç¿ëµÉ ¼ö ÀÖ´Ù. Áï ´ëĪÀûÀÎ ¼Â¾÷ÀÇ °æ¿ì À̸§ ºÙÀ̱Ⱑ ÀߵǾîÀÖ´Ù¸é ´ÜÁö ¸î ¹®À常 ¹Ù²Ù¾îÁÖ´Â °É·Î ÇØ°áµÈ´Ù.

2-2-4. ÄÁÆ®·Ñ·¯ ±¸¼º


¡á ÄÁÆ®·Ñ·¯´Â ½Ã°£ °ü°è»ó ¹Ì¸® ¸¸µé¾î ³õÀº °ÍÀ» ºÒ·¯¿Í »ç¿ëÇÏ°Ú´Ù. ´ÙÀ½ÀÇ ÆÄÀÏÀ» importÇϱ⠹ٶõ´Ù.

¢º Áغñ ÆÄÀÏ > sourceFile¡¬box_con.mb


¡á ¾Æ·¡´Â ÄÁÆ®·Ñ·¯¸¦ ºÎÂøÇϴµ¥ »ç¿ëµÈ ScriptµéÀÌ´Ù. »ó¼¼ÇÑ ³»¿ëÀº »ý·«ÇÑ´Ù.

select -r con_left_foot ;

select -tgl left_foot_joint ;

orientConstraint -mo -weight 1;



select -cl ;

select -r con_left_foot ;

select -tgl left_foot_ikHandle ;

pointConstraint -mo -weight 1;



select -r con_right_foot ;

select -tgl right_foot_joint ;

orientConstraint -mo -weight 1;



select -cl ;

select -r con_right_foot ;

select -tgl right_foot_ikHandle ;
¤¤
pointConstraint -mo -weight 1;



select -cl ;

select -r con_Rotate_Body ;

select -tgl root_joint ;

orientConstraint -mo -weight 1;



select -r con_Translate_Body ;

select -tgl con_Rotate_Body ;

pointConstraint -mo -weight 1;



select -cl ;

select -r con_Translate_Body ;

select -tgl root_joint ;

pointConstraint -mo -weight 1;



select -r con_Rotate_Root ;

select -add con_right_foot_M ;

parentConstraint -mo -weight 1;



select -r con_Rotate_Root ;

select -add con_left_foot_M ;

parentConstraint -mo -weight 1;



select -r con_Rotate_Root ;

select -add con_Translate_Body_M ;

parentConstraint -mo -weight 1;



select -r con_Rotate_Root ;

select -add con_Rotate_Body_M ;

parentConstraint -mo -weight 1;


select -r con_Translate_Root ;

select -add con_Rotate_Root_M ;

pointConstraint -mo -weight 1;



¡á ¾Æ·¡´Â ÀÔÀ» ¿òÁ÷À̱â À§ÇÑ attribute¸¦ Ãß°¡Çϱâ À§ÇÑ ScriptÀÌ´Ù.

select -r con_Translate_Root ;

addAttr -ln jaw_up_Rotate -at double -keyable true ;

addAttr -ln jaw_down_Rotate -at double -keyable true ;


con_Translate_Root¿¡ jaw_up_Rotate¿Í jaw_down_Rotate¶ó´Â ¼Ó¼ºÀÌ Ãß°¡µÈ °ÍÀ» È®ÀÎÇÒ ¼ö ÀÖÀ» °ÍÀÌ´Ù.

´ÙÀ½Àº ±×¿Í °ü·ÃµÈ expressionÀ» ÁöÁ¤ÇÏ´Â ScriptÀÌ´Ù.

expression -s "jaw_jointUp.rotateZ = con_Translate_Root.jaw_up_Rotate ;\r\njaw_joint.rotateZ = con_Translate_Root.jaw_down_Rotate" -o con_Translate_Root -n "jaw_rotate" -ae 1 -uc all ;

ÀÌÁ¦ ÇØ´ç con_Translate_Root¿¡ jaw_up_Rotate¿Í jaw_down_Rotate¶ó´Â ¼Ó¼ºÀ¸·Î ÀÔÀ» ¹ú¸®°í ´Ù¹°°í ÇÏ´Â Á¦¾î°¡ °¡´ÉÇØÁ³´Ù.

¡á ½ÇÁ¦·Î´Â ¹ß ºÎºÐ¿¡ ´ëÇؼ­ Ãß°¡ÀûÀÎ ¼Â¾÷ÀÌ ÇÊ¿äÇÏ°í µÚ¿¡ ³²Àº ÀÛ¾÷µéÀÌ ÀÖÁö¸¸ »ý·«À» ÇÏ°í joint¿¡ ¸ðµ¨ ¿ÀºêÁ§Æ®¸¦ ¿¬°áÇÏ´Â °ÍÀ¸·Î ÀÛ¾÷À» ¸¶Ä¡µµ·Ï ÇÏ°Ú´Ù. ¿©±â¼­´Â skin ÀÛ¾÷Àº ÇÏÁö ¾Êµµ·Ï ÇÏ°Ú´Ù.

select -r box_eyeLeft box_eyeRight box_Body ;

group; xform -os -piv 0 0 0;

select -r group1 ;

rename "group1" "body_group";



select -r root_joint ;

select -add body_group ;

parentConstraint -mo -weight 1;



select -r left_leg_joint ;

select -tgl box_legLeft ;

parentConstraint -mo -weight 1;



select -r right_leg_joint ;

select -tgl box_legRight ;

parentConstraint -mo -weight 1;



select -r left_foot_joint ;

select -tgl box_footLeft ;

parentConstraint -mo -weight 1;



select -r right_foot_joint ;

select -tgl box_footRight ;

parentConstraint -mo -weight 1;


¡á Å°°¡ µé¾î°¡Áö ¾Ê´Â ºÒÇÊ¿äÇÑ attribute¸¦ °íÁ¤½ÃÅ°µµ·Ï ÇÏ°Ú´Ù.

setAttr -lock true "con_Translate_Body.rx";

setAttr -lock true "con_Translate_Body.ry";

setAttr -lock true "con_Translate_Body.rz";

setAttr -lock true "con_Translate_Body.sx";

setAttr -lock true "con_Translate_Body.sy";

setAttr -lock true "con_Translate_Body.sz";

setAttr -lock true "con_Translate_Body.v";



setAttr -lock true "con_Rotate_Body.tx";

setAttr -lock true "con_Rotate_Body.ty";

setAttr -lock true "con_Rotate_Body.tz";

setAttr -lock true "con_Rotate_Body.sx";

setAttr -lock true "con_Rotate_Body.sy";

setAttr -lock true "con_Rotate_Body.sz";

setAttr -lock true "con_Rotate_Body.v";



setAttr -lock true "con_left_foot.sx";

setAttr -lock true "con_left_foot.sy";

setAttr -lock true "con_left_foot.sz";

setAttr -lock true "con_left_foot.v";



setAttr -lock true "con_right_foot.sx";

setAttr -lock true "con_right_foot.sy";

setAttr -lock true "con_right_foot.sz";

setAttr -lock true "con_right_foot.v";



setAttr -lock true "con_Rotate_Root.tx";

setAttr -lock true "con_Rotate_Root.ty";

setAttr -lock true "con_Rotate_Root.tz";

setAttr -lock true "con_Rotate_Root.sx";

setAttr -lock true "con_Rotate_Root.sy";

setAttr -lock true "con_Rotate_Root.sz";

setAttr -lock true "con_Rotate_Root.v";



setAttr -lock true "con_Translate_Root.rx";

setAttr -lock true "con_Translate_Root.ry";

setAttr -lock true "con_Translate_Root.rz";

setAttr -lock true "con_Translate_Root.sx";

setAttr -lock true "con_Translate_Root.sy";

setAttr -lock true "con_Translate_Root.sz";

setAttr -lock true "con_Translate_Root.v";



¡á ÀÚ! ±ò²ûÇÏ°Ô À̶§±îÁö ¿­½ÉÈ÷ ÇÑ ³»¿ëÀ» ÀúÀåÇÑ´Ù.

pv_performAction "G:/C95_Seminar_Nthma/A05_Seminar_Nthma_2005_02_Jinn/box_Set02.mb" "mayaBinary";
file -f -save -options "v=0" -type "mayaBinary";



G:/C95_Seminar_Nthma/A05_Seminar_Nthma_2005_02_Jinn/box_Set02.mb ºÎºÐ¿¡ ÀúÀåÇÒ Æú´õ °æ·Î¿Í ÆÄÀÏ À̸§À» Á¤ÇØÁØ´Ù.

¢º ¿Ï¼º ÆÄÀÏ > sourceFile¡¬box_set02.mb


3. ±ÛÀ» ¸¶Ä¡¸ç



¡á Script¸¦ »ç¿ëÇÑ ¼Â¾÷ÀÌ Ã³À½¿¡´Â ¾î·Æ°í ºñÈ¿À²ÀûÀ¸·Î º¸ÀÏÁöµµ ¸ð¸¥´Ù. ±×·¯³ª ½ÇÁ¦ º¹ÀâÇÑ ¼Â¾÷¿¡¼­ È­¸é»ó¿¡¼­ ÇϳªÇϳª ÁöÁ¤Çϸ鼭 ÀÛ¾÷ÇÏ´Â °Íº¸´Ù ³ôÀº È¿À²À» ³ªÅ¸³½´Ù. ¶ÇÇÑ ¼Â¾÷ÀÇ Áß°£¿¡ À߸øµÈ ºÎºÐÀÌ ÀÖÀ» ¶§, ÀÏÀÏÀÌ Å¬¸¯ÇÏ°í ¿òÁ÷¿©°¡¸é¼­ ¼öÁ¤ÇÏ´Â °Íº¸´Ù ÇØ´ç ¼Â¾÷ÀÇ ±¸Á¶¸¦ º¸°í ±× ºÎºÐÀÇ Script¸¦ ¼öÁ¤ÇÏ´Â °ÍÀ¸·Î ½±°Ô ÀÏÀ» ¸¶Ä¥ ¼ö ÀÖ´Ù.

¶ÇÇÑ °ú°Å¿¡ ÀÛ¼ºÇÑ Script¸¦ º¸°í ÇØ´ç ³ëµåÀÇ À̸§À» ¹Ù²Ù¾îÁÖ´Â µîÀÇ °£´ÜÇÑ ¼öÁ¤À¸·Î ´Ù¸¥ ij¸¯ÅÍ ¼Â¾÷¿¡ Àç»ç¿ëÀÌ °¡´ÉÇÏ´Ù.

ÀڽŸ¸ÀÇ Ä³¸¯ÅÍ ¼Â¾÷ ƲÀ» ¸¸µé¾îµÎ¾î ¾ðÁ¦µçÁö ½±°Ô Ŭ¸¯ ÇѹøÀ¸·Î ºÒ·¯¿Ã ¼öµµ ÀÖ´Ù.

¿©±â¼­ ´õ ³ª¾Æ°¡¸é MEL Script¸¦ »ç¿ëÇؼ­ Maya¿¡ ¾ø´Â ±â´ÉÀ» Ãß°¡ÇÒ ¼öµµ ÀÖ´Ù.

Script¸¦ »ç¿ëÇÒ ¼ö ÀÖ´Ù´Â °ÍÀº ¿©·¯ºÐÀÌ Maya¸¦ ´Ù·ç´Âµ¥ ÀÖ¾î ¸¶¹ý»çÀÇ ÁöÆÎÀ̸¦ ¾ò´Â °Í°ú °°´Ù.


ºÎÁ·ÇÑ ÀÌ ±ÛÀÌ Á¶±ÝÀ̳ª¸¶ µµ¿òÀÌ µÇ¾úÀ¸¸é ÁÁ°Ú´Ù.


| 1 | 2 | 3 |
nhowan

¿Í¿ì ¸ÚÁö³×¿ä. ÇöÀç xsi script °øºÎÇϴµ¥¿ä. µµ¿ò ¸¹ÀÌ µÆ½À´Ï´Ù. ^^*

2008-01-09 05:16:35