Featured Post

Deus Ex - Extraction Guides (Master Post)

Deus Ex (2000) Extract Audio Extract Textures & Models Deus Ex: The Conspiracy (2002) Extract Video Deus Ex: Invisible War (2003) Extrac...

Showing posts with label Deus Ex: Human Revolution. Show all posts
Showing posts with label Deus Ex: Human Revolution. Show all posts

Monday, 20 January 2025

Deus Ex: Human Revolution - Extract Textures & Models

Note: All tools used are linked at the bottom of the post.

In this post, I will not be covering how to unpack the game content as I have already covered this before in a previous post. You must unpack the game files before starting here, so for instructions on how to do that please follow the other guide I created, and then come back to this post which is purely focusing on textures and models.

Please also note that some knowledge of Blender is required for some of the later steps that I will not be covering, such as UV editing and changing materials. If you need help with that, I recommend looking up the Blender reference manual or looking at some instruction videos on YouTube.

Searching for the model using bigfile.xml

  1. After extracting the files you'll have many folders and subfolders with all the game content. Because of this, it can be pretty difficult to navigate the thousands of files to find something in particular. To help you, the extraction process creates a file called bigfile.xml
  2. You can open the .xml file in a text editor and do a text search. In this case, I was looking to extract the futuristic motorcycle "Blade of Shintaro" from Pritchard's Tech Lab office in Sarif Industries. Meshes and textures are combined into one .drm file for every object, so if you find that, you're in the correct position to begin. I managed to locate it pretty quickly by searching "motorcycle".
  3. Next, you'll have to manually locate the file following the file path as shown in the .xml file (or you can just search the name via file explorer). Once you find the .drm file you can now open it in DRMEdit and view what is inside.

View and export textures using DRMEdit

  1. Run Gibbed.DeusEx3.DRMEdit.exe from the Gibbed DeusEx3 HR tools set.
  2. Once open, click the Open DRM button and select the .drm file you want.
  3. A list will appear of all the files contained within the .drm file. There isn't any way to view the mesh from here, but you can check the textures by selecting the Render Resource from the list you want to inspect and then clicking the View Object button if you want to confirm you have the correct mesh.
  4. You can also save the textures as .png files. This may be useful if you want to edit the textures, as the mesh export process later does not allow you to export textures (an error occurs in Blender if you try to save any of the images for some reason).

Install CDC Unit / DRM mesh Blender add-on

  1. Install Blender (the latest version) if you haven't already. Then download and extract the zip of the dxhr CDC GitHub project that contains the .py scripts we need. They're within the tools folder.
  2. Place all of these scripts into your Blender add-on folder. The folder is located at (the version number might be different):
    C:\Users\Username\AppData\Roaming\Blender Foundation\Blender\4.3\scripts\addons
  3. To confirm these scripts were installed properly, open Blender, click Edit in the navigation bar > Preferences > Add-ons. In the list, make sure the two CDC add-on checkboxes are ticked and click Save.
  4. Now you should be able to import the mesh via File > Import > CDC Mesh (.drm/.cdcmesh) > and selecting the .drm file.
  5. For me the mesh imports really big, so I had to zoom out a lot to see it. You can resize it quickly to a more reasonable size by tapping S on your keyboard and moving your mouse towards the object.
  6. Depending on your viewport settings, the mesh might be white. You can select Material View from the Viewport Shading settings (top right of the main window) to see the texture on the object. You can export it as an .obj file and modify the textures or whatever you like at this point so you're no longer restricted to the .drm file type.
Note: You will notice the texture is a bit weird in some places, and that's because the tool we used to import the mesh doesn't preserve UV coordinates very well. If you go into Edit mode instead of Object mode, select the entire mesh and then open the UV Edit tab, you will see that the UV layout is all over the place. You can click the image dropdown if the wrong texture is being displayed and find the correct one, but you will have to manually fix the UV layout, which is a tedious process. As I understand, this is the case with older tools that did the same thing so unfortunately there is no way around it as of the time of this guide being written.

