Join also our Discord channel! Click here.

[Request]Hob game MDL converter

Post questions about game models here, or help out others!
User avatar
Kva3imoda
beginner
Posts: 38
Joined: Sun May 29, 2016 12:12 am
Location: Russia
Has thanked: 9 times
Been thanked: 7 times
Contact:

Re: [Request]Hob game MDL converter

Post by Kva3imoda » Fri May 25, 2018 10:38 am

akderebur wrote:You already have all the details actually :D
I know, but I do not have experience in such stuff. Honestly, I used a hex editor more than 10 years ago and this is my first binary 3d models. I also need to explain to my friends what I need and how to do it and they also have a very vague idea of how this all works. [roll] This is the reason why I asked for more details.

P.S. Oh, we made a small trial mod using these models: https://steamcommunity.com/sharedfiles/ ... 1392044956
I think I need to add information about you guys and about Хentax. What do you think about it? I'm not sure if you need fame. :)

User avatar
Kva3imoda
beginner
Posts: 38
Joined: Sun May 29, 2016 12:12 am
Location: Russia
Has thanked: 9 times
Been thanked: 7 times
Contact:

Re: [Request]Hob game MDL converter

Post by Kva3imoda » Wed May 30, 2018 12:52 pm

Оk, guys. This weekend we finished the converted utility. Many thanks to our friend @V for coding. :wink:
Hob MDL to OGRE MESH Converter(v1.0.0.0) (update Sep 16, 2020)

Remember this utility converts MDL files into OGRE MESH(v1.100) files, but this is only part of the necessary process. If you want to use these 3D models for your mods in Torchlight/Torchlight2 game. Then you need to take a few more steps.

In addition, you will need this: OgreXMLConverters + Ogre Meshy viewer

Basic Usage
-----------
1. Place all the converters in any separate folder.
2. Drag and drop a .MDL file onto the HobMdlToMesh.exe converter (or a shortcut to it, if you prefer)
3. Take the resulting .MESH file and drag and drop it onto OgreXMLConverter 1.100.
4. Open the resulting .XML file. Correct the material and the skeleton sections (remove the extra path like this: MEDIA/CHARACTERS/M_SCUTTLECRAB/M_SCUTTLECRAB.skeleton). Change "float2" to "2" (texture_coord_dimensions_0="float2") and save changes.
(At this point you can use this XML file as you want - if you have the appropriate plugins, then you can import it(for example) into Blender)
5. Take the edited XML-file and drag and drop it onto OgreXMLConverter 1.41 (this converter is included in Ogre Command Line Tools v. 1.7.2). This will result in a TL2-compatible .MESH model. (Technically, you are downgrading a 3d model in v1.41).
6. Convert the Hob TGA textures to a DDS or PNG textures. Create a .material file. (You can take any standard .material from any suitable model and change it to your own needs) Create a .animation file if you need it (Use GUTS or any text editor). Use the model as you want.

P.S. It requires .net 4.6.1 or higher.
Last edited by Kva3imoda on Wed Sep 23, 2020 3:24 am, edited 2 times in total.

User avatar
09williamsad
beginner
Posts: 33
Joined: Sun Mar 13, 2016 2:09 pm
Has thanked: 2 times
Been thanked: 11 times

Re: [Request]Hob game MDL converter

Post by 09williamsad » Mon May 11, 2020 7:53 pm

Hello

I have been testing the tool with the latest version and it seems to work for most models barring those in the Characters\!Player folder along with the player accessories.

Errors:
Unhandled Exception:
System.ArgumentOutOfRangeException: Index was out of range. Must be non-negative and less than the size of the collection.
Parameter name: startIndex
at System.ThrowHelper.ThrowArgumentOutOfRangeException(ExceptionArgument argument, ExceptionResource resource)
at System.BitConverter.ToInt32(Byte[] value, Int32 startIndex)
at HobMdlToMesh.DeSerializers.HobOneNineO.ConvertMdlToMesh(String mdlPath)
at HobMdlToMesh.Program.ProcessFile(String mdlPath)
at HobMdlToMesh.Program.Main(String[] args)

Some of the models with this error:
MEDIA\CHARACTERS\!PLAYER\PLAYER.mdl
MEDIA\CHARACTERS\!PLAYER\WARP\WARP_PLATE02.mdl
MEDIA\CHARACTERS\M_CONSTRUCT_HERO\M_CONSTRUCT_HERO.mdl
MEDIA\CHARACTERS\!PLAYER_ROGUE\PLAYER_ROGUE_CLONE.mdl

From what I understand this is due to byte differences between some models, is there an easy way to resolve this?
My asset archive of models, audio, animations etc https://tinyurl.com/09williamsad

ecwhite01
n00b
Posts: 10
Joined: Mon May 18, 2020 6:02 pm
Has thanked: 7 times

Re: [Request]Hob game MDL converter

Post by ecwhite01 » Tue May 19, 2020 3:58 am

