Skinning Fix Release

Results 1 to 10 of 10
  1. #1
    Member Agnares is offline
    MemberRank
    Jun 2014 Join Date
    53Posts

    happy Skinning Fix Release

    Mega link: https://mega.nz/file/rC4UEJYZ#Xme9TN...3qwvtCwYiioMBQ

    some code snippets lol

    D3Device.cpp
    https://pastebin.com/ExX1yC3g
    Code:
    void CD3DDevice::SetTransforms(size_t count, LPD3DXMATRIX matrices){    static LPDIRECT3DTEXTURE9 boneTexture = nullptr;    DWORD NumBones = MAX_PIVOT + 1;    DWORD BonesMat = 4; // pixels per bone    DWORD TexWidth = NumBones * BonesMat;    DWORD TexHeight = 1; // skeletons    if(!boneTexture) m_pDevice->CreateTexture(TexWidth, TexHeight, 1, D3DUSAGE_DYNAMIC, D3DFMT_A32B32G32R32F, D3DPOOL_DEFAULT, &boneTexture, NULL);    D3DLOCKED_RECT rect;    boneTexture->LockRect(0, &rect, NULL, D3DLOCK_DISCARD);    ZeroMemory(rect.pBits, NumBones * sizeof(D3DXMATRIX));    memcpy(rect.pBits, &matrices[0], count * sizeof(D3DXMATRIX));    boneTexture->UnlockRect(0);    if (FAILED(m_pEffect->SetFloat("OneOverWidth", 1.0f / TexWidth))) { CTConsole::GetInstance()->Output("Failed to set OneOverAnimTexWidth!\n"); }    if (FAILED(m_pEffect->SetFloat("OneOverHeight", 1.0f / TexHeight))) { CTConsole::GetInstance()->Output("Failed to set OneOverAnimTexHeight!\n"); }    if (FAILED(m_pEffect->SetTexture("bonetexture", boneTexture))) { CTConsole::GetInstance()->Output("Failed to set bone texture!\n"); }}
    TachyonObject.cpp
    https://pastebin.com/9Mu8et2V
    Code:
    void CTachyonObject::ApplyMatrix(CD3DDevice *pDevice){    LPANI pANI = GetCurANI();    if (pANI && pANI->m_pANI)    {        pANI->m_pANI->m_fCurTime = m_fActTime;        LPANIDATA pDATA = pANI->m_pANI->GetAniData();        if (pDATA && pDATA->m_pAni)        {            D3DXMATRIX* vWORLD = new D3DXMATRIX[MAX_PIVOT + 1];            FLOAT fBlendTime = FLOAT(m_dwBlendTick) / FLOAT(m_dwBlend);            BYTE bBlend = (m_dwBlendTick < m_dwBlend ? TRUE : FALSE) && m_bBlend;            LPD3DXMATRIX pInit = GetMeshMatrix();            pDATA->m_pAni->GetFrameMatrix(                m_pBone,                bBlend ? m_pBlend : NULL,                bBlend ? m_pBlendKEY : NULL,                m_pPivot,                m_vPosition, 0,                pANI->m_pANI->m_fLocalTime,                fBlendTime);            int nNodes = pDATA->m_pAni->GetNodeCount();            vWORLD[0] = m_pBone[0];            for (int i = 0; i < nNodes; i++)                vWORLD[1 + i] = pInit ? (pInit[i] * m_pBone[i + 1]) : m_pBone[i + 1];                        pDevice->SetTransforms(MAX_PIVOT + 1, vWORLD);            delete[] vWORLD;            vWORLD = NULL;        }        else        {            pDevice->SetTransforms(1, &m_vPosition);        }    }    else    {        pDevice->SetTransforms(1, &m_vPosition);    }}
    Last edited by Agnares; 16-09-21 at 10:17 PM.


  2. #2
    CHIBRE ! pipitt05000 is offline
    MemberRank
    Feb 2009 Join Date
    FranceLocation
    339Posts

    Re: Skinning Fix Release

    Nice Bro !!

  3. #3
    Enthusiast FinalDaniel is offline
    MemberRank
    Aug 2019 Join Date
    30Posts
    So, can i only paste your files into mine and it would run?

  4. #4
    CHIBRE ! pipitt05000 is offline
    MemberRank
    Feb 2009 Join Date
    FranceLocation
    339Posts
    Quote Originally Posted by FinalDaniel View Post
    So, can i only paste your files into mine and it would run?
    Not at all ! :/ It's not simple as that, like always in 4S scene x)
    You need to add these files, truc and you need to edit some class to use other bones...

    I really don't know how to do it, Agnares told me,... but it was a fail ^^

  5. #5
    Apprentice Zysan is offline
    MemberRank
    Oct 2017 Join Date
    6Posts
    When comes full Script?

  6. #6
    Enthusiast FinalDaniel is offline
    MemberRank
    Aug 2019 Join Date
    30Posts
    never

  7. #7
    Apprentice Zysan is offline
    MemberRank
    Oct 2017 Join Date
    6Posts
    ok then is useless this thread

  8. #8
    CHIBRE ! pipitt05000 is offline
    MemberRank
    Feb 2009 Join Date
    FranceLocation
    339Posts
    I'm currently working on it ! Trying to create full sources for 5.0 & Oldschool fixed for dx9 !

    It's the same problem for both BUT, look at the top of the post, Agnares posted a mega link, it's the 5.0 Araz's sources with skinning fixed already done
    But there are some glitches too :D

    Be patient, I work hard on it !

  9. #9
    Apprentice Zysan is offline
    MemberRank
    Oct 2017 Join Date
    6Posts
    Quote Originally Posted by pipitt05000 View Post
    I'm currently working on it ! Trying to create full sources for 5.0 & Oldschool fixed for dx9 !

    It's the same problem for both BUT, look at the top of the post, Agnares posted a mega link, it's the 5.0 Araz's sources with skinning fixed already done
    But there are some glitches too :D

    Be patient, I work hard on it !
    Ok, bro, good luck <3

  10. #10
    Enthusiast FinalDaniel is offline
    MemberRank
    Aug 2019 Join Date
    30Posts
    Quote Originally Posted by pipitt05000 View Post
    I'm currently working on it ! Trying to create full sources for 5.0 & Oldschool fixed for dx9 !

    It's the same problem for both BUT, look at the top of the post, Agnares posted a mega link, it's the 5.0 Araz's sources with skinning fixed already done
    But there are some glitches too :D

    Be patient, I work hard on it !
    Thats why it didnt work by me. I used the Oldschool files and nothing happened.



Advertisement