Tools

Saturday, 18 March 2023

Deus Ex - Extraction Guides (Master Post)

Deus Ex (2000)

Deus Ex: The Conspiracy (2002)

Deus Ex: Human Revolution (2011)

Deus Ex: The Fall (2013)

Deus Ex: Mankind Divided (2016)

Deus Ex: Human Revolution - Extract Audio & Video

Note: All tools used are linked at the bottom of the post.

In this guide I will cover:

  • How to extract content from the game and locate audio and video files
  • How to convert the audio and video into formats such as .wav, .mp3, and .mp4

Extracting the files from the game using Gibbed DeusEx3

  1. Extract the contents of the Gibbed DeusEx3 archive into the installation location for Deus Ex: Human Revolution
  2. Drag and drop BIGFILE.000 onto Gibbed.DeusEx3.Unpack.exe to start the extraction
  3. The command prompt will open showing the progress of the extraction and close when complete


    Note: The extraction will fail if the file path is too long. As shown above, the extraction paths are quite long already, so it’s better to perform this extraction at the root of a drive. If this becomes a problem, you can copy all of the BIGFILEs (000 through 008) into a new folder at the root of the drive you’re using. Be mindful of disk space too, as each extraction has the size of about 17 GB.

  4. The extracted content can be found in the same directory in a folder named BIGFILE_unpack
  5. In this folder there is an .xml namemap which lists all the content. If searching for something in particular in the unpacked folder, this file can be useful to open in a text editor and search for specific things such as music or models

Locate and extract audio

  1. Navigate to the .mul file. In the bigfile.xml namemap and in the filename, voiceover audio is denoted by the prefixes "dia" "rad" "3tr" and are mostly found in the \pc-w\audio\streams\vo\eng folder in each of the extracted folders, as well as in the _UNKNOWN folder, but these are not named clearly. Adam Jensen’s voice is seperate from the NPC audio as well which would be found in the npcs/unique folder under each location Music is located in the default\pc-w\music folder

    Below is a table showing the different kind of voice audio that can be found:
  2. Create a .bat file matching the following command, but pointing to your extraction location of Gibbed.DeusEx3.built - Gibbed.DeusEx3.Demux.exe

    FOR %%A IN (*.mul) DO "...\Gibbed.DeusEx3.Demux.exe" %%A

    Example:

  3. Save it into the folder with the .mul files you want to extract, and run it

  4. The .mul files in the folder are now converted into .fsb files

Convert audio using vgmstream

  1. Extract vgmstream archive. The vgmstream-cli.exe program is supposed to be used within the command line, but also works via the file browser (the following instructions will cover the latter)
  2. Create a .bat file matching the following command, but pointing to your extraction location of vgmstream - vgmstream-cli.exe

    FOR /R %%a IN (*.fsb) DO "...\vgmstream-cli.exe" -l 2 -f 10 -o "%%a.wav" "%%a"

    Example: 
  3. Save it into the folder with the .fsb files you want to convert and run it
  4. The .fsb files in the folder should now be converted into .wav files

    Note: If you don’t want to use this batch method, you can use FSB Extractor - FMOD Sample Bank Extraction Tool to convert the .fsb files, as covered in the next section:

Convert audio using FSB Extractor (alternative method)

  1. Load the .fsb file with Main > Open…
  2. You should now be able to see the contents of the .fsb file, as well as see the other .fsb files in the same folder under Directory Listing
  3. Select the audio sample in the browser > Entries > Extract to Folder… > choose extraction location
  4. The .fsb file should now be exported as an .mp3 file in the folder

