• Unfortunately, we have experienced significant hard drive damage that requires urgent maintenance and rebuilding. The forum will be a state of read only until we install our new drives and rebuild all the configurations needed. Please follow our Facebook page for updates, we will be back up shortly! (The forum could go offline at any given time due to the nature of the failed drives whilst awaiting the upgrades.) When you see an Incapsula error, you know we are in the process of migration.

Solving skinning issues with new release

Newbie Spellweaver
Joined
Jun 22, 2014
Messages
54
Reaction score
25
Mega link: https://mega.nz/file/rC4UEJYZ#Xme9TNDds9TYEswD3wavwQiJs09OP3qwvtCwYiioMBQ

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:
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 :D

Be patient, I work hard on it !
 
Newbie Spellweaver
Joined
Oct 21, 2017
Messages
12
Reaction score
0
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
 
Newbie Spellweaver
Joined
Aug 7, 2019
Messages
37
Reaction score
0
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.
 
Newbie Spellweaver
Joined
Jan 15, 2015
Messages
11
Reaction score
7
Finished :D
Like dx11-dx12 support
Better graph ,better render :D
1699385564934 - Solving skinning issues with new release - RaGEZONE Forums


1699384816838 - Solving skinning issues with new release - RaGEZONE Forums
 
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 :cool:
SVR I have live server u can visit how work this FIX

DX FIX

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