Solving skinning issues with new release

Newbie Spellweaver
Joined
Jun 22, 2014
Messages
54
Reaction score
25
Mega link:

some code snippets lol

D3Device.cpp

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

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:
Newbie Spellweaver
Joined
Aug 7, 2019
Messages
37
Reaction score
0
So, can i only paste your files into mine and it would run?
 
Skilled Illusionist
Joined
Feb 25, 2009
Messages
343
Reaction score
114
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 ^^
 
Skilled Illusionist
Joined
Feb 25, 2009
Messages
343
Reaction score
114
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

Be patient, I work hard on it !
 
Newbie Spellweaver
Joined
Oct 21, 2017
Messages
12
Reaction score
0

Ok, bro, good luck <3
 
Newbie Spellweaver
Joined
Aug 7, 2019
Messages
37
Reaction score
0

Thats why it didnt work by me. I used the Oldschool files and nothing happened.
 
Newbie Spellweaver
Joined
Jan 15, 2015
Messages
11
Reaction score
7
Finished
Like dx11-dx12 support
Better graph ,better render


 

Attachments

You must be registered for see attachments list
Last edited:
Newbie Spellweaver
Joined
Jan 15, 2015
Messages
11
Reaction score
7
will you release it?
Yes

I am publishing now the fully finished DX Fix which supports dx 11&12, we have changed a lot of things and thanks to that the graphics are better, the game experience is better.
Why am I posting this ?
Because I see that it is not published anywhere.
Maybe this will boost the 4s comunity.

Usage: you need to replace things
and add new from my package

Not easy to add to source
But let's have a little fun
I have live server u can visit how work this FIX



If u have any question add me on Discord : drchester_
Hit the thanks button if using this file
Good luck to all
 
Last edited: