Monday, July 26, 2010

C3D 파일 포맷의 Mocap Data를 MotionBuilder에서 사용하는 법

C3D 파일 포맷의 Mocap Data를 MotionBuilder에서 사용하는 법

모션캡처 데이터가 BVH로 돼있으면 사용이 간편하지만 옵티컬 마커가 그대로 저장돼있는 C3D 포맷 데이터도 자주 볼 수 있다. 이런 데이터를 사용하려면 다소 손이 가는데 그 절차를 여기서 정리해본다.

여기서는 Pipeline Techniques Maya and Motionbuilder 비디오를 중심으로
직접 해본 것을 정리한 설명이다.

1. C3D 파일 import
New Scene 에서,
c3d 포맷의 모션캡처 파일을 임포트 해보자.
c3d 란 optical data 파일이다.

디폴트 옵션으로 import 해도 되는데
Create Unused Optical Settings 는 필요 없으므로 꺼주고 import 하는게 좋다.
"Pipeline Techniques Maya and Motionbuilder" 에서는 디폴트 옵션으로 import 해줌.

2. Actor 를 Create
되도록 T-Stance 에 가까운 포즈로 이동해서
(사실 T-pose 아니라 아무 포즈라도 무방하지만 편의상 T-pose가 좋음)
Actor 를 create 하자. (Asset 에서 Actor 를 끌어 넣음)

Actor 를 움직여서 dots 에 일치하도록 맞춰줌
(Translate, Rotate, Scale 모두 사용할수 있음)

3. Actor의 Marker Set 을 Create
Navigator pane 에 Actor 를 띄워놓고
Marker Set > Create 해줌.

마커 셋의 역할은 단순히, 마커가 어떤 부위에 해당하는지를 지정해 주는 것이다.

4. Actor의 Marker Set 에 마커들을 지정
View에서 머리에 있는 4개의 마커를 선택해서 Navigator의 Actor의 머리 포인트에 끌어 넣음
(alt + drag 또는 maya key 세팅이라면 x + drag)

Upper Arm, Lower Arm, Hands 등 각 부위에 대해 다 해줌.

주의 : 하나의 body part에 넣을 수 있는 dots의 수는 최대 5개이므로
예를 들어 Chest 에 7개의 마커가 있다고 해도 5개까지만 선택해서 끌어넣을 것.

Tip : 이미 끌어넣은 마커를 지워주려면 navigator의 Actor Settings 에서 마커를 선택(테이블의 왼쪽 column)한 후 Delete 키 누르면 됨

5. Actor를 Activate 시킴
이제 어떤 마커가 어떤 부위를 나타내는 지 지정해 주었으므로
Actor 의 Active 체크박스를 클릭해준다.

이제 Actor 는 모션 캡처 points 를 따라 움직이게 된다.

6. Motion Capture를 기존캐릭터에 적용하기
이제 기존의 캐릭터(characterize된 사람 모델)를 이 씬에 Append 하자.
File > Merge 함.
옵션창에서 Append All Elements 하고 merge.

이제 기존에 만들어둔 캐릭터가 로드됐음.
그 캐릭터를 선택하고
navigator panel 에서 input type 을 그 actor 로 지정해줌.

(필요할 경우, Take 를 제대로 지정. Take001 에서 Mocap take 로 변경)

이제 캐릭터가 actor 를 follow 함.

참고 : Character의 발바닥 충돌 오브젝트 위치가 틀리면
모션이 매우 이상해지므로 제대로 발바닥에 위치시켜야 함
예를 들어, 발바닥 충돌 오브젝트가 실제 발바닥보다 밑으로 내려가 있으면 공중에 떠버림.
character와 actor의 위치가 일치하지 않으면 모션이 깨져버림.

7. 사이즈 일치시킴
그런데 캐릭터의 사이즈와 Actor의 사이즈가 다르므로
이를 매치해주기 위해 Character Settings의 Match Source 에 체크해줌.