Locate and extract video cinematics using VGMToolbox

  1. Navigate to the .usm file. In the bigfile.xml namemap and in the filename, cinematics are denoted by the prefixes "cut" "sce" "cin". Most cinematics can be found within individual folders in:

    BIGFILE_unpack\default\pc-w\design_database\videos\cinematics\final_cinematics

    Example:
  2. Open VGMToolbox > Misc. Tools > Steam Tools > Video Demultiplexer > Options > set the Format to USM (CRI Movie 2) > check Extract Audio and Video > drag and drop the .usm file you want to extract into the grey area
  3. Multiple files will then be extracted in the folder the .usm file was in. The .m2v file is the video, and the .adx files are all audio streams, one with music/sound effects, the rest with voice over, all different based on localisation. The English one should be first, usually denoted with a 1 after the first number, the sfx denoted with a 0. For example in the screenshot below the sound effects are in the file ending in 40534641 and English voice over is the file ending in 41534641. I will come back to this point later when combining the audio and video streams.

Convert cinematic audio using FFmpeg-based ADX converter

  1. Extract the contents of FFmpeg-based-ADX-converter archive
  2. Place the .adx files into the SOUND folder (the output destination will be the SOUND_raw folder)
  3. Run the adx_to_wav.bat > Command Prompt will open and display the status of the conversion
  4. The .adx files should now be converted to .wav streams in the SOUND_raw folder

Convert cinematic video using VLC Media Player

  1. Open VLC Media Player > Media > Convert/Save
  2. The Open Media window will open. Click the Add... button > select the .m2v file you want > drop-down arrow to the right of Convert/Save > Convert
  3. The Convert window will open. Under Settings > Profile drop-down > Video - H.264 + MP3 (MP4) > profile edition (wrench icon)
  4. The Profile edition window will open. Encapsulation tab > check MP4/MOV > Video codec tab > check Keep original video track > Audio codec tab > keep it unchecked (there is no audio in the video) > Save


    Note: You can choose not to modify the original codec to maintain the same quality as shown above, however due to the original file format .m2v the converted output from VLC will be using the MPEG-1 codec even as an .mp4. This kind of video tends to not have support in modern software or browsers, so you may need to change the codec to be "web friendly". To do this when converting you need to set the format to H.264 instead. As for the bitrate, just set it to a number close to the original file and Save.

  5. Back in the Convert window set the destination path by clicking Browse > select folder you want to save the converted file (make sure to change the file extension to .mp4 in the save dialog) > Start
  6. The .m2v file should now be converted into a .mp4 file, and can be played as normal

Combine extracted audio and video into one .mp4 file

As mentioned before, the video cutscenes contain multiple additional audio channels for language localization. In order to combine audio and video a language needs to be selected for the character's voices to be in the final video.
  1. After converting the .adx files into .wav, select the .wav file that contains the stream with the language you want. Then find the main stereo audio channel that has the music, sound effects, and so on (it should be the first one).
  2. Open Audacity (or any other audio editing software you prefer), and load both .wav files as different channels. Do not move them around individually, as they should be synced together automatically.
  3. Select all the audio and export all as a combined Stereo .wav file.
    Now we have a .wav file that contains a mixdown of the music, sound effects, and dialogue, and we have an .mp4 file with video but no sound. These two files need to be combined into one .mp4 file so we can get video with sound. To do this you need ffmpeg.
  4. Download ffmpeg and extract the .zip. Within the extracted files, there should be a folder called bin. Inside bin you should find ffmpeg.exe. Place the .mp4 video and the .wav file you want to combine into this folder.
  5. In the address bar, type in cmd, and tap the enter key. Now a Command Prompt window will open within the folder.
  6. Enter the following command, making sure to match the file names for the .mp4 and .wav with the files you have. Please note that special characters can cause cmd to behave strangely or fail to work properly, so if you run into any issues I would advise just to rename the video to video.mp4 and the audio to audio.wav and then run the command without modifying it:

    ffmpeg -i video.mp4 -i audio.wav -c:v copy -shortest output.mp4

    If you are interested in understanding more about what the command does, I went into more details about it in another guide.
  7. Once complete you'll find a video within the same folder named output.mp4 which should now have both audio and video playing.
View the result on YouTube:

Tools