Author Topic: Merricksdad's Torchlight 2 Mesh Converter  (Read 579 times)

Legacy_MerricksDad

  • Hero Member
  • *****
  • Posts: 2105
  • Karma: +0/-0
Merricksdad's Torchlight 2 Mesh Converter
« on: July 15, 2014, 02:21:53 pm »


               

In search of parts for my "Trio Nefarious" and "Champions of Lolth" models, I decided to take a look at some other games and see about snagging some body parts, equipment, or just see how they rigged stuff.


 


After about 2 days of playing with League of Legends models (which can be imported easily into GMAX), I decided I wanted to take a look at the hulking body shapes in Torchlight 2.


 


I had some difficulty at first while trying to find some importers for GMAX. I see some for blender, and some for later versions of 3dsMax which I could not get to work for GMAX. So I decided to stay up late and write a converter to partner with the OgreTools MeshToXML converter.


 


My tool lets you convert OgreTools XML output directly to a ascii MDL format which is easy to import into GMAX using NwMax model importers.


 


It isn't completely finished yet, but if you want to take a peek, I put the initial working version on the new vault, here. Further information about how to use it is on that vault project page.


 


In the future, I'd like to be able to combine the MESH file with the referenced SKELETON file, so I can get the bones set in place. The MESH file also holds all the skin weights for the bones. In addition, all the material properties, such as ambient, diffuse, and specular values are located in a third file which is named similar to the MESH file being opened. At some point, I may be able to create fully rigged skin models for NWN easily with this tool.


 


For now, it has some issues I want to work out:


  • No face normals are set in the MDL file, but I find that 45 degree auto smooth works most of the faces out. Not all, but definitely most.

  • The entire model is rendered in a rotated space, laying the model on its back on the floor. Simply transform-rotate the model 90 degrees on the X axis, and then rotate 180 on the Z axis.

  • The wireframe color is default to black. I'd prefer green, gray, or to grab the ambient color from the MATERIAL file and use that.

  • The executable does not do batches, but a BAT file pointing to the executable can. I'd like to change that, since I am not using any command-line options, I want to make it so you can just send a list of files directly to the exe for conversion.

  • The executable is compiled on a win7 x64 machine in VB 2008, so it might not work for everybody. If it doesn't work for you, I'd like to find out how to make it work. I personally don't know a lot about doing that, but I hear compiling it on the other machine remedies the problem. I am adverse to using the JAVA platform, or it would probably already work for everybody.

If you have suggestions or comments, leave them here or on the vault.



               
               

               
            

Legacy_Michael DarkAngel

  • Hero Member
  • *****
  • Posts: 627
  • Karma: +0/-0
Merricksdad's Torchlight 2 Mesh Converter
« Reply #1 on: July 16, 2014, 12:36:28 am »


               



 


The executable is compiled on a win7 x64 machine in VB 2008, so it might not work for everybody. If it doesn't work for you, I'd like to find out how to make it work. I personally don't know a lot about doing that, but I hear compiling it on the other machine remedies the problem. I am adverse to using the JAVA platform, or it would probably already work for everybody.




 


Biggest issue here may be someone trying to run it on a 32-bit platform or Windows XP.


 


In my experience:


Programs I've compiled in XP I was not able to run in Windows 7 or 8 (but I didn't try any of the compatability settings).  Programs I've compiled in Windows 8 64-bit would not work on Windows 7 32-bit or XP.  Programs I've compiled in Windows 7 32-bit would work in Windows 8 64-bit, but not in Windows XP.  This has all been done with the Express versions of Visual Studio 2012 and 2013, which I believe has limited compiler options.


 


If it doesn't work on the 32-bit side, and someone really wants it, I can try compiling it on my Win 7 system.


 


icon_zdevil.gif


 MDA


               
               

               
            

Legacy_MerricksDad

  • Hero Member
  • *****
  • Posts: 2105
  • Karma: +0/-0
Merricksdad's Torchlight 2 Mesh Converter
« Reply #2 on: July 16, 2014, 01:11:40 am »


               

From what I understand, a big issue from platform to platform is the interpretation of certain non-standard data types, of which I am not using in this program (but I do in the aurora filetype stuff I am building). I've only got win 7 x64 machines here and nothing else to work with, so I may take up offers to compile on other systems if the need comes up. Not sure how many people will even use this.


On a side note, I believe that OgreTools 1.7.2 works only on TL2. Version 1.6.3 supposedly works on TL1 and 2. I haven't tried it yet, but I think users could import models from both that way, increasing the potential variety.



               
               

               
            

Legacy_Tarot Redhand

  • Hero Member
  • *****
  • Posts: 4165
  • Karma: +0/-0
Merricksdad's Torchlight 2 Mesh Converter
« Reply #3 on: July 16, 2014, 02:58:51 am »


               

If need be I can compile it on vista 32 bit and xp 32 bit. I have vb 2008 pro (I received an inheritance back then and went mad). I would have offered to do it on win7 32 bit but currently have hd probs there (see my status for more info).


 


