Page 1 of 1
GP500 .dk4
Posted: Sat Apr 29, 2023 3:48 pm
by Fiammanera628
Hello there!
There is a way to extract 3d models from this game? It uses .dk4 files and the tools that actually open them are not accesible anymore

If someone can help me pls

Re: GP500 .dk4
Posted: Sat Apr 29, 2023 8:02 pm
by shakotay2
Fiammanera628 wrote: ↑Sat Apr 29, 2023 3:48 pm
It uses .dk4 files and the tools that actually open them are not accesible anymore

Hello. What about getting them via wayback machine?
edit: ok, then someone will have to do the hard work getting proper face indices...
Here's a poor try, chassis of bike (point cloud) on the left:
.
bike-DK4.png
Created fake FIs look weird. The existing FIs have annoying skips
like so
...
f 687 686 692
f 701 702 703
f 704 705 703
f 705 701 703
f 706 707 708
f 709 707 710
f 710 707 706
-----------
f 1297 1298 711
f 712 1299 1300
f 711 709 1301
...
Seems thus you can't care for single sub meshes (12?) but have to handle the beast in a whole.
Re: GP500 .dk4
Posted: Sat Apr 29, 2023 8:05 pm
by Fiammanera628
shakotay2 wrote: ↑Sat Apr 29, 2023 8:02 pm
Fiammanera628 wrote: ↑Sat Apr 29, 2023 3:48 pm
It uses .dk4 files and the tools that actually open them are not accesible anymore

Hello. What about getting them via wayback machine?
Trust me, I already tried to use it and nothing

Re: GP500 .dk4
Posted: Sat Apr 29, 2023 9:43 pm
by shakotay2
Too many weird faces. I have no idea, why:
edit: it's because you dumbo shouldn't have used strips
.
weird_faces.png
Re: GP500 .dk4
Posted: Sat Apr 29, 2023 10:01 pm
by Fiammanera628
I hit the hard one, right?