8. 일부 관절들에 대해 FK/IK 양자택일시킴
Timeline 을 Scrub 해보면 모션이 잘 따라갈 수도 있고 좀 이상하게 움직일 수도 있는데
그 경우 character controls 창에서 IK와 FK 컨트롤이 모두 존재하는 관절들에 대해
Reach T, Reach R 값을 0% 와 100% 둘 중의 하나로 주면 더 모션을 잘 따라가는 값이 있을 것임. (보통 0%로 해서 Full FK 로 하면 잘 됨)

키워드 : 모션캡처, Motion Capture

출처 :
MBM://Pipeline Techniques Maya and Motionbuilder/12 Motion Capture 사용하기.html
MBM://Pipeline Techniques Maya and Motionbuilder/13 Motion Capture를 기존 캐릭터에 적용하기. Optical data cleanup 하기.html
MBM://C3D Motion Capture Mocap 다루는 법/Importing C3d and Mapping Actor in MotionBuilder Tutorial

Optical marker 나 actor 등 Object type 별로 show/hide하는 법

질문 : Optical marker 나 actor 등 Object type 별로 show/hide하는 법? 선별적으로 보여주는 법?

답 :
크게 두군데에 나뉘어져 있는데
1. View Window
Viewer 의 Display 버튼 > Models Visibility 에 Markers 나 skeleton 을 켜고 끄는 옵션이 있고


2. Character Control 창
Character Controls 창의 Show 에서 물체들을 선별적으로 보여주는 옵션이 있음
Floor Contact 등을 show/hide 가능.

Sunday, July 25, 2010

MotionBuilder에서 Story창에 모션 FBX 파일 끌어넣었는데 애니메이션이 안보이는 경우 해결법

이런 경우의 문제는 보통 다음 중 하나이다.

1. Story 창에서 Story 모드가 꺼져있는 경우
-> 이런 경우는 Chracter Control 창의 왼쪽 위에 Story라고 표시가 안돼있을 것이다.
이 경우는 Navigator의 Story 창 왼쪽 위의 Story 버튼에 클릭해주면 됨

2. Character Track 이 아닌 일반 Animation Track 등에 끌어넣은 경우
-> 이런 경우는 생성된 Clip의 색깔이 주황이 아닌 초록 등 다른 색으로 보일 것이다.
모션이 들어 있는 FBX 파일을 Asset Browser에서 Story윈도우로 바로 끌어넣을 경우,
보통은 자동으로 Character Track이 생성되는데,
그렇지 않고 Generic Animation Track이 생성되는 경우가 있다.
이런 경우 애니메이션은 전혀 적용되어 보이지 않으므로 당황하기 쉽다.
이 경우 해결법은,
  1. Story 창에 오른클릭해서 Insert > Character Animation Track 해서 수동으로 캐릭터 트랙을 만들고
  2. 트랙의 Character 에서 적용할 캐릭터를 선택한 후
  3. Asset Browser 에서 FBX를 끌어넣으면 된다.
참고: Character Settings 의 Input Type 이 Active 로 돼있거나 안돼있는건 상관이 없다.
참고: 때로는 아래쪽 트랙에 다른 모션을 넣어놓아 의도한 모션이 안보이는 경우가 있는데 이럴 때는 트랙들이 겹쳐져 그런 것이므로 같은 트랙에 겹치지 않도록 놓으면 해결된다.

Thursday, July 22, 2010

별 이유 없이 rendering이 안될때의 해결법

displacement map 등 넣고 씬이 복잡해졌을 때
파일이 잘못되었는지 간혹 배치 렌더가 안되고 한장씩만 될 경우가 있는데
(물론 command line render 도 안됨)
이럴 때는 물체를 하나씩 따로 export 한 후
New Scene 에서 다시 import 해서 합쳐주면 잘 되곤 한다.

Tuesday, July 20, 2010

Maya에서 follicle 이용해서 object를 surface에 attach하는 법

질문 : Maya에서 object를 surface에 attach하는 법?
(예를 들어 T-shirt에 button 단추 다는 등)

