Sign in to follow this  

AdvanceTime does not update root frame matrix??

This topic is 4140 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

So I coded up an animation example in directX, closely following the SDK's MultiAnimation example. Recently, I made an animated, skinned model in Max 7 and exported it with Panda Exporter. The DX Mesh Viewer shows the model skinning and animating correctly. When I try to place it in my program though, it shrinks to a point on the screen in only a few frames. I am using a world matrix that scales all coordinated by half as my base matrix for my updateFrames function::
        assert(pFrame != NULL && baseMat != NULL);

	D3DXMatrixMultiply(&pFrame->TransformationMatrix, &pFrame->TransformationMatrix, baseMat);

	if (pFrame->pFrameSibling)
		UpdateFrames((MeshFrame*)pFrame->pFrameSibling, baseMat);
	if (pFrame->pFrameFirstChild)
		UpdateFrames((MeshFrame*)pFrame->pFrameFirstChild, &pFrame->TransformationMatrix);

However, when I look at the frame palette that is generated after each frame, it looks as if AdvanceTime is not in fact updating the root frame (it just keep shrinking). I don't know what to do. It works perfectly with Tiny... Has anyone ever seen this before? Also, I know that my mesh is animating becuase I can see the mesh updating in PIX (August 2006), it's just shrinking like crazy.

Share this post


Link to post
Share on other sites
I am in no way an expert with skinned meshes at all, but you could try using another matrix in your derived frame to represent the combined matrix. You would then multiply the transformation matrix with the parent matrix, and store it in the combined matrix.

ie.

D3DXMatrixMultiply(&pFrame->CombinedMatrix, &pFrame->TransformationMatrix, baseMat);


It sounds like you are compounding the scaling each frame. So on the first frame it would be 1/2 size, the second it would be 1/4, third would be 1/8 etc.

Before you try this though, try using tiny, and make her 1/2 the size like you are doing now.

I'm not sure if this will solve your problem or not, but it may lead you in the right direction.

Share this post


Link to post
Share on other sites

This topic is 4140 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this