블로그 이미지
래머
오늘도 열심히 개발하는 개발자입니다.

calendar

1 2 3 4 5
6 7 8 9 10 11 12
13 14 15 16 17 18 19
20 21 22 23 24 25 26
27 28 29 30 31

Notice

2014. 5. 4. 11:07 기타
출처 카페 > 게임 모델링 에 관한 모든것.. | 늘바나
원문 http://cafe.naver.com/moduser/75

SMD파일은 2개의 버전으로 구성 -> Reference , Animation file로 구성

 

공통구성data : bone의 node구성

Reference   : 0프레임의 bone position/rotation data triangle,

texture map data

Animation   : 모든 프레임의 bone position/rotation data

 

섹션별 구성

Header 

 Version 1 버전을 표시

 

Node tree 

뼈의 모든 본의 목록을 나타낸다.

부모가 없는 Objects는 부모의 ID가 1이다.

 

nodes

<ID> Bone Name <Parent ID>

end

 

Skeleton Pose

뼈 구조의 모든 본들의 position/rotation값들로 구성

Animation SMD는 매프레임마다 time블럭으로 저장

Reference SMD는 첫 프레임의 한 타임만 저장

 

Skeleton

Time 0

<ID><PosX><PosY><PosZ><RotX><RotY<RotZ>

<ID> ® Bone index,

<PosX><PosY><PosZ> ® 월드 좌표계에서의 위치값

<RotX><RotY<RotZ> ® Local Euler 라디안 회전값,부모의 local space의 회전값

Reference SMDs  이 프레임만 출력

Time 1

end

// Animation SMD 여기까지 출력

 

Triangle block

Triangles 리스트만 포함

 

Triangles

bitmapname.bmp

<Parent><PosX><PosY><PosZ><NormX><NormY><NormZ><TexU><TexV>

<Parent> ® vertex의 부모 bone의 ID번호

<PosX><PosY><PosZ>  ® 월드 좌표계에서의 vertex위치값

<NormX><NormY><NormZ> ® 스무싱을 위한  vertex normal vector

<TexU><TexV> ® vertex의 texture 좌표값

버텍스 3개씩 기록

 

nextBitmapName.bmp

새로운 triangle리스트 기록

..

end




posted by 래머