답 :
Follicle 노드가 현재로서는 유일하게 UV에 부착되는 노드이므로 follicle을 쓰는 것 외의 방법은 모두 편법에 불과하다. 그런데 Follicle을 그냥 쓰려고 하면 hair를 생성할때 follicle의 위치가 random으로 생성되어 컨트롤할 수 없다. 따라서 다음 MEL을 쓰는 것이 정답.

사용법 :
1. attach할 object 선택
2. attach할 surface 선택
3. parentToSurface 실행

출처 : http://www.kylenikolich.com/scripting/lod/parentToSurface.mel

주의점 : 오른쪽과 왼쪽이 대칭으로 같은 texture 를 공유하거나 하는 경우 UV space 를 공유하게 되므로 이 MEL로 follicle을 제대로 심을 수가 없다. (왼쪽에 follicle을 심으려 했는데 왼쪽에 심어지는 식이 돼서 엉망이 됨)

parentToSurface.mel 의 내용 :

// parentToSurface

// This mel command allows one to attach selected objects to a selected mesh or nurbs surface.
// The objects will follow any deformation or transformation of the surface.

// Usage: put this script in your local scripts directory. In Maya select object(s) to attach
// followed by a mesh or nurbs surface to attach then enter "parentToSurface" in the
// command line. A follicle node will be created at the point on surface closest to
// the center of the object and the object will be parented to this follicle. Note that
// if the surface to attach to is a mesh it must have well defined UVs that range from 0-1
// with no areas sharing the same value.
//
// For convenience drag the parentToSurface string onto the shelf to make a shelf button.
//
// This command uses the follicle node, which is normally used by the hair system. The follicle node
// is currently the only node in maya that can derive a rotate and translate based on a uv position
// for both meshes and nurbs surfaces.
//
// One use of this script might be to attach buttons to a cloth object, or any deforming surface. To
// attach several buttons, first position the buttons where desired then select them followed by the
// object to attach to and run this command.
// For more info or to report problems with this script go to Duncan's Corner:
// http://area.autodesk.com/blogs/blog/7/

global proc float convertToCmFactor()
{
string $unit = `currentUnit -q -linear`;
if( $unit == "mm" ){
return( 0.1 );
} else if( $unit == "cm" ){
return( 1.0 );
} else if( $unit == "m" ){
return( 100.0 );
} else if( $unit == "in" ){
return( 2.54 );
} else if( $unit == "ft" ){
return( 30.48 );
} else if( $unit == "yd" ){
return( 91.44 );
} else {
return( 1.0 );
}
}

global proc attachObjectToSurface(string $obj, string $surface, float $u, float $v )
{
string $follicle = `createNode follicle`;
string $tforms[] = `listTransforms $follicle`;
string $follicleDag = $tforms[0];


connectAttr ($surface + ".worldMatrix[0]") ($follicle + ".inputWorldMatrix");
string $nType = `nodeType $surface`;
if( "nurbsSurface" == $nType ){
connectAttr ($surface + ".local") ($follicle + ".inputSurface");
} else {
connectAttr ($surface + ".outMesh") ($follicle + ".inputMesh");
}
connectAttr ($follicle + ".outTranslate") ($follicleDag + ".translate");
connectAttr ($follicle + ".outRotate") ($follicleDag + ".rotate");
setAttr -lock true ($follicleDag + ".translate");
setAttr -lock true ($follicleDag + ".rotate");
setAttr ($follicle + ".parameterU") $u;
setAttr ($follicle + ".parameterV") $v;

//parent -addObject -shape $obj $follicleDag;
parent $obj $follicleDag;
}

