Tutorial: Intel GPA – Ripping geometry from 3D applications

Background Information

Intel GPA wasn’t initially designed to be used to rip assets from 3D applications but basically what we are doing here is hooking into the GPA application and dumping the vertex buffer and index buffer for the (ergs/drawcalls) it captured.

Lets start by gathering our ingredients  ;-)

What you will need:

Setup and Capture

Once you have setup Intel GPA begin by running the gpamonitor. Browse to your desired 3D application and hit Run. (In this example I have TitanFall)

pic_rip1

Oh, it crashed :-x

pic_stopWork

Thats fine Intel GPA 2014 doesn’t work well with 3rd party 3D applications so disabling tracing remedies this issue. Right-click the tray icon and hit preferences. Then tick the box to disable tracing and hit OK.

gpa_fix

 

Once you re-launch the 3D application it should show the Intel GPA overlay. Now if you don’t see all these graphs and options hit CTRL+F1 and it should toggle through all the modes. Now find yourself a nice place and hit the Frame Capture hotkeys that should be CTRL+SHIFT+C (you can change these in the graphic monitor settings if you wish)

gpa_ingame

The game will now hang or freeze give it a moment to capture the current frame. Once it has captured the frame it should notify you. Alt-tab out and fire up the patched FrameAnalyzer selecting your captured frame from the capture list.

pic_ripLoadCap

Open it and you should be presented with the main window of the Frame Analyzer. From here sort the Erg list by the primitive count and select one of the groups or all its entirely up to you.

gpa_ergList

Ok now click over to the geometry tab and you will be presented with all the drawcalls/ergs rendered for this frame.

pic_rip4

Find the mesh piece you desire to rip, rightclick the 3D viewport and click Save Geometry. You should be now presented with a popup window displaying the export formats supported for export. (along with master131’s mpgh avatar Roxas looking at the Intel logo  :mrgreen: ) Select an export format and hit save!

pic_rip5

Tutorial End

pic_rip6

 

 

 

 

 

Posted in Main | Tagged , , , , , , , , , , , , | Leave a comment

TitanFall BSPInspect

banner
Like I said months ago I would be looking into the BSP map format for titanfall. Well I’m calling the subtool BSPInspect. In the process of making some fancy UI for it currently and actually parsing the file format.

bspinspect02

 

Like ata4 described on the Valve Developers Wiki the BSP fileformat for Titanfall differs as the core lumps usually used in source engine titles are now unused and depreciated. This is made evident in the bsppack dll provided in titanfall.

tflumps_dep

Heres a list of all the current lumps I have discovered in titanfall

 

Posted in Main | Tagged , , , , | Leave a comment

Call of Duty Advance Warfare Sound (.pak) FLAC dumper

Same as ghosts the sound pak files are just mushed flac audio.

AWFLACTool

CODAW_FlacDumper_x64_3.0.zip

CODAW_FlacDumper_2.0.zip (don’t use this)
 

Posted in Main | Tagged , , , , , , | Leave a comment

Alien Isolation Generic PAK Unpacker (.PAK)

Alien Isolation PAK files have slight variants, there was the texture ones which I previously made a tool on and now looking into the model I’ve figured out that they share a common structure. When they mean package they seem to store only the core data inside them. Lets take textures for example, you got your package file full of just compressed texture data then a linking header file containing the filenames and texture headers. Same sort of deal with the models packages except they store all sorts of strings in the accompanying  file like bone names and such.

stringsAI

Anyway for now here is a generic unpacker that should work on most things (getting ready for 3D models ;-) )

AIPAKTool_0.1.zip

Posted in Main | Tagged , , , , | Leave a comment

Alien Isolation (.PAK .BIN) PC/XBOX/PS3

Not going to say much here this will crudely unpack the games texture archives and “try” to produce a valid dds file

v0.2 fixes data alignment issues
v0.3 fixes imageSizes, added support for DXT5 decode

AITexPAKExtract_0.3.zip

Posted in Main | Tagged | Leave a comment

Destiny (XBOX/PS3) PKGTool Alpha

I took a look  :roll: destinySplash Their package files (.pkg) are compressed with some sort of Lzma variant from the oodle compression package by radgametools. Actually not too sure about this  :-?

This basically extracts all  the entries in the archive. Since the filenames are hashed with SHA1 I set the output filenames as their offset in the pkg package.

destinypkgPicDownload

Github Repo

Posted in Main | Tagged , , , , | Leave a comment

SourceVMT – Color Tool

This tool will allow you to basically visualize the color values you plug into a VMT. It’s nothing special but you time from tweaking a VMT -> checking in hlmv/game -> re-tweaking.

usageAusageBusageC

Download

 

Posted in Main | Tagged , , | Leave a comment

TitanFall VPKTool 3.3 Update

3.3 Update

My Plans