I found this game 3 days ago (haven't beat it yet, no spoilers) and I found this thread this morning. @Kva3imoda and @akderebur, you may be my new favorite people. seriously, I love what you guys have done. I desperately want to help with this! so far I have taken many of the .MDL files and used your converter to turn them into .MESH files, but that's where I get lost. I would be happy to post the .mesh files if it would help you guys, but I feel like you have probably already moved further along than needing those. Also if you know how to take a .MESH file and make it a .OBJ or .STL I'd love to learn that. Attachment is one of the files I turned into a mesh with your handy tool.
You do not have the required permissions to view the files attached to this post.

ecwhite01
n00b
Posts: 10
Joined: Mon May 18, 2020 6:02 pm
Has thanked: 7 times

Re: [Request]Hob game MDL converter

Post by ecwhite01 » Tue May 19, 2020 4:08 am

4. Open the resulting .XML file. Correct the material and the skeleton sections (remove the extra path like this: MEDIA/CHARACTERS/M_SCUTTLECRAB/M_SCUTTLECRAB.skeleton). Change "float2" to "2" (texture_coord_dimensions_0="float2") and save changes.


here's where I get lost

User avatar
09williamsad
beginner
Posts: 33
Joined: Sun Mar 13, 2016 2:09 pm
Has thanked: 2 times
Been thanked: 11 times

Re: [Request]Hob game MDL converter

Post by 09williamsad » Tue May 19, 2020 8:12 pm

ecwhite01 wrote:
Tue May 19, 2020 4:08 am
4. Open the resulting .XML file. Correct the material and the skeleton sections (remove the extra path like this: MEDIA/CHARACTERS/M_SCUTTLECRAB/M_SCUTTLECRAB.skeleton). Change "float2" to "2" (texture_coord_dimensions_0="float2") and save changes.


here's where I get lost
That means to remove the red part from the text in the XML file.
My asset archive of models, audio, animations etc https://tinyurl.com/09williamsad

ecwhite01
n00b
Posts: 10
Joined: Mon May 18, 2020 6:02 pm
Has thanked: 7 times

Re: [Request]Hob game MDL converter

Post by ecwhite01 » Tue May 19, 2020 8:44 pm

yeah, but where? in the log file? in meshy? in the hex editor?

User avatar
09williamsad
beginner
Posts: 33
Joined: Sun Mar 13, 2016 2:09 pm
Has thanked: 2 times
Been thanked: 11 times

Re: [Request]Hob game MDL converter

Post by 09williamsad » Tue May 19, 2020 8:47 pm

ecwhite01 wrote:
Tue May 19, 2020 8:44 pm
yeah, but where? in the log file? in meshy? in the hex editor?
In the XML file that is generated, if one does not generate then the model may not convert.
My asset archive of models, audio, animations etc https://tinyurl.com/09williamsad

User avatar
09williamsad
beginner
Posts: 33
Joined: Sun Mar 13, 2016 2:09 pm
Has thanked: 2 times
Been thanked: 11 times

Re: [Request]Hob game MDL converter

Post by 09williamsad » Wed May 20, 2020 9:18 pm

My asset archive of models, audio, animations etc https://tinyurl.com/09williamsad

ecwhite01
n00b
Posts: 10
Joined: Mon May 18, 2020 6:02 pm
Has thanked: 7 times

Re: [Request]Hob game MDL converter

Post by ecwhite01 » Wed May 20, 2020 10:19 pm

what is the batchConvertHob.ps1 file?

ecwhite01
n00b
Posts: 10
Joined: Mon May 18, 2020 6:02 pm
Has thanked: 7 times

Re: [Request]Hob game MDL converter

Post by ecwhite01 » Thu May 21, 2020 1:43 am

duckdeer_m stl
You do not have the required permissions to view the files attached to this post.

User avatar
09williamsad
beginner
Posts: 33
Joined: Sun Mar 13, 2016 2:09 pm
Has thanked: 2 times
Been thanked: 11 times

Re: [Request]Hob game MDL converter

Post by 09williamsad » Thu May 21, 2020 4:44 pm

ecwhite01 wrote:
Wed May 20, 2020 10:19 pm
what is the batchConvertHob.ps1 file?
Powershell script i made for automating the conversion process.
My asset archive of models, audio, animations etc https://tinyurl.com/09williamsad

User avatar
Kva3imoda
beginner
Posts: 38
Joined: Sun May 29, 2016 12:12 am
Location: Russia
Has thanked: 9 times
Been thanked: 7 times
Contact:

Re: [Request]Hob game MDL converter

Post by Kva3imoda » Tue Jun 16, 2020 11:18 pm

Damn, more than 2 years have passed. Hi guys. I am glad that it became interesting to someone. Sorry for not responding on time. :)
09williamsad wrote:
Wed May 20, 2020 9:18 pm
Pre converted models and audio, not all converted.
Oh, did you convert audio? That would be very helpful.

About your question about non-convertible models. I will try to see what is there, but I already forgot how and what I did. :) Also my friend programmer is busy right now.

User avatar
Kva3imoda
beginner
Posts: 38
Joined: Sun May 29, 2016 12:12 am
Location: Russia
Has thanked: 9 times
Been thanked: 7 times
Contact:

Re: [Request]Hob game MDL converter

Post by Kva3imoda » Sat Jun 20, 2020 3:43 am

Well, it looks like this is the 3rd type of Mdl-file.

Image
CONSTRUCT_BLADE.MDL

As you can see, this type of MDL has FVF size 48 (Other 2 types 32 and 88). This means that our converter does not know how to convert this MDL Type3. We need a new algorithm. :[

ecwhite01
n00b
Posts: 10
Joined: Mon May 18, 2020 6:02 pm
Has thanked: 7 times

Re: [Request]Hob game MDL converter

Post by ecwhite01 » Mon Jun 22, 2020 6:44 pm

have any of you made any progress towards converting the player into a usable mesh?

Post Reply