[Tutorial] Importing Diablo III models into Torchlight

Forum for discussing the Torchlight mod toolset.

[Tutorial] Importing Diablo III models into Torchlight

Postby Jackalhead » Fri Apr 13, 2012 10:41 am

Importing Diablo III Monster and Character Models Into Torchlight

Big thanks to SixShotOverdrive for being patient with me and explaining how to correctly export the models in a way that Torchlight can use them. :] Without his help, I never would have figured all this out. I apologize just in case it is written a little weird or doesn't make sense in certain parts. I wrote it while I was learning the process and haven't had a chance to review it yet, but I will soon.

What You Need:
1. Diablo MPQ Editor
2. D3AppConvert2Obj
3. D3TexConv_0.9
4. 3DSMax 2009
5. TorchED’s Official 3DSMax Exporter Scripts
6. ImportOgreXML_0.02 3DSMax Script
7. Ogre Command Line Tools 1.6.3
8. Diablo III Beta Client

STEP 1: MPQ EDITOR
1.) Open Diablo 3 MPQ Editor and load ClientData.mpq.
2.) Export the model you want from the ‘Appearance’ folder.
3.) Open Texture.mpq and extract the corresponding texture.

STEP 2: D3AppConvert2Obj.exe
1.) Put the .app model with D3AppConvert2Obj.exe under the C:\ root directory.
2.) Do a search for cmd.exe on your computer. Right click it and select ‘run as administrator.’
3.) Type in “cd..” twice or however many times it takes until the command line shows the main C:\ root directory.
4.) Type in “D3AppConvert2Obj.exe –f (exact name of the .app file)”
5.) Press enter. A new .obj file should be created.

STEP 3: D3TexConv_0.9
1.) Put the .tex file you got from Texture.mpq in the same directory as D3TexConv.exe.
2.) Drag and drop the .tex file onto the .exe file. It will open and process then tell you to press any key to close the application.
3.) Look in your C:\Documents and Settings\Compaq_Administrator folder to find the newly created .dds file.
4.) Open up the .material file in the monster’s that you’re replacing folder. Look next to where it says the .png file and rename the .dds file this exact name. Then open up the .dds file and save as a .png file of the same name.
5.) Put this new .dds and .png files with your new .obj file for now.


STEP 4: 3DS Max Part 1: Skeletons & Animations
1.) Navigate to your Torched\Media\Models folder and select a monster that has similar animations to the one you are importing from Diablo III.
2.) Copy and paste the entire monster’s folder to C:\Documents and Settings\User\Application Data\Runic Games\Torchlight\Mods\<your mod name>\media\models
3.) Grab the .MESH and .Skeleton files from this folder.
4.) Use OgreCommandLineTool’s OgreXMLConverter.exe to convert the .MESH and .Skeleton files into .XML files.
5.) Make sure the ImportOgreXml_0.02.ms is installed in 3DS Max’s plugin folder.
6.) Open the Mesh.XML file using the importer in Max. Import the skeleton as well and all of the animation skeleton files.
7.) Save this file as (name of monster).max.
8.) Click File -> Import and select the .OBJ file you created from the .APP file.
9.) Take a look at the name of the mesh’s name that you are replacing and take note of it.
10.) Delete the skin modifier to free the Torchlight monster’s mesh from the bones and then delete that mesh.
11.) Once the original mesh is deleted, rename the Diablo III mesh as “m_(monster’s name)”
12.) Rotate the Diablo III Mesh to line up with the bones that were just added and position them as close as you possibly can.
13.) Right click your mesh and select ‘object properties’. Check off both ‘Freeze’ and ‘See through’ then click okay.
14.) Align, rotate and resize the bones inside of the mesh so that they line up with it. When you are done, save the project.
15.) Unfreeze your mesh.
16.) Select your mesh and then go to the ‘modifiers’ tab with the button in the right-hand panel and from the drop down list select ‘Skin’.
17.) At the bottom of the screen, you’ll see ‘Bones’. Click ‘Add’ and select all of the bones and click ‘okay’.


STEP 6: 3DS Max Part 2: Weighting the Mesh
1.) Click ‘Edit Envelopes’
2.) Scroll down on the list of bones and look for the name of the bone that causes the model to distort when rotated. Select it. You should see it highlight in red in the display window.
3.) Make sure the check box ‘Vertices’ is checked under ‘Select’.
4.) Hold down the shift key and click and drag to highlight the vertices that distort.
5.) Once they are highlighted in white boxes, scroll down to ‘Abs Value’ and click in the box. Entering ‘1’, will make the vertices stick to the limb that is distorting and entering ‘0’ will make them hang loose.
6.) Continually try playing various animations to see all of the distortion and fix it.