Re: GP500 .dk4
Posted: Sat Apr 29, 2023 10:22 pm
by shakotay2
Depends on - there's people who usually have more luck with FIs than me.
Plus, there's an onbike sample where fake face indices work better. thus one could compare to the original ones (maybe):
.
onbike.png
Re: GP500 .dk4
Posted: Sun Apr 30, 2023 2:33 am
by Zeee
Here is how to read the file
And also what it looks like
Code: Select all
typedef struct
{
float x;
float y;
}Vector2;
typedef struct
{
float x;
float y;
float z;
}Vector3;
struct Vertex
{
Vector3 position;
Vector3 normal;
Vector2 uv;
};
struct RDHV
{
char chunkMagic[4];
char chunkVersion[4];
Vertex verts[vertexCount];
};
struct Triangle
{
short index0;
short index1;
short index2;
short pad;
float f0;
float f1;
float f2;
};
struct RDHT
{
char chunkMagic[4];
char chunkVersion[4];
Triangle triangle[triangleCount];
};
typedef struct // size 100
{
// needs figuring out
int unk0;
int unk1;
float fl0;
float fl1;
float fl2;
int unks[3];
float fl3;
int unks2[2];
float fl4;
char name[16];
int unk2;
int unk3;
short unk4;
short unk5;
float fl5;
short unk6;
short unk7;
int unks3[4];
}Mesh<read=name>;
struct RDHM
{
char chunkMagic[4];
char chunkVersion[4];
Mesh meshes[meshCount];
};
struct RDEH
{
char chunkMagic[4];
char chunkVersion[4];
char formatMaybe[4];
int someBigOffset;
int magicMaybe;
char path[24];
int objectCount;
int unk;
int unks[7];
};
struct PMOC
{
char chunkMagic[4];
char chunkVersion[4];
char name[32];
int unk0;
int unk1;
int triangleCount;
int unkCount0;
int vertexCount;
int unkCount1;
int unkCount2;
int meshCount;
int unks2[9];
RDHV rdhv; // Vertex Data
RDHT rdht; // Triangle Data
RDHM rdhm; // Mesh Data
};
RDEH rdeh; // Header
PMOC pmoc[rdeh.objectCount]<optimize=false>; // Object/Model
// Some other stuff after, material? or w/e
Re: GP500 .dk4
Posted: Sun Apr 30, 2023 4:39 am
by shakotay2
Zeee wrote: ↑Sun Apr 30, 2023 2:33 am
Here is how to read the file
Magic happened!
edit:
I really should have used triangles instead of strips...

)
.
noStrips.jpg
I wasn't sure of that 20 bytes triangles' block, especially the 3 floats. Need to check them... seems it's normals.
btw: was is "pad" good for? (Always zero?)
Re: GP500 .dk4
Posted: Sun Apr 30, 2023 11:43 am
by Fiammanera628
Zeee wrote: ↑Sun Apr 30, 2023 2:33 am
Here is how to read the file
And also what it looks like
Code: Select all
typedef struct
{
float x;
float y;
}Vector2;
typedef struct
{
float x;
float y;
float z;
}Vector3;
struct Vertex
{
Vector3 position;
Vector3 normal;
Vector2 uv;
};
struct RDHV
{
char chunkMagic[4];
char chunkVersion[4];
Vertex verts[vertexCount];
};
struct Triangle
{
short index0;
short index1;
short index2;
short pad;
float f0;
float f1;
float f2;
};
struct RDHT
{
char chunkMagic[4];
char chunkVersion[4];
Triangle triangle[triangleCount];
};
typedef struct // size 100
{
// needs figuring out
int unk0;
int unk1;
float fl0;
float fl1;
float fl2;
int unks[3];
float fl3;
int unks2[2];
float fl4;
char name[16];
int unk2;
int unk3;
short unk4;
short unk5;
float fl5;
short unk6;
short unk7;
int unks3[4];
}Mesh<read=name>;
struct RDHM
{
char chunkMagic[4];
char chunkVersion[4];
Mesh meshes[meshCount];
};
struct RDEH
{
char chunkMagic[4];
char chunkVersion[4];
char formatMaybe[4];
int someBigOffset;
int magicMaybe;
char path[24];
int objectCount;
int unk;
int unks[7];
};
struct PMOC
{
char chunkMagic[4];
char chunkVersion[4];
char name[32];
int unk0;
int unk1;
int triangleCount;
int unkCount0;
int vertexCount;
int unkCount1;
int unkCount2;
int meshCount;
int unks2[9];
RDHV rdhv; // Vertex Data
RDHT rdht; // Triangle Data
RDHM rdhm; // Mesh Data
};
RDEH rdeh; // Header
PMOC pmoc[rdeh.objectCount]<optimize=false>; // Object/Model
// Some other stuff after, material? or w/e
Ok, someone can explain to me what it serves?
I mean
Is a code for...?
I am a noob on research
...
However, this can be useful? (but this is anotehr motorbike)
Re: GP500 .dk4
Posted: Sun Apr 30, 2023 2:34 pm
by Durik256
i made plugin for Noesis
no format research, just keyword search)
bike4.png
fmt_dk4.py
Re: GP500 .dk4
Posted: Sun Apr 30, 2023 5:34 pm
by Fiammanera628
Durik256 wrote: ↑Sun Apr 30, 2023 2:34 pm
i made plugin for Noesis
no format research, just keyword search)
bike4.png
fmt_dk4.py
I can say only a big THANK YOU for this plugin!

Really, I repeat, THANK YOU guys for helping me

Re: GP500 .dk4
Posted: Fri May 05, 2023 5:51 pm
by Karpati
Fiammanera628 wrote: ↑Sat Apr 29, 2023 3:48 pm
Hello there!
There is a way to extract 3d models from this game? It uses .dk4 files and the tools that actually open them are not accesible anymore

If someone can help me pls
Can you tell me how did you extracted the files from the .dkz archive files?