Jump to content

  • Log In with Google      Sign In   
  • Create Account


Member Since 06 Apr 2007
Offline Last Active Private

Posts I've Made

In Topic: towards a faster A*

23 April 2016 - 02:25 AM


This guy here wrote an extremely fast heap priority queue.

Let's try it.

It runs very fast in my program

In Topic: What is the correct way to organize a character mesh?

19 April 2016 - 09:14 AM


I find where the problem is now.

It seems that the biped of the pelvis and other spine based bones are rotated by -90 degrees in x and in y

When I click on the pelvis bone, and rotate it back to 0, 0, 0. It jumps back to the original orientation.

Given that I am in figure mode.

Why does that happen?



In Topic: Should I avoid transforming the mesh with a skinned mesh?

18 April 2016 - 09:32 PM

I am doing it a little bit different here

In this code snippet, animResult is already a final bone transformation,

I tried to

1) invert it the make it local, and Update the hierarchy and multiply with offset in the renderer to get the final


2) move it directly into the bone matrix pointers and multiply with offset in the renderer to get the final

Either way doesn't get me the correct results?

for (BONE_ID i = 0; (unsigned)i < m_frames.size(); i++)    {
        const Frame& f = m_frames[i];

        FRAME* fr = (FRAME*)D3DXFrameFind(GetFrameRoot2(), f.name);
        if (fr == NULL)
        // animResult.boneMat[i] is in world space already
        vertexTransformMat[i] = inv(animResult.boneMat[i]);

        D3DXMATRIX matAnimRes;
        matAnimRes._11 = vertexTransformMat[i]._11;
        matAnimRes._12 = vertexTransformMat[i]._12;
        matAnimRes._13 = vertexTransformMat[i]._13;
        matAnimRes._14 = vertexTransformMat[i]._14;
        matAnimRes._21 = vertexTransformMat[i]._21;
        matAnimRes._22 = vertexTransformMat[i]._22;
        matAnimRes._23 = vertexTransformMat[i]._23;
        matAnimRes._24 = vertexTransformMat[i]._24;
        matAnimRes._31 = vertexTransformMat[i]._31;
        matAnimRes._32 = vertexTransformMat[i]._32;
        matAnimRes._33 = vertexTransformMat[i]._33;
        matAnimRes._34 = vertexTransformMat[i]._34;
        matAnimRes._41 = vertexTransformMat[i]._41;
        matAnimRes._42 = vertexTransformMat[i]._42;
        matAnimRes._43 = vertexTransformMat[i]._43;
        matAnimRes._44 = vertexTransformMat[i]._44;

        // local transform
        fr->TransformationMatrix = matAnimRes;

    // collapse into ppBoneMatrixPointers
    D3DXMATRIX iden;
    Mover::UpdateFrame((FRAME*)GetFrameRoot2(), &iden);

    // multiply with pBoneOffsetMatrices to get pBoneMatrices
    Renderer::Render(new RenderMesh(boost::make_shared<CMesh>(*this)));

In Topic: Is there a set of local "basis" vectors in a matrix?

12 April 2016 - 11:02 PM

Okay, I'll watch the khan academy videos first then.

Thanks for helping


In Topic: Is there a set of local "basis" vectors in a matrix?

12 April 2016 - 10:26 PM

Thanks frob,

Yes, you're right. I loose my words, sorry about that because I am just a complete beginner in bvh retargetting.

The paper I am referring can be downloaded from here.....




Maybe you can help me out but you need to spend some time on it and I don't know

if you can do that or not

The equation:

q = qinit * RG-1 * q * RG

I don't know how to get the Quaternion of q

which they described as

Quat((0,1,0), 30)


/// qinit local rotation of FH
    D3DXMATRIX matQinit = f->TransformationMatrix;
    D3DXQuaternionRotationMatrix(&qinit, &matQinit);

    //// RG global rotation of FH
    D3DXMATRIX matRG = f->matCombined;
    D3DXQuaternionRotationMatrix(&RG, &matRG);

    // RGInv
    D3DXQuaternionInverse(&RGInv, &RG);

    D3DXQUATERNION q; <<<<<<<<<<<<<<??????????????