티스토리 뷰

키프레임방식으로 해당 프레임에 적절한 뼈대를 만들어 D3DXFRAME 에 갱신해주자

위의 구조체를 통해 여러 동작을 가지고있을 때 어떤 동작 취하게 하던지, 몇 개의 동작을 섞는 등의 명령을 내릴 수 있다.

 

애니메이션 컨트롤러가 어떻게 일을 하느냐

 

일단 애니메이션을 저장할 트랙과 애니메이션 셋(ID3DXAnimationSet)이 필요하다.

 

애니메이션 컨트롤러로 부터 애니메이션 셋을 받아와야 한다.

애니메이션셋을 트랙에 세팅해야한다.

애니메이션 트랙을 활성화시키고

애니메이션 컨트롤러로 애니메이션을 진행시킨다.

 

해당 4단계를 거쳐 애니메이션이 플레이된다.

 

블랜딩이란

두 개의 애니메이션의 끝, 다음애니메이션의 처음을 부드럽게 이어주는 역할인데

3번 과정에서 새로운 애니메이션을 활성화하기전에 이전 애니메이션의 속도와 가중치를 점차 줄여주고 새로운 애니메이션의 속도와 가중치를 높여줌으로써 중간과정이 생기도록 해주는것

 

Concept of Skinned Mesh Animation

The frame hierarchy (bone structure, node tree) for a skinned mesh represents the skinned mesh in a pose position. Each frame has a "to-parent" transformation (for the purposes of this article - a 4x4 matrix), sometimes called the frame's Transformation Matrix, which orients that frame relative to its parent frame. The orientation of each frame in the hierarchy's root frame space is a "to-root" transform (described in above referenced article) calculated by working up from the root frame through each child frame

childFrame.ToRoot = childFrame.TransformationMatrix * parentFrame.ToRoot;

Animation data, the information needed to render a skinned mesh in some animated position, is independent of the frame hierarchy, and is related to the hierarchy only through the names of the frames. The animation data is processed by the animation controller for a specific time within the animation period to produce an animation transformation for each bone specified in the animation data, in every sense the same as the frame's to-parent (transformation) matrix. That is, just as the to-root calculations shown above can be used to render the mesh in its pose position, the animation transforms can be used to render the mesh in an animated position.

childFrame.AnimToRoot = childFrame.AnimTransform * parentFrame.AnimToRoot; Moreover, an animation

controller need "know" nothing about the frame hierarchy. Once it performs the required calculations using animation data alone, it need "know" only where to store the results appropriate for each "name."

 

 

 

https://www.slideshare.net/agebreak/4-34425441

http://skmagic.tistory.com/entry/Skeletal-Animation

애니메이션컨트롤러에대한 좀더 자세한 설명들, 블랜딩에관한설명, 그리고 D3DAnimationController에 대한 자세한 내용들이 있다.

https://www.gamedev.net/articles/programming/graphics/a-blending-animation-controller-for-a-skinned-mesh-r3592/

 

댓글