STEP 7: Exporting the Mesh
1.) Export the .MESH file. This will create an .XML file in the 3DS Max \ export folder under My Documents. It will also create a .material file.
2.) Load up the animation called ‘Bind’. File -> Export and export it as the exact same name as the mesh file. For example, if you named your mesh file d3fetish, you will also want to name your skeleton file that. For the animation name, put ‘Bind’. Specify the frame range as ‘0-0’. This will create another .XML file.
3.) Export all of the animations one at a time, by double clicking them in Graboi’s plugin and then naming them appropriately and specifying the animation range (such as 0-60).
4.) Go under your 3DS Max Export folder and use the OgreXMLConverter to convert the new .MESH.XML and .SKELETON.XML files to .MESH or .SKELETON files.
5.) Copy the .MESH file, the .SKELETON files and the .material file and place them under a new media\models folder in your mods directory. Also, remember to copy and paste the monster’s .dds and .png files into this new folder as well.
6.) Copy and paste the .animation file from the original monster who’s skeleton you used. Rename it appropriately and put it in your mod’s model folder as well.
7.) Edit the monster's .material file to look like the following, in order to remove the blackness around the mesh:

Spoiler: show
material material_name
{
technique
{
pass
{
ambient 0.588 0.588 0.588
diffuse 0.588 0.588 0.588
specular 0 0 0 0
emissive 0 0 0
scene_blend alpha_blend
alpha_rejection greater 5

texture_unit
{
texture texture.png
}
}
}
}

8.) Copy and paste the entire model folder into your TorchED \ Media \ Models folder as well.

Now go into TorchED and swap out whatever model you want with your new model. :] Run the game and it should be in there. You should get something like this...

Image
Last edited by Jackalhead on Tue May 01, 2012 6:18 am, edited 2 times in total.
User avatar
Jackalhead
 
Posts: 1587
Joined: Thu Mar 15, 2012 7:47 pm
Location: Omnipresent

Re: [Tutorial] Importing Diablo III models into Torchlight

Postby Brixtan » Fri Apr 13, 2012 11:13 am

lol - is that a fetish you ripped/plopped into TL?
Image
"If a problem is too big to fix, one must break it into smaller problems."
The Ember Adventurer's Club: free toasters while they last.
User avatar
Brixtan
 
Posts: 2135
Joined: Thu Jun 16, 2011 9:12 am
Location: Pittsburgh, PA

Re: [Tutorial] Importing Diablo III models into Torchlight

Postby Jackalhead » Fri Apr 13, 2012 11:36 am

Yup! lol One of my favorite monsters from the Diablo universe since Diablo II. If the beta had fallen ones, I would have done one of them instead.
User avatar
Jackalhead
 
Posts: 1587
Joined: Thu Mar 15, 2012 7:47 pm
Location: Omnipresent

Re: [Tutorial] Importing Diablo III models into Torchlight

Postby Brixtan » Fri Apr 13, 2012 12:05 pm

Can you post a video on youtube so we can see it in action? Does it walk/run/die/attack?
Image
"If a problem is too big to fix, one must break it into smaller problems."
The Ember Adventurer's Club: free toasters while they last.
User avatar
Brixtan
 
Posts: 2135
Joined: Thu Jun 16, 2011 9:12 am
Location: Pittsburgh, PA

Re: [Tutorial] Importing Diablo III models into Torchlight

Postby Jackalhead » Fri Apr 13, 2012 1:08 pm

Brixtan wrote:Can you post a video on youtube so we can see it in action? Does it walk/run/die/attack?


Yes, it does all of that. :] Can even cast spells!

I just finished replacing the Alchemist with the Triune Cultist and for that one, I gave it all of the animations the alchemist has. So you can even go fishing.

I can *try* and make a video, but I am on my dad's crappy compaq until I can afford to order myself a new computer in a couple weeks. It already lags pretty bad, but I'll see what I can do tonight. ;)
User avatar
Jackalhead
 
Posts: 1587
Joined: Thu Mar 15, 2012 7:47 pm
Location: Omnipresent

Re: [Tutorial] Importing Diablo III models into Torchlight

Postby Jackalhead » Fri Apr 13, 2012 1:41 pm