global proc parentToSurface()
{
string $sl[] = `ls -sl`;
int $numSel =size($sl);
if( $numSel < 2 ){ warning( "ParentToSurface: select object(s) to parent followed by a mesh or nurbsSurface to attach to."); return; } string $surface = $sl[$numSel-1]; if( nodeType($surface) == "transform" ){ string $shapes[] = `ls -dag -s -ni -v $surface`; if( size( $shapes ) > 0 ){
$surface = $shapes[0];
}
}
string $nType = `nodeType $surface`;
if( $nType != "mesh" && $nType != "nurbsSurface"){
warning( "ParentToSurface: Last selected item must be a mesh or nurbsSurface.");
return;
}
string $clPos = "";
float $minU, $minV, $sizeU, $sizeV;
float $convertFac = 1.0;

if( $nType == "nurbsSurface" ){
$clPos = `createNode closestPointOnSurface`;
connectAttr ($surface + ".worldSpace[0]") ($clPos + ".inputSurface");

$minU = `getAttr ($surface+".mnu")`;
float $maxU = `getAttr ($surface+".mxu")`;
$sizeU = $maxU - $minU;
$minV = `getAttr ($surface+".mnv")`;
float $maxV = `getAttr ($surface+".mxv")`;
$sizeV = $maxV - $minV;
} else {
int $pomLoaded = `pluginInfo -query -l nearestPointOnMesh`;
if( !$pomLoaded ){
loadPlugin nearestPointOnMesh;
$pomLoaded = `pluginInfo -query -l nearestPointOnMesh`;
if( !$pomLoaded ){
warning( "ParentToSurface: Can't load nearestPointOnMesh plugin.");
return;
}
}
// The following is to overcome a units bug in the nearestPointOnMesh plugin
// If at some point it correctly handles units, then we need to take out the
// following conversion factor.
$convertFac = convertToCmFactor();

$clPos = `createNode nearestPointOnMesh`;
connectAttr ($surface + ".worldMesh") ($clPos + ".inMesh");
}

int $i;
float $closestU, $closestV;
for( $i = 0; $i < $numSel -1; $i++ ){
string $obj = $sl[$i];
if( nodeType( $obj )!= "transform" ){
warning( "ParentToSurface: select the transform of the node(s) to constrain\n");
continue;
}
float $bbox[] = `xform -q -ws -bb $obj`;
float $pos[3];
$pos[0] = ($bbox[0] + $bbox[3])*0.5;
$pos[1] = ($bbox[1] + $bbox[4])*0.5;
$pos[2] = ($bbox[2] + $bbox[5])*0.5;
setAttr ($clPos + ".inPosition") -type double3
($pos[0]*$convertFac)
($pos[1]*$convertFac)
($pos[2]*$convertFac);
$closestU = getAttr( $clPos + ".parameterU");
$closestV = getAttr( $clPos + ".parameterV");
if( $nType == "nurbsSurface" ){
$closestU = ($closestU + $minU)/$sizeU;
$closestV = ($closestV + $minV)/$sizeV;
}

attachObjectToSurface( $obj, $surface, $closestU, $closestV );
}


if( $clPos != "" ){
delete $clPos;
}

}

parentToSurface;

기타 다른 방법: 다음과 같이 Attach to Motion Path 를 쓰는 방법(Object to Surface Constraints in Maya)도 있긴 하지만 실제로 써보면 속도가 너무 느려져서 (불필요한 연산이 많이 수행되는듯) 사용하기 안좋다. Play시간이 엄청 길어지는데, 멀쩡히 돌아가던 마야가 거의 멎는 수준.

Saturday, July 17, 2010

지브러쉬 작업시 메모리 부족으로 다운.또는 세이브시 다운

지브러쉬 작업시 메모리 부족으로 다운.또는 세이브시 다운

[출처] 지브러쉬 작업시 메모리 부족으로 다운.또는 세이브시 다운|작성자 풰인

ztl파일이 안열릴 경우가 있다. 메모리 어쩌구 저쩌고 자시고 쑤시고 하면서.
이것은 에러가 아닌 지극히 계산적으로 연산된 결과이다.
이렇게 에러났다고 판단되는 파일의 용량을 보면 특이할정도로 용량이 높다.
아마 다른 파일들의 4배의 용량일 것이다.
그렇다면??
정말 좋은 컴퓨터를 가진 지인에게 파일을 열어달라고 한다.
그럼 열린다.
그파일은 틀림없이 스컬핑중 부분적으로 하이드된상태에서 세이브된 파일일 확률이 80퍼센트 이상이다.
그렇다.하이드 된파일과 전체가 보이는 ztl파일의 용량은 정확히 4배가 차이가 난다.
그래서 안열리는 거란 말이다 당신의 컴퓨터에서..