TR



               
               

               
            

Legacy_Tarot Redhand

  • Hero Member
  • *****
  • Posts: 4165
  • Karma: +0/-0
Merricksdad's Torchlight 2 Mesh Converter
« Reply #4 on: July 17, 2014, 07:41:55 pm »


               

You can now add win7 32 bit compile to my list as well (spent 6 hours getting new hdd installed).


 


TR



               
               

               
            

Legacy_MerricksDad

  • Hero Member
  • *****
  • Posts: 2105
  • Karma: +0/-0
Merricksdad's Torchlight 2 Mesh Converter
« Reply #5 on: July 17, 2014, 08:56:54 pm »


               

You guys and your drives. I hope I never lose stuff again. Lost too much already. I'm learning to keep tons of copies everywhere. Sitting right behind me on the shelf is a 500 gig drive with lots of junk on it.



               
               

               
            

Legacy_Bannor Bloodfist

  • Hero Member
  • *****
  • Posts: 1578
  • Karma: +0/-0
Merricksdad's Torchlight 2 Mesh Converter
« Reply #6 on: July 17, 2014, 09:47:25 pm »


               


You guys and your drives. I hope I never lose stuff again. Lost too much already. I'm learning to keep tons of copies everywhere. Sitting right behind me on the shelf is a 500 gig drive with lots of junk on it.




Just don't fall into the bad habit that many of us have fallen into over the years... one big drive to hold it all... always end up failing.  Drive fails, computer burns up whatever, and it is all gone.


 


These smallish onedrive/skydrive/googldrives et'al are never large enough either OR they take too darn long to xmit the data involved.  Even when you purchase what some might consider an affordable expansion to them, it turns out to not be enough space considering each new game released takes an additional 20-40 gig of hd space, and by the time you start adding cc stuff to it, it becomes completely unmanageable.




               
               

               
            

Legacy_MerricksDad

  • Hero Member
  • *****
  • Posts: 2105
  • Karma: +0/-0
Merricksdad's Torchlight 2 Mesh Converter
« Reply #7 on: July 17, 2014, 10:11:42 pm »


               

I'm doing a combination of two machines, an external, 3 cloud storage spaces, and spreading bits on places like the vault. I also hope the download counts everybody is getting for their stuff mean at least someone out there will have additional backups.


 


I could only wish for a service that automatically spreads 16 clones of my stuff around the internet.  Well...the stuff I want spread around anyway.



               
               

               
            

Legacy_Tarot Redhand

  • Hero Member
  • *****
  • Posts: 4165
  • Karma: +0/-0
Merricksdad's Torchlight 2 Mesh Converter
« Reply #8 on: July 18, 2014, 12:04:55 am »


               

I could still wish for a utility that creates a pseudo folder on each drive on a machine, then stores anything put into this "folder" onto each drive. That way at least the loss of any drive does not mean the loss of the data you want to keep. Anyway the new drive is actually new (0 hours usage before I started the format necessary to begin). Still lost three months of other stuff (including apparently 30 items from windows update), but my nwn stuff is on my data drive.


 


Back on topic - MD pm me if you ever need your stuff compiled on the professional version of visual studio 2008 (I think that besides the extra tools, the optimisation is better than the free version, just can't guarantee it  ':whistle:' )


 


TR



               
               

               
            

Legacy_MerricksDad

  • Hero Member
  • *****
  • Posts: 2105
  • Karma: +0/-0
Merricksdad's Torchlight 2 Mesh Converter
« Reply #9 on: July 18, 2014, 02:27:23 am »


               

I'd like to rewrite this one in particular so that it utilizes actual XML .net controls. This version is completely text oriented, and may fail on certain files. It hasn't yet, but I can see issues that could arise already.


 


But definitely, when I get around to the bigger projects release times, I will take up a professional compile!



               
               

               
            

Legacy_Empyre65

  • Hero Member
  • *****
  • Posts: 662
  • Karma: +0/-0
Merricksdad's Torchlight 2 Mesh Converter
« Reply #10 on: July 18, 2014, 10:39:19 pm »


               

You could use 2 drives to make a mirrored RAID array. If either drive fails, everything is still there on the other drive. The chatch is that both drives are inside the computer, so if a fire or something destroys the computer, both drives are gone.



               
               

               
            

Legacy_MerricksDad

  • Hero Member
  • *****
  • Posts: 2105
  • Karma: +0/-0
Merricksdad's Torchlight 2 Mesh Converter
« Reply #11 on: July 19, 2014, 12:03:03 am »


               

Always some catch. '<img'>



               
               

               
            

Legacy_Tarot Redhand

  • Hero Member
  • *****
  • Posts: 4165
  • Karma: +0/-0
Merricksdad's Torchlight 2 Mesh Converter
« Reply #12 on: July 19, 2014, 02:33:47 am »


               

And it wouldn't work for me. I have three drives in this pc - Win XP, Win 7 and data. It would be nice to be able to safeguard some of the data on the data disk in the manner I mentioned earlier.


 


TR