finale00, you're awsome!!that's great job,thank u so much.
here, I uploaded some files,hope them can help you.
https://rapidshare.com/files/560451903/ ... bsolom.zip
https://rapidshare.com/files/475632349/ ... one_00.zip
https://rapidshare.com/files/3329364758/items.rar
Important information: this site is currently scheduled to go offline indefinitely by end of the year.
Dark Sider 2 Model?
Re: Dark Sider 2 Model?
Incredible man,hope the progress won't make more trouble for you and will be completed soon!finale00 wrote:Can someone upload some more? Thanks.
The dcm file is straightforward for the most part. Just need to identify what the structs are (might not be as straightforward)
Here's a quick layout of the file. I didn't look into the structures.
Noesis plugin in my dropbox. If you want to continue with that just go ahead.
Code: Select all
struct dcm_file { int[5] int[2] int float short int[5] float[6] bbox? byte short len byte[len] meshName? int int int numVerts int int numIdx int int index_buffer_size # numIdx * 2 int index_size # 2 short[numIdx] indices numVerts Vertex numVerts Unk1 numVerts Unk2 #EOF } struct Vertex { float[3] x, y, z } struct unk1 { 20 bytes } struct unk2 { 16 bytes }
Thanks, now the data makes a lot more sense...amzerof6 wrote: I upload some files, include dcm&dds .....thank a lot for those great tools
https://rapidshare.com/files/2330191840 ... axea01.zip
-
- veteran
- Posts: 138
- Joined: Mon Oct 04, 2010 1:15 am
- Has thanked: 5 times
- Been thanked: 3 times
- TaylorMouse
- ultra-veteran
- Posts: 348
- Joined: Mon Sep 26, 2011 12:51 pm
- Has thanked: 11 times
- Been thanked: 89 times
Re: Dark Sider 2 Model?
See you've been busy Finale00!
Good job!
I've been on the ranch for the last 10 days, no internet there :/
Anyways, had a good time with the ponys
I noticed that only the weapons work, and the tris are inverted.
But not complaining
EDIT: Added death himself
T.
Good job!
I've been on the ranch for the last 10 days, no internet there :/
Anyways, had a good time with the ponys
I noticed that only the weapons work, and the tris are inverted.
But not complaining
EDIT: Added death himself
T.
You do not have the required permissions to view the files attached to this post.
Last edited by TaylorMouse on Fri Aug 31, 2012 10:29 pm, edited 1 time in total.
-
- M-M-M-Monster veteran
- Posts: 2382
- Joined: Sat Apr 09, 2011 1:22 am
- Has thanked: 170 times
- Been thanked: 307 times
Re: Dark Sider 2 Model?
Ya I didn't actually do much. Just looked at it wrote down some structures and then threw up a pic.
Some people sent me some models which is good, though I haven't actually looked at them.
Some people sent me some models which is good, though I haven't actually looked at them.
- TaylorMouse
- ultra-veteran
- Posts: 348
- Joined: Mon Sep 26, 2011 12:51 pm
- Has thanked: 11 times
- Been thanked: 89 times
Re: Dark Sider 2 Model?
I did the import in MAX,
and when I read the faces ( tris)
I had to flip the faces in max so I switched it to
so that b & c are switched and the model came out ok
T.
Continuing the research
and when I read the faces ( tris)
Code: Select all
for (int i = 0; i < nFaces / 3; i++)
{
faces.Add(new Triangle()
{
a = br.ReadInt16() ,
b = br.ReadInt16() ,
c = br.ReadInt16()
});
}
Code: Select all
for (int i = 0; i < nFaces / 3; i++)
{
faces.Add(new Triangle()
{
a = br.ReadInt16() ,
c = br.ReadInt16() ,
b = br.ReadInt16()
});
}
T.
Continuing the research
- TaylorMouse
- ultra-veteran
- Posts: 348
- Joined: Mon Sep 26, 2011 12:51 pm
- Has thanked: 11 times
- Been thanked: 89 times
- TaylorMouse
- ultra-veteran
- Posts: 348
- Joined: Mon Sep 26, 2011 12:51 pm
- Has thanked: 11 times
- Been thanked: 89 times
Re: Dark Sider 2 Model?
I found out that the models ( animated once ) start with a chunk, unkown to me yet, but then follows al set of bones
and after this set of bone definitions, the same structure appears as in the weapons (ref absolom_axea01.dcm)
for the faces... but not for the vertices.;
:/
really want to beat this one...
T.
Code: Select all
struct Bone
{
int16 lenName // length of bone name
string boneName x // bone name
69 bytes // bone data
// always ends with FF
}
struct vfx
{
int16 len;
string name;
25 bytes
}
for the faces... but not for the vertices.;
:/
really want to beat this one...
T.
- TaylorMouse
- ultra-veteran
- Posts: 348
- Joined: Mon Sep 26, 2011 12:51 pm
- Has thanked: 11 times
- Been thanked: 89 times
- TaylorMouse
- ultra-veteran
- Posts: 348
- Joined: Mon Sep 26, 2011 12:51 pm
- Has thanked: 11 times
- Been thanked: 89 times
Re: Dark Sider 2 Model?
Been figuring out some of the dcm files ...
I'm not saying this will work with all of them, but I based it on death.dcm, emberhulkA01.dcm and exhumeA1.dcm..
although the last file does not seem to have any bone data....
Just hypothetically, nothing coded yet...
T.
I'm not saying this will work with all of them, but I based it on death.dcm, emberhulkA01.dcm and exhumeA1.dcm..
although the last file does not seem to have any bone data....
Code: Select all
struct Header
{
Uint32 start // start position of the mesh data
UInt32 nbrSubmeshes
UInt32 submeshSets
IndexSet[submeshSets] nIndices
UInt32 vertexSets
VertexSet[vertexSets] vertices
byte[4] ffff
Uint32 zero1
Uint32 zero2
byte[2] one
UInt32 nVertices
UInt32 unk
UInt32 unk
UInt32 unk
UInt16 nBones
Uint32 zero3
...
byte ff
}
struct IndexSet
{
UInt16 nIndices
UInt16 zero
}
struct VertexSet
{
UInt16 nVertices
UInt16 unk // FF
}
struct Bone
{
int16 lenName // length of bone name
string boneName x // bone name
// 69 bytes // bone data
float[3] unk1
UInt32 unk2 // zero
float[3] unk3
UInt32 unk4 // zero
float[3] unk5
UInt32 unk6 // zero
float[3] unk7
UInt16 unk8 // zero
Int16 unk9
Int16 unk10
UInt16 unk11 // zero
byte ff // FF or -1
}
struct Vfx
{
int16 lenName // length of visual fx name
string fxName // fx name
//25 bytes // fx data
UInt32 unk
Uint32 zero2
Int16 unk1
Int16 zero3
Uint32 zero4
Int16 unk2
Int16 zero5
Uint32 zero6
byte ff // always ends with FF
}
struct ModelData
{
UInt32 chunkSize
Uint32 chunkId
Int16[nIndices] faceData
float[nVertices] vertexData
}
T.
-
- M-M-M-Monster veteran
- Posts: 2382
- Joined: Sat Apr 09, 2011 1:22 am
- Has thanked: 170 times
- Been thanked: 307 times
Re: Dark Sider 2 Model?
Fortunately for you there are two types of models and their headers themselves are different slightly.
Of course, the vertex struct is completely different.
If you look at the absolom axe, you'll see it has the number of indices per mesh, followed by a single integer representing that many indices. Then you read the number of vertices per mesh...and then you read a signed int16 whose absolute value is the number of vertices. But then you read a short, an int -1, and then you read another integer which is the number of verts (except it's not negative).
Then you look at a model that you wrote with bones and it's different from what I said.
Presumably it's a difference between skinned/static meshes. Static meshes have a plain position buffer 3-floats each, while skinned meshes have this odd struct
The int might be a bone ID, don't know.
The format for each mesh is
I've uploaded a copy of the plugin I wrote, except it ONLY loads skinned meshes since I didn't parse the header lol
Of course, the vertex struct is completely different.
If you look at the absolom axe, you'll see it has the number of indices per mesh, followed by a single integer representing that many indices. Then you read the number of vertices per mesh...and then you read a signed int16 whose absolute value is the number of vertices. But then you read a short, an int -1, and then you read another integer which is the number of verts (except it's not negative).
Then you look at a model that you wrote with bones and it's different from what I said.
Presumably it's a difference between skinned/static meshes. Static meshes have a plain position buffer 3-floats each, while skinned meshes have this odd struct
Code: Select all
struct SkinnedVertex {
int ?
float[3]
float[3]
float[3]
float[3]
}
The format for each mesh is
Code: Select all
struct SkinnedMesh {
int32 datasize (numIdx * 2)
int32 structSize (2)
int16[numIdx] idxBuff
numVerts * 12 bytes
numVerts Vertex
numVerts * 16 bytes (a bunch of floats and zeroes)
numVerts * 4 bytes (a byte of bytes)
}
I've uploaded a copy of the plugin I wrote, except it ONLY loads skinned meshes since I didn't parse the header lol
-
- M-M-M-Monster veteran
- Posts: 2382
- Joined: Sat Apr 09, 2011 1:22 am
- Has thanked: 170 times
- Been thanked: 307 times
Re: Dark Sider 2 Model?
Ok the header is actually not what I thought it was.
After the index counts for the meshes, you then have number of vertex counts, followed by vertex counts.
However, this part is kind of weird. It looks like this
I don't understand why it's a signed value really, but if it's negative you just have to take the absolute value to get what you want. So I would probably just read everything as absolute signed integers.
Afterwards, you have the following struct that loops mesh times (the second integer). I guess these are the actual mesh structs, each holding references to the material it uses, the bones that are attached, and other things. The mesh data itself is stored afterwards.
The idxStart and vertStart should be clear what they are for.
And then now you are at the start of the mesh data (offset stored in the first integer of the file)
I have updated my script to load pretty much all of the models without crashing.
After the index counts for the meshes, you then have number of vertex counts, followed by vertex counts.
However, this part is kind of weird. It looks like this
Code: Select all
signed numVertCount
numVertCount {
signed int32 numVerts
}
signed numVertCount2
numVertCount2 {
signed int32 numVerts
float ??
}
Afterwards, you have the following struct that loops mesh times (the second integer). I guess these are the actual mesh structs, each holding references to the material it uses, the bones that are attached, and other things. The mesh data itself is stored afterwards.
Code: Select all
struct {
byte modelType # 0 or 1, static or skinned
byte ?
int numVerts
int ?
int ?
int numSubMesh
int numBones
float[6] bbox
numBones {
byte ??
int len
byte[len] name
float[16] matrix
int ??
}
numSubMesh {
byte ??
int len
byte[len] submesh name?
int matNum
int ?
int numVerts
int vertStart
int numIdx
int idxStart
}
}
And then now you are at the start of the mesh data (offset stored in the first integer of the file)
I have updated my script to load pretty much all of the models without crashing.
You do not have the required permissions to view the files attached to this post.
Last edited by finale00 on Wed Sep 19, 2012 10:06 pm, edited 1 time in total.
-
- advanced
- Posts: 57
- Joined: Sat Oct 23, 2010 3:50 pm
- Has thanked: 2 times
- Been thanked: 2 times
Re: Dark Sider 2 Model?
wow,amazing,finale00 !! I try your noesis plugin,most of model are fine,chars\item\world they all fine, just a few of them had error.
I must say that, thank u,thank u,thank u!!!!
I think .bmat include date of materials; .o3d include skin or bones ; .psystem is anim
Honest, just model & materials with UV that can satisfy me.
thanks again, if you need anything, just say it, I'll try my best.
I must say that, thank u,thank u,thank u!!!!
I think .bmat include date of materials; .o3d include skin or bones ; .psystem is anim
Honest, just model & materials with UV that can satisfy me.
thanks again, if you need anything, just say it, I'll try my best.
- TaylorMouse
- ultra-veteran
- Posts: 348
- Joined: Mon Sep 26, 2011 12:51 pm
- Has thanked: 11 times
- Been thanked: 89 times