Well it’s been a while since I last touched Titanfall, the hype had ended for me and I didn’t really play the game anymore. The fact that it didn’t even run after the first dlc patch caused me to uninstall it and forget. However recently seeing the maps in the latest dlc has sort of sparked my interest into playing it again and attempting to mod the game. If I can recall the VPKRepacker which comes with the VPKTool works however it’s a pain in the ass to use because you have to extract everything edit stuff and then repack it all again which takes like an hour in total for both operations so I made plans for making a new repacker which operates in a different way which should be easier and more feasible to use. That brings me to my next idea, a MOD manager for Titanfall. Respawn haven’t really said anything regarding mods after Vincent posted on twitter they would “evaluate” the possibility for modding the game after release, well the sad truth is they don’t wish to support modding. Aw well doesn’t mean I can’t write tools to mod the game now which is why I’m going to write a mod manager that people can use to make mods for the game and then ship them around in tfm files (titanfall mod) for everyone else to use. The dorito mod isn’t dead ok  :-D

What else is to come?

dlc_attract

Dam those new maps look sexy in TitanFall. I plan to finish up the bpk section of the vpk tool which will allow you to open up the xbox360 version of Titanfall ported over by bluepoint games. Not sure what we will find in there but I’m mainly doing it for the maps since I believe the bsps are close to what Portal2 had. Speaking of BSPs I plan on writing something for those too collaborating info with ata4 the author of bspsrc. More info about this in a later post.

The 3.3 Update

As for this update version 3.3 the main highlight would be the audio patcher upgrade. Since Respawn ship vpks with headerless audio files previously the tool would do a sort of hacky way of detecting the bitrate/samplerate and channels each audio wav used. That method isn’t exactly great because it relies on the sounds being present in the cache file. However I took another look at this problem and came up with a better solution which I believe is the right one.

CAM

So these CAM files seemed interesting that were in the same directory as the vpks  and the audio_installer executable which seemed to run on every update/install. After taking a look at the audio_installer’s executable I managed to reverse engineer the process used to install audio for titanfall. Long story short they basically ship compressed audio files which come inside the vpks and once the audio_installer runs it takes these audio files strips the header off them unpacks the raw audio and places it back into the vpks. The audio headers are read from these CAM files which i believe stands for Compressed Audio Map whilst the audio content is read directly from the vpks. I haven’t reversed the cam entries entirely as I don’t need the other info but here is what the structure looks like.

Changelog for 3.3

Download

Update

If you have the application currently installed it should prompt a new version if available for update if not you can manually check for updates through the Help menu. ckupdate

 

Posted in Main | Leave a comment

TopKek MDL Sorter

MDLS

Basically sorts mdl files (source studio model data) into their respective filepaths. For example if you have an mdl Character_Brian.mdl which was compiled to be located in.

It will basically make that folder structure for you and place the mdl file along with its trailing .dx80 .dx90 .vca files there. This is extremely useful for games like Vindictus

I forgot to make a blog post about this, I guess at the time It wasn’t really relevant since someone requested it and I didn’t think it was that useful.

Download

Posted in Main | Leave a comment

Watch_Dogs Modding/Toolkit WIP

Watch Dogs Research

So not to long ago watch_dogs came out, the game runs pretty poorly due to its unoptimized nature and Ubisoft did state they would release a patch for optimization however I’ve already beaten the game so I don’t think It really concerns me anymore. That being said I’d recommend it, has a nice single-player campaign.

So lets talk about watch_dogs modding/reverse engineering, firstly to give a little back-story info the engine it runs on titled the Disrupt engine it’s an engine derived and created from the previous Dunia Engine (Farcry3) by Ubisoft Montreal. Some aspects are the same as Dunia which helped in reversing the game assets however there are significant changes. Dunia was reversed originaly by others, one person I know who has worked on this engine’s structure or I should say has worked on reversing Farcry3 is Rick. You can find his research and info here and on Xentax. Watch_Dogs uses a sort of bizarre way of storing its assets, they are stored inside these .fat/dat archives heres what the structure looks like.

At a first glance it looks pretty straight forward however the FATEntry structure needs to be modified a bit to work. Some pseudo code:

Alright the rest is easy, the game uses Xmem compression which most xbox360 games use. Just download the library dll and use its export functions.

How about the geometry/textures ???!

Lets talk about textures first, very easy and I think the same as farcry3. They are stored in xbt files which are basically containers for DDS(DirectDraw Surface) textures.

Heres two quick tools I created to convert/view them

XBT2DDS.exe

Basically exports the dds inside the xbt container.

http://cra0kalo.com/public/xbt2dds.zip

gif_wdt

 

XBTView.exe

Extracts the dds to your temp folder and opens it with the Nvidia WTV, once the WTV window is closed the program disposes the extracted texture and WTV from temp.

http://cra0kalo.com/public/xbtview.zip

wd_xbtview

 

As for geometry I’ll talk about it in another post heres a video to tease you for now  :-D

Posted in Main | Tagged , , | Leave a comment