Page 4 of 6

Re: Dark Sider 2 Model?

Posted: Wed Sep 19, 2012 8:53 pm
by jayn23
Thanks a lot Finale00 awesome work!!!
and TaylorMouse thanks for your hard work and for keeping the thread alive :D

Re: Dark Sider 2 Model?

Posted: Wed Sep 19, 2012 9:15 pm
by finale00
TaylorMouse wrote:Damn!! I wanted to beat this one :D

But.. Finale00, nice one

T.
Still a lot of unk structs.
Don't know how the normals and UV's are stored at all.
Would have to print out the values and analyze them.

Re: Dark Sider 2 Model?

Posted: Wed Sep 19, 2012 9:45 pm
by TaylorMouse
Of course I'm not givin up, I want it to work in my C# code too :)

btw I verified this part:

Code: Select all

float[6] bbox?
this is indeed the Bounding Box !

T.

Re: Dark Sider 2 Model?

Posted: Wed Sep 19, 2012 11:16 pm
by TaylorMouse
YES !! my c# code does it to!!

the Chancelor

Image

T.

Re: Dark Sider 2 Model?

Posted: Wed Sep 19, 2012 11:48 pm
by finale00
Which library do you use to render? Ogre3D? Or do you export to obj and then just load it up somewhere?

Re: Dark Sider 2 Model?

Posted: Thu Sep 20, 2012 3:35 am
by amzerof6
TaylorMouse wrote:YES !! my c# code does it to!!

the Chancelor

Image

T.
Congratulation!! that's great

Re: Dark Sider 2 Model?

Posted: Thu Sep 20, 2012 8:36 am
by TaylorMouse
I have the code write out an mtl file and an obj file, then I import it into 3DS MAX 2010, then I took a screenshot to post here :)

T.

Re: Dark Sider 2 Model?

Posted: Fri Sep 21, 2012 11:13 pm
by logansan25
Any tutorial for get this models, i am a noob.

Re: Dark Sider 2 Model?