Here is a screenshot of the playable Triune Cultist class.

Image

Rigged the Skeleton King to the troll's bones... lol, turned out kinda funny. Probably should have picked a better set of bones.

Image
User avatar
Jackalhead
 
Posts: 1587
Joined: Thu Mar 15, 2012 7:47 pm
Location: Omnipresent

Re: [Tutorial] Importing Diablo III models into Torchlight

Postby Rusty » Fri Apr 13, 2012 6:17 pm

Awesome tutorial Jackalhead!! If I had D3, I would definitely try this!
User avatar
Rusty
 
Posts: 1280
Joined: Mon Nov 07, 2011 9:19 am
Location: Portland, OR

Re: [Tutorial] Importing Diablo III models into Torchlight

Postby Zidders » Fri Apr 13, 2012 6:46 pm

<.<


>.>

Blahblahblahcopyrightblah

*ahem*

Now that i've officially got that out of the way...

OMG this is awesome.
When they knock you down
Don't break character
You've got so much heart
Is this real or just a dream?
Rise up like the sun
And labor till the work is done
(Be Still-The Killers)
User avatar
Zidders
 
Posts: 12352
Joined: Fri Oct 30, 2009 9:50 am
Location: Bertram, Texas

Re: [Tutorial] Importing Diablo III models into Torchlight

Postby SixshotOverdrive » Fri Apr 13, 2012 8:20 pm

Nice work Jackalhead :)

Jackalhead wrote:Rigged the Skeleton King to the troll's bones... lol, turned out kinda funny. Probably should have picked a better set of bones.

Yeah, that's the key part. If you choose the wrong skeleton, there's not a lot you can do to stop it looking weird lol

I should really get on that blender monster editing guide :oops:
Image
User avatar
SixshotOverdrive
 
Posts: 510
Joined: Sat May 07, 2011 4:34 pm

Re: [Tutorial] Importing Diablo III models into Torchlight

Postby Arkham » Fri Apr 13, 2012 9:40 pm

You made the Triune Cultist model into a class? Holy crap.
Nice work, Jackal. Always nice to have newer modders, and new guides showing people how do to fun stuff, around.
Image

Mods:
Arkham's Armory (TL2) | Lego Wizard pet (TL1)

Check out the Torchlight fan group #The-Lure-of-Ember on dA!
User avatar
Arkham
 
Posts: 2855
Joined: Tue Jan 19, 2010 12:20 am
Location: Seattle, WA

Re: [Tutorial] Importing Diablo III models into Torchlight

Postby Brixtan » Sat Apr 14, 2012 4:58 am