잘못된 지식을 사실인것처럼 혼동하지 말자.지브러쉬 디바이드 최상의 단계에서 세이브하나 최하위에서 세이브하나 똑같고.단지 메모리 부족에러가 나는경우는 당신이 세이브할때 오브젝트가 하이드된상태인가 아닌가에 달려있당.
ㅇㅋㅂㄹ?

Maya 에서 Select 할 때 select 에서 빼기 select 에 더하기 하는 방법

Select mode 에서
Ctrl + Drag : Remove from Selection
Shift + Drag : Toggle
Ctrl + Shift + Drag : Add to Selection

select from only one side? in maya (backface culling)

select from only one side? in maya (backface culling)

I think you are talking about "Backface culling". It is in Options under Display/Custom Polygon Display. Actually there are a ton of options in there.

Thursday, July 15, 2010

Photoshop tip : tab 키로 그림 윈도우만 남기기

layer 및 tool bar 등 윈도우들이 많아 자리를 많이 차지하는데
이럴 때는 tab 키를 누르면 현재 에디트하는 윈도우만 보이도록 토글된다.

Tuesday, July 13, 2010

To increase the accuracy of your nCloth collisions

To increase the accuracy of your nCloth collisions

Step 1. Select the nCloth or passive object for which you want to increase its accuracy and improve its collisions.

Step 2. In the Attribute Editor do the following:
  1. Adjust the Thickness of your nCloth or passive object. Select the nClothShape or nRigidShape tabs, and in the Surface Properties, change the Thickness value. For best results, the collision volume should appear to cling closely to your nCloth.
  2. Adjust the Self Collision Thickness of your nCloth object. Select the nClothShape tab, and in the Surface Properties, change the Self Collision Thickness value.
  3. Adjust the Collision Flag for your nCloth object. Select the nClothShape tab, and in the Quality Settings section, change the selection in the Collision Flag drop-down list. Face creates the most accurate collisions and Vertex creates the least accurate collisions.
  4. Adjust the Self Collision Flag for your nCloth. Select the nClothShape tab, and in the Quality Settings section, change the selection in the Collision Flag drop-down list.
  5. Increase the number of collide iterations for your nCloth by adjusting its Max Collide Iterations attribute in the Quality Settings section of its nucleus tab.
  6. Resolve interpenetration for your nCloth by adjusting its Trapped Check, Push Out, and Crossover Push attributes in the Quality Settings section of the nClothShape and nRigidShape tabs.
출처 : Create and edit nCloth collisions (from Maya Reference)

Tuesday, July 6, 2010

orient joint 하면 non-zero rotations 에러 뜨는 문제

질문 :
orient joint 하면
non-zero rotations 에러 뜨는 문제
어떻게 해결하나?

답 :
select hierarchy 한 후
Freeze Transformations 한 후
orient joint 하면 해결

Thursday, June 17, 2010

global 좌표를 특정 오브젝트의 local 좌표로 변환하는 법

float $v[]=`getAttr $attr`;
matrix $mat[4][4]=<<$v[0], $v[1], $v[2], $v[3]; $v[4], $v[5], $v[6], $v[7]; $v[8], $v[9], $v[10], $v[11]; $v[12], $v[13], $v[14], $v[15]>>;
return $mat;
}

// Multiply the vector v by the 4x4 matrix m, this is probably
// already in mel but I cant find it.
proc vector myVecMult(vector $v, matrix $m){
matrix $v1[1][4]=<<$v.x, $v.y, $v.z, 1>>;
matrix $v2[1][4]=$v1*$m;
return <<$v2[0][0], $v2[0][1], $v2[0][2]>>;
}

matrix $mat[4][4] = myGetMatrix("pPlane2.worldInverseMatrix");
print $mat;
$v = <<0, 24, -7>>;
$result = myVecMult($v, $mat);
코드 출처 : Convert a 3d point to 2d Screen Space in Maya
키워드 : MBM://100617global 좌표를 특정 오브젝트의 local 좌표로.html