Posted: Sat Sep 22, 2012 4:03 pm
by TaylorMouse
well,
buy the game
use the extraction tool in the forum to extract the models from their archive
download Naosis
get the py script from Finale00 dropbox ( get everything, it's great :) )
start naosis and look at the models
export them to whatever
import them into your favorite 3D tool !

I'm making a little tool myself to do this in c# (convert to OBJ) but it is not finished yet...

T.

Re: Dark Sider 2 Model?

Posted: Sat Sep 22, 2012 5:58 pm
by logansan25
TaylorMouse wrote:well,
buy the game
use the extraction tool in the forum to extract the models from their archive
download Naosis
get the py script from Finale00 dropbox ( get everything, it's great :) )
start naosis and look at the models
export them to whatever
import them into your favorite 3D tool !

I'm making a little tool myself to do this in c# (convert to OBJ) but it is not finished yet...

T.
Where are extraction tool version final?

I did read all post but i have dude about this.

I did buy game today.

:)

Re: Dark Sider 2 Model?

Posted: Sun Sep 23, 2012 12:08 pm
by TaylorMouse
It was posted on page 2:

http://sktest.aruarose.com/DS2Extract.rar

T.

Re: Dark Sider 2 Model?

Posted: Mon Sep 24, 2012 10:55 am
by joeyq
great plugin finale00! unfortunately 32 characters make noesis crash :(. some are: darkwar.dcm, despair.dcm (death's horse), maker_shaman.dcm (blind priestess Muria) and uriel.dcm.
I haven't tested all weapons/items yet on crashes but some do.
hopefully there's some progress on uv's because these are some great models to study.

Re: Dark Sider 2 Model?

Posted: Tue Sep 25, 2012 11:26 am
by Silvist
Awesome job TaylorMouse! I looked at this topic when it was at like page 2, and huge progress in last couple pages lol. I myself am interested in the tool you are working on. Cause I love working in 3ds max ^^

Once again grats ^^

Re: Dark Sider 2 Model?

Posted: Tue Sep 25, 2012 11:06 pm
by TaylorMouse
Still working on this one...

apparently, the textures are referenced in the .bmat files.

in the dcm file there is a reference to that file.

ex.: absolom.dcm has a reference to absolomA01.bmat
and in the .bmat file you will find all the textures required.

here is my c# class that reads out the necessary textures:

Code: Select all

public static Material GetMaterial(string fileName)
        {
            string file = fileName + ".bmat";
            Material mat = new Material();
            if (!File.Exists(file)) return null;

            using (BinaryReader br = new BinaryReader(new FileStream(file, FileMode.Open, FileAccess.Read)))
            {
                Debug.WriteLine("- " + br.ReadString(3)); // BOD
                br.ReadByte(); // FD
                
                int nbrTextures = br.ReadInt16();

                int unk1 = br.ReadInt16();
                uint unk2 = br.ReadUInt32();
                uint unk3 = br.ReadUInt32();

                int unk4 = br.ReadByte();
                int unk5 = br.ReadByte();
                uint unk6 = br.ReadUInt32();
                uint unk7 = br.ReadUInt32();

                int len = br.ReadInt16();
                br.ReadString(len); // Material
                br.ReadBytes(13);
                
                len = br.ReadInt16();
                br.ReadString(len); // Name
                br.ReadBytes(10);

                len = br.ReadInt16();
                br.ReadString(len); // Model name
                br.ReadBytes(9);

                len = br.ReadInt16();
                Debug.Write("  - " + br.ReadString(len) + ": "); // Shader Name
                br.ReadBytes(10);

                len = br.ReadInt16();
                Debug.WriteLine(br.ReadString(len)); // 
                br.ReadBytes(9);

                len = br.ReadInt16();
                br.ReadString(len); // parameters
                br.ReadBytes(16);

                len = br.ReadInt16();
                Debug.Write("  - " + br.ReadString(len) + ": " ); // Emissive map
                br.ReadBytes(15);

                len = br.ReadInt16();
                br.ReadString(len); // texture parameters
                br.ReadBytes(13);

                len = br.ReadInt16();
                br.ReadString(len); // value
                br.ReadBytes(10);

                len = br.ReadInt16();
                mat.EmisMap = br.ReadString(len) + ".dds";
                Debug.WriteLine(mat.EmisMap); // TEXTURE EMIS .dds
                br.ReadBytes(9);

                len = br.ReadInt16();
                br.ReadString(len); // UAddress Mode
                br.ReadBytes(14);

                len = br.ReadInt16();
                br.ReadString(len); // VAddress Mode
                br.ReadBytes(26);

                len = br.ReadInt16();
                br.ReadString(len); // Specular Color 
                br.ReadBytes(15);

                len = br.ReadInt16();
                br.ReadString(len); // Vector4 Parameter 
                br.ReadBytes(55);

                len = br.ReadInt16();
                br.ReadString(len); // EmissiveColor 
                br.ReadBytes(66);

                len = br.ReadInt16();
                Debug.Write( "  - " + br.ReadString(len) + ": ") ; // Diffuse Map 1
                br.ReadBytes(30);

                len = br.ReadInt16();
                mat.DiffMap = br.ReadString(len) + ".dds";
                Debug.WriteLine(mat.DiffMap); // TEXTURE DIFFUSE .dds
                br.ReadBytes(41);

                len = br.ReadInt16();
                Debug.Write("  - " + br.ReadString(len) + ": "); // Specular Map 
                br.ReadBytes(30);

                len = br.ReadInt16();
                mat.SpecMap = br.ReadString(len) + ".dds";
                Debug.WriteLine(mat.SpecMap ); // TEXTURE SPECULAR .dds
                br.ReadBytes(41);

                len = br.ReadInt16();
                Debug.Write("  - " + br.ReadString(len) + ": "); // Normal Map 
                br.ReadBytes(30);

                len = br.ReadInt16();
                mat.NormMap = br.ReadString(len) + ".dds";
                Debug.WriteLine(mat.NormMap); // TEXTURE NORMAL .dds
                br.ReadBytes(9);

                len = br.ReadInt16();
                br.ReadString(len); // SRGBTexture
                br.ReadBytes(23);

                len = br.ReadInt16();
                br.ReadString(len); // FloatParameters
                br.ReadBytes(25);

                br.Close();
            }

            mat.FileName = file;
            return mat;
        }
Sometimes the reference is before the bones, sometimes after it, and sometimes in the middle ( for statics )

I also noticed there is a UAddress Mode and a VAddress Mode, wandering if this has anything to do with the UV texture coordinates we don't seem to find :/

T.

Re: Dark Sider 2 Model?

Posted: Fri Sep 28, 2012 8:41 am
by TaylorMouse
Cleaned up my code and finally succeeded in adding the correct textures to the correct faces and have the multi-objects in obj format, pffff.

Next on the list is to check why the despair.dcm file and the darkwar.dcm file are not in the same format...



Only missing piece is the texture coordinates :?

ANYONE can help???