While I think I already know the answer to this (it's no), I'm going to ask anyway - do any of the armor meshes display on the imported D3 cultist you imported?
Image
"If a problem is too big to fix, one must break it into smaller problems."
The Ember Adventurer's Club: free toasters while they last.
User avatar
Brixtan
 
Posts: 2135
Joined: Thu Jun 16, 2011 9:12 am
Location: Pittsburgh, PA

Re: [Tutorial] Importing Diablo III models into Torchlight

Postby Jackalhead » Sat Apr 14, 2012 7:12 am

Brixtan wrote:While I think I already know the answer to this (it's no), I'm going to ask anyway - do any of the armor meshes display on the imported D3 cultist you imported?


Not yet, but it wouldn't be hard to make it so they do. It might look a little weird layering robes over the already existing cultist robes though but would be easy as cake to do. For now, he can equip any weapon in any hand and has all the anims the Alchemist does though.
User avatar
Jackalhead
 
Posts: 1587
Joined: Thu Mar 15, 2012 7:47 pm
Location: Omnipresent

Re: [Tutorial] Importing Diablo III models into Torchlight

Postby Brixtan » Sat Apr 14, 2012 10:18 am

Jackalhead wrote:
Brixtan wrote:While I think I already know the answer to this (it's no), I'm going to ask anyway - do any of the armor meshes display on the imported D3 cultist you imported?


Not yet, but it wouldn't be hard to make it so they do. It might look a little weird layering robes over the already existing cultist robes though but would be easy as cake to do. For now, he can equip any weapon in any hand and has all the anims the Alchemist does though.


*strokes his chin* hmmm...excellent
Image
"If a problem is too big to fix, one must break it into smaller problems."
The Ember Adventurer's Club: free toasters while they last.
User avatar
Brixtan
 
Posts: 2135
Joined: Thu Jun 16, 2011 9:12 am
Location: Pittsburgh, PA

Re: [Tutorial] Importing Diablo III models into Torchlight

Postby Jackalhead » Sat Apr 14, 2012 7:00 pm

Hey SixShot, do you know if there is a way to edit bones while they are bound? Or do you have to unbind everything to do that?
User avatar
Jackalhead
 
Posts: 1587
Joined: Thu Mar 15, 2012 7:47 pm
Location: Omnipresent

Re: [Tutorial] Importing Diablo III models into Torchlight

Postby Arkham » Sat Apr 14, 2012 7:24 pm

Sixshot will be able to answer more definitively but I'm fairly certain the answer is "yes."
Ideally you'd want to copy the skin weights somewhere before you do this, so you don't have to redo them from scratch when you rebind the skeleton after you're done changing the bones.
Image

Mods:
Arkham's Armory (TL2) | Lego Wizard pet (TL1)

Check out the Torchlight fan group #The-Lure-of-Ember on dA!
User avatar
Arkham
 
Posts: 2855
Joined: Tue Jan 19, 2010 12:20 am
Location: Seattle, WA

Re: [Tutorial] Importing Diablo III models into Torchlight

Postby Jackalhead » Sat Apr 14, 2012 7:33 pm

Arkham wrote:Sixshot will be able to answer more definitively but I'm fairly certain the answer is "yes."
Ideally you'd want to copy the skin weights somewhere before you do this, so you don't have to redo them from scratch when you rebind the skeleton after you're done changing the bones.


Ah, thanks for the answer Arkham. What happened was I had rigged the gobbler's bones to the scavenger's mesh and (in order to make them fit properly) I had scaled the arm bones up so they lined up at the joint of the elbow. However, for some reason that enlarged the actual mesh's arm so the arms were way bigger than they were supposed to be and I hadn't realized I had done this till I was half done weighting the mesh. haha Newb mistake, I know.

What do you do when the size of certain body parts (like upper arm or lower arm) on the mesh do not match the size of the bones on the skeleton? Is there a way to rig them properly without resizing the bone?
User avatar
Jackalhead
 
Posts: 1587
Joined: Thu Mar 15, 2012 7:47 pm
Location: Omnipresent

Re: [Tutorial] Importing Diablo III models into Torchlight

Postby SixshotOverdrive » Sat Apr 14, 2012 8:19 pm

Arkham wrote:Ideally you'd want to copy the skin weights somewhere before you do this, so you don't have to redo them from scratch when you rebind the skeleton after you're done changing the bones.

^ This. It's called SkinUtilities, it lets you copy the skin and paste it back on later.

Jackalhead wrote:What do you do when the size of certain body parts (like upper arm or lower arm) on the mesh do not match the size of the bones on the skeleton? Is there a way to rig them properly without resizing the bone?

You generally need to make them fit, especially if it's a bone that flows into another. For example, the meshes elbow should be roughly the same position as the skeletal elbow or else it's really not going to look good no matter how you weight it.
Image
User avatar
SixshotOverdrive
 
Posts: 510
Joined: Sat May 07, 2011 4:34 pm

Re: [Tutorial] Importing Diablo III models into Torchlight

Postby Jackalhead » Sun Apr 15, 2012 6:54 am

SixshotOverdrive wrote:You generally need to make them fit, especially if it's a bone that flows into another. For example, the meshes elbow should be roughly the same position as the skeletal elbow or else it's really not going to look good no matter how you weight it.


Is there a way to re-size the bone without changing the size of the attached part of the mesh then? For example, the scavenger mesh's upper arm is shorter than the gobbler's upper arm but his forearm is much longer. When I re-size the bones to make them line up with the mesh and then apply the skin modifier, It distorts his arms for some reason, making them awkwardly long.
User avatar
Jackalhead
 
Posts: 1587
Joined: Thu Mar 15, 2012 7:47 pm
Location: Omnipresent

Re: [Tutorial] Importing Diablo III models into Torchlight

Postby SixshotOverdrive » Sun Apr 15, 2012 8:47 pm

Judging from that it sounds like your stretching them out as an animation. For bipeds you edit them in figure mode, for non-bipeds I think you have to set it as a skin pose (or something along those lines)
Image
User avatar
SixshotOverdrive
 
Posts: 510
Joined: Sat May 07, 2011 4:34 pm


Next

Return to Torchlight Mod Discussion

Who is online

Users browsing this forum: No registered users and 5 guests