Wednesday, June 16, 2010

MEL 관련 링크

THE FX - Community of FX enthusiasts
Hey! You have found us!
THEFX is a place where people can discuss FX related subjects, particle fx, fluid simulations, scripting, programming fx plugins and etc. Once you sign up you can reply to posts, create new topics, download scene files, attachments in posts, interact with others.

3-4-5 직각삼각형과 7-24-25 직각삼각형

각 변이 3:4:5 로 돼있는 직각삼각형은 각이 약 36.87 도이므로
이 각도의 cos sin 값은 각각 4/5, 3/5 라는, 딱 떨어지는 값을 갖는다.

36.87 도를 두번 돌린 각은 73.74 도인데
이 각 역시 cos sin 값이 각각 7/25, 24/25 라는, 딱 떨어지는 값을 갖는다.

다음 그림을 보면 쉽게 증명될 수 있다.



이 삼각형의 이러한 특징은 두번 rotate 되었을때 또는
세 오브젝트가 parent-child 관계로 이어져 있을 때
테스트에 유용하게 쓸 수 있다.

요약 :
3-4-5 삼각형이 이루는 각도는 36.87 도
이 각을 두배 하면 73.74도가 됨 (36.87 x 2 = 73.74)
그런데 73.74 도는 7-24-25 삼각형이 이루는 각도

cos 36.87도 = 4/5 = 0.8
sin 36.87도 = 3/5 = 0.6

cos 73.74도 = 7/25 = 0.28
sin 73.74도 = 24/25 = 0.96

inverseMatrix 구하는 법

질문 : 특정 오브젝트의 inverse matrix 를 얻어내려면?
요약 : 다음 attribute 를 이용하면 된다.
getAttr obj.inverseMatrix // 오브젝트의 inverse
getAttr obj.worldInverseMatrix // 오브젝트의 월드에 대한 inverse
getAttr obj.parentInverseMatrix // parent의 inverse

다음은 직접 해본 것. 다음을 보면 각각의 역할을 알 수 있다.





설명 :
출처
You could also use getAttr on the inverseMatrix, worldInverseMatrix or parentInverseMatrix attributes of the transform node (actually they're attributes of the dagNode node, but they're passed on by inheritance to the transform node). If that's too limited, there's a script on www.highend3d.com called Matrix Playground, it has procedures for all sorts of stuff that you can do with matrices, just make sure you get the dependant procedures as well (Determinant and Adjoint are needed to calculate the inverse).

Maya의 Transform Matrix 계산

Maya의 Transform Matrix 는 처음에는 어렵게 느껴지지만
찬찬히 살펴보면 이해하기 어렵진 않다.
레퍼런스를 어떤것부터 보아야 하나가 막막할 수 있는데 그것은
마야 help 의 xform 설명부터 보면 된다.

트랜스폼 관련해서 만능의 스위스칼 같은 mel 함수는 xform 이다.
따라서 xform command 를 Help 에서 찾아보면,
마야 오브젝트의 transform matrix 가 어떻게 되어 있는지 알 수 있다.

xform 설명을 보면 보통 컴퓨터 그래픽스 convention 처럼
가로로 된 벡터 (x, y, z) 뒤에 4x4 matrix 를 곱하는 방식임을 알 수 있다.
오리지날 help 에서는 레이아웃이 깨져서 위쪽에 알수 없는 -1 이 위치해있으므로 다음과 같이 제대로 고쳐보았다.





다음은 rotation 을 하는 경우를 보여준다.


다음은 scale 이 포함된 경우이다.


다음은 translation 이 포함된 경우.


키워드 : matrix, rotation, translation, translate, rotate

각도, degree, radian, sin, cos, 삼각함수 등 기초 복습 및 기초수치 암기

이 포스트의 목적 :
1. degree와 radian
2. sin, cos 등 삼각함수
복습 및 기초수치 암기

