The next step will be to decompile the MDL’s that we gained from extracting the VPK’s. To do this we need to use one of the Valve suggested decompilers such as the StudioCompiler[www.chaosincarnate.net]
One of the problems with StudioCompiler
is that it is was not designed or upgraded to extract models from the Dota 2 files which are far newer than the program itself. So you will need to tinker the files a little bit to get this program to work with the files we have at hand. It is nothing complicated. Read on to find out how.
After installing the StudioCompiler, it is time to set it up. The program now works independent of Steam but it still makes use of the SDK to actually help decompile the files. Unfortunately there is no Dota 2 SDK available at this point of time so one will have to make do with the Alien Swarm SDK
or the CS:GO SDK
, both of which are available on Steam. Many do not have access to the CS:GO SDK, so I will make this guide based on the Alien Swarm SDK that you can find in Library > Tools
People have been reporting that the StudioCompiler crashes when they try to browse to the bin folder. If that happens to you, just copy-paste the address of the folder directly instead of browsing to it. Seems like the buttons on this dialog of the compiler are buggy. It should work just fine if you copy-paste the address instead of browsing your way to it.
Once you have your SDK’s installed, open your StudioCompiler. At the top you can find a button called configure. Once you pop that up, you will need to enter the address to the directory where your SDK is present which is primarily what you see in the picture below.
Congrats! You now have the decompiler all set and ready to go. Just one small thing left to do. Remember I mentioned that the compiler was not designed to extract Dota 2 models? The problem is that the compiler cannot read the data of the vertices from the Dota 2 files. So you will need to trick it in to believing that it can. How do we do it?
Go to the folder of the model you wish to extract. I will stick to my Doom Bringer example. Now I wish to extract “Doom.mdl
” but the problem is that the vertex data cannot be exported. Like I mentioned earlier all vertex data is stored in the .VTX files. So you will have to look for the file “Doom.dx90.vtx
” in the same folder which is the vertex file for my Doom model. All you need to do is change the “.dx90
″ to “.dx80
″ and your compiler will now be able to edit the extract the models. I will explain this change some other day. For now just blindly do it for every model you wish to extract.
Now that is done, go to the Compiler and use the Decompiler to extract the models. Enter an output directory and press Extract.
Once you have decompiled the files you will gain access to a bunch of SMD model files that can be imported to any 3d program to be played around with. Unfortunately no 3D program comes with default support for SMD files so you will have to get the plugin that will allow you to import these files. I’ll have them linked to you below.
Textures can be exported the same way. Use the StudioCompiler Texture Export tab to load your VTF and export it in the form of a TGA or PNG for editing and further usage.
You can also try to download the models of some of the available and cosmetic-ready heroes from the Workshop[www.dota2.com]
. Not every hero is available yet here but new heroes are regularly available as they become open for cosmetics. Until then you can still use my guide to extract references.