Gore (Fr.) Wrote:

Hi,
안녕하세요

I was wondering if there was a document explaining how to import correctly the transformation information from flexporter/max data. I think I am ok with PRS. But using pivot, and controllers is much less clearer for me.
맥스에서 플렉스포터를 이용해서 변환 행렬에 대한 정보를 정확하게 뽑아내는 방법에 대한 문서가 있는지 찾아보던 중입니다. PRS (이동/회전/확대축소)에 대해서는 잘 알겠는데, 피봇이나 애니메이션 컨트롤러 쪽은 아직도 확실하지가 않군요.

I worked on position first and everything is ok, my objects are moving gently (still some bezier stuff is missing but ok for linear at least). I then moved to scale, and I saw many parameters : sx, sy, sz AND qx, qy, qz, qw. I understand that sx, sy, sz are scale quantities (I assume they are relative to pivot scale data).
먼저 이동정보를 적용해야 한다는 것은 맞는 것 같습니다. 내 오브젝트가 제대로 움직이는 것은 확인 했으니까요 (물론 베지어 커브에 대한 부가정보를 처리해야겠지만 일단 선형 컨트롤러라고 생각하면 맞을겁니다) 이동정보를 처리하고 나서 다음에 확대축소에 대한 쪽을 보는데, 생각보다 파라메터가 많습니다. sx, sy, sz 말고도 qx, qy, qz, qw 가 있는데, sx, sy, sz 가 각각의 축별로 확대축소의 정도를 나타낸다는 것은 알겠지만 (그 스케일은 피봇을 중심으로 적용된다고 가정합니다)

How do you use this info ?
나머지는 어떻게 해야 할까요?

I have :
다음과 같이 준비를 해 놓았습니다.

Object PRS ObjectPosV3 ; ObjectRotQ ; ObjectScaleV3
Pivot PRS PivotPosV3 ; PivotRotQ ; PivotScaleV3
Controller NewPosV3 ; NewRotQ ; NewScaleV3, NewScaleQ

What transformation should be applied to my object in order to reflect its new PRS ?
내 오브젝트에 새로운 PRS(Position/Rotation/Scale) 을 적용하기 위해선 어떤 변환들을 적용시켜야 할까요?

For now, I am stuck at the point :
제가 막힌 부분은 여기까지입니다.

Object.SetPosition( NewPosV3 ) which appears to be correct
Position 변환에 NewPosV3 을 넣는건 맞는거 같은데

However, What should be S and R in :
S 와 R 은 도무지 어떻게 넣어야 할지 모르겠습니다

Object.SetRotation( R )
Object.SetScale( S )


Also if you have a pointer to a good doc on how to compute bezier interpolation for the various max cases (flags).
그리고 맥스의 애니메이션 정보에 나오는 베지어 커브 보간방법에 대한 좋은 문서가 있으면 알려주세요


Thanks for everything,
감사합니다

Vincent PRAT




Re: [Flexporter] PRS, Pivot PRS and animation controllers data  
  
The scale rotation in max is done so that you can have the scaling done after you have rotated the object. That is, Imagine you have rotated a cube 45 degrees around x-axis, and the scale it 150% along y-axis. The object becomes distorted, it looks like the diamond in the card game on one side. That's where the scale rotation comes. So the correct transformation order may be:
맥스에 있는 스케일 로테이션은, 오브젝트를 회전한 이후에 스케일할 수 있도록 되어있습니다. 그것은 말하자면 큐브를 x 축 기준으로 45 도 회전하고 나서, 그걸 y 축으로 150%  확대하는 경우를 볼때, 오브젝트가 마치 카드게임에 나오는 다이아몬드 모양처럼 변하게 됩니다. 그런 모양을 만들 수 있게 하기 위해서 스케일 회전이 필요한 것입니다. 따라서 정확한 변환 순서는 다음과 같이 나올겁니다.

ScaleRot * Scale * InScaleRot * Rot * Trans

* ScaleRot 는 위에 scale 에 있는 qx, qy, qz, qw 를 이용해 만든 회전변환, InScaleRot 는 ScaleRot 의 역변환

(I'm always confudes by the multiplication order of the matrices, so the correct answer may be the other way round).
(늘 그렇지만 행렬을 곱하는 순서가 헤깔리네요. 뒤에서부터 읽어야 정상일 수도 있습니다)

And one note, the scale rotation is a quaternion, just like the other rotation is.
아 그리고 참고로, 스케일 회전은 쿼터니온입니다. 보통의 회전과 똑같이 처리하면 됩니다.

imcgames 의 김학규입니다