Jump to content

  • Log In with Google      Sign In   
  • Create Account

lucky6969b

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

http://www.codeproject.com/Articles/118015/Fast-A-Star-D-Implementation-for-C

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

Hello,

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?

Thanks

Jack


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

OR

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)
            continue;
    
        // 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;
    D3DXMatrixIdentity(&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

Jack


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.....

 

http://ict.usc.edu/pubs/Automating%20the%20Transfer%20of%20a%20Generic%20Set%20of%20Behaviors%20onto%20a%20Virtual%20Character.pdf

 

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;
    D3DXQUATERNION qinit;
    D3DXQuaternionRotationMatrix(&qinit, &matQinit);



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


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

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

PARTNERS