Friday, July 26, 2013

Defiance Tools v0.2.0 Released


Skinned meshes are now working! You can now extract all the NPCs,  weapons, outfits, and a lot more. Complete overhaul of the command-line switches so you don't have to specify every WAD file. It now just reads and searches the entire WAD directory. mes2obj and ski2obj now allow you to generate a sub directory with the same name as the asset and put all the OBJ, MTL and PNG files in it. Thanks for /u/etaew for the suggestion. Lots of other bug fixes and major code cleanup. 

Defiance Tools v0.2.0

Please report any issues on Github and I'll try and fix them

I've been testing the extracted files with Blender and I did notice one issue. The game's engine stores emissive masks the in some of the diffuse textures alpha channel. This means that when you view the meshes in Blender you get this.
Bad

The only way to fix it is to tell Blender to not use the alpha channel to get this result. 

Good

The problem is that the not all the meshes use the alpha in this way and there is no way to test for it and strip out the alpha unless I start digging into the shaders. It's easier to just manually disable the alpha or remove it. In many cases the alpha channel is used for transparency as you would expect like the glass in the Tollbooth here.
Broken Tollbooth Glass


Thursday, July 18, 2013

Defiance Mesh Extractor v0.1.0 Released



The Deck of the New Freedom

I finally have the mesh extractor at a usable state. It can now extract meshes that use the most common shaders to OBJ & MTL files. The OBJ files can then be imported into Blender. The OBJ format is very simplistic and doesn't support decals or normal textures very well so only diffuse (color) textures are supported. Currently the extractor only supports the static meshes like buildings and non-moving vehicles and not animated skins like the Volge or player outfits. That's coming eventually. The formats are almost the same but I'm thinking about switching to the Collada format so I can support more than just the diffuse textures like normal, specular, and emissive textures. I also want to try and get the skeletons extracted so the skins will be already rigged and ready to animate.

mes2obj-0.1.0.7z

Friday, July 12, 2013

Defiance Extraction Tools v0.1.0 Released

I've been working on this project on an off since the Defiance beta. I actually started this project to get the textures to create a Defiance theme for my Twitch channel like I did for PlanetSide 2. With that done I had requests for audio and other assets to be extracted. I was going to wait to release until I had the mesh extraction automated but it was taking longer than I expected so I'm just releasing what I have. If any of you have been on /r/defiance you may have seen the Volge renders of helmets, weapons and mobs I've been releasing so as you can see I'm very close. It's just not completely automated yet and requires some manual steps. There are several different tools but I expect most will be interested in the texture (tex2png) and audio (snd2wav) extraction tools. The mesh extractor mes2obj is not working yet but it dumps a lot of cool information about the materials, material params, vertices, and indices of a mesh mostly for my research. There are other tools but most of the others would only be interesting to you if you are researching the file formats. The waddump tool as you would guess dump the raw assets from the WAD files and wadsdiff allows you to see what assets the devs changed between client patches. If you care about those tools then you probably know how to compile them from source.

tex2png-0.1.0.7z
snd2wav-0.1.0.7z

The source for all the tools are at my Github repository.