필요성
라디안이 무엇인지 안쓰다보면 쉽게 잊어버린다.
그리고 사인 코사인 값도 안쓰다보면 쉽게 잊어버린다.
그러나 3D 에서 회전 관련 다룰 때 간단한 수치 정도는 기억하는 것이 좋다.
그래야 수치를 볼 때 쉽게 감을 잡을 수 있고
테스트 등을 할때 이게 맞는 값인지 금방 알아채는데 유용하다.

Radian의 정의
Radian 이란, radius(반지름)가 1 인 원에 대하여,
arc(원주) 상을 1 만큼 간 각도를 말한다.



Radian의 기초수치
60도는 약 1.05 라디안이다.
60도가 약 1 라디안인 것은 당연하다.
정삼각형의 형태를 생각해보면 모든 변이 다 같기 때문에,
arc와 radius의 길이는 대략 일치하는 것이다.

180도는 약 3.14 라디안이다.
1 라디안인 60도가 세 번 모였으므로,
180도는 약 3 라디안이 된다.
오래 각도 계산을 안하다보면 180도가 3.14인지 360도가 3.14인지 기억이 안날 때가 있는데
이렇게 기억하면 좋다.

60도는 약 1 라디안이므로
6도는 약 0.1 라디안이 된다.
실제로 6도는 약 0.1047 라디안이다.

Radian 변환 함수
Microsoft Excel 에서 radian/degree 변환하는 함수는 다음과 같다.
Apple의 Pages 에서도 함수명은 동일하다.
=RADIANS()
=DEGREES()

3-4-5 직각삼각형
각 변이 3, 4, 5 인 직각삼각형은 값이 딱딱 떨어지므로 테스트 시에 유용하다.
이 삼각형의 가장 작은 각도(즉 길이가 4인 변과 5인 변이 이루는 각도)는 약 36.87도이다.
이 값을 외워두면, 테스트 시에 정말 편하다.



36.87도는 0.6435 라디안이다.
꼭 암기할 필요는 없지만, 이 값도 기억하면 편리하다.

쉽게 감을 잡으려면 다음과 같이 생각하면 된다.
30도는 약 0.5 라디안이고 60도는 약 1 라디안,
그리고 6도가 약 0.1 라디안이므로,
36도는 약 0.6 가량이 되는 것이다.

sin(36.87도) = 약 0.6000 이다.
cos(36.87도) = 약 0.8000 이다.
tan(36.87도) = 약 0.7500 이다.

3-4-5 인 직각삼각형이므로, 이렇게 값이 떨어지는 것은 당연하다.

7-24-25 직각삼각형
이는 다음 링크를 참조하자
3-4-5 직각삼각형과 7-24-25 직각삼각형

36-24 직각삼각형
가로 36mm, 세로 24mm 직각삼각형의 대각선 길이는
43.2666mm 이다.

레퍼런스
MBM://35mm Equivalent focal length(35mm 환산값) 실제 촬영으로 확인하는 방법.png

Sunday, June 6, 2010

After Effects 로 얼굴 모자이크 처리 하는 법

질문 : After Effects 로 얼굴 모자이크 처리 하는 법?

답 :
1. 얼굴 부분에 모자이크를 하고자 하는 레이어 위에 Adjustment Layer 를 만든다.
2. Adjustment Layer 를 선택하고 Mask 를 만든다.
3. Adjustment Layer 에 Effect > Stylize > Mosaic 를 적용하면 이제 그 부분이 모자이크 될것임
4. Mask 가 얼굴을 따라가도록 애니메이션해준다. 이는 mocha 등의 tracking 소프트웨어 이용하면 됨

레퍼런스 :
http://forums.creativecow.net/thread/202/881571

본문 중에서 :

Blurring face in After Effects CS4

There are a few ways to do that:
Option A) Create an adjustment layer above the layer you want to blur, animate an ellipse mask to cover the face, and apply blur to the adjustment layer.
Option B) Duplicate the layer which contains the face, on the top layer add the ellipse mask and animate it over the face, apply blur to the top layer.

* you can also try track mattes
* in case there are several faces to blur, create mask per face and animate each, make sure all masks mode is set to "Add"