Quantcast
Channel: GameDev.net
Viewing all articles
Browse latest Browse all 17625

Trying to export binary models from a DX9 game

$
0
0

I am trying to build a tool to export and import binary models from an old DX9 game. The models are packed in a single file and I have managed to extract the relevant parts in hexadecimal.

By analyzing the Vertex buffer, I have concluded that it was using the following format. Basically the stride is 24 bytes.

struct CUSTOMVERTEX
{
    CUSTOMVERTEX(FLOAT fx, FLOAT fy, FLOAT fz, DWORD dwcolor, FLOAT fu, FLOAT fv) :
        X(fx), Y(fy), Z(fz), COLOR(dwcolor), U(fu), V(fv) {}
    FLOAT X, Y, Z;
    DWORD COLOR;
    FLOAT U, V;
};
#define CUSTOMFVF (D3DFVF_XYZ | D3DFVF_DIFFUSE | D3DFVF_TEX1)

I …


Viewing all articles
Browse latest Browse all 17625

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>