Friday, February 10, 2023

How to extract a 3D model from 2000's Deus Ex to use as basis for a new papercraft model!


I have not been idle!

I haven't really posted about any new Works In Progress of my own lately, but I have kept busy papercrafting. And since I'm posting about a new papercraft model again for my 3D shooter papercraft series, I made a new 3D model extraction tutorial again for the game that the new 3D shooter papercraft will be from: 2000's Deus Ex. 😀



◾ EXPORTING THE 3D DATA

- As always: if you want to extract game models from a game, you will need to have the game! 😋 As you can see, I'm using my PC CD-ROM Eidos Premier Collection version of Deus Ex.

- Copy the SystemFiles.exe file from the System folder on the CD-ROM to a folder on your computer (I always like to create a nice, clean New Folder).

- It's actually a self-extracting Zip-File, so double-click it to automatically unpack all the Deus Ex game packages (Deus Ex is built on top of Unreal Engine 1 and the game packages will have a .u file extension).


NOTE: If you buy Deus Ex as a download, you will find the .u game packages in the Program Files folder where you installed the game after doing so.



◾ EXPORTING THE TEXTURE IMAGES AND 3D MODELS (Gildor's UE Viewer)

- Download Gildor's Unreal Engine resource viewer (UE Viewer) from his website:

- Unpack UE Viewer and then iuf you have a 64-bits computer, double-click umodel_64.exe version to run it (the 32-bits umodel version sometimes gave me a bit of trouble on my 64-bits system).

- Windows Defender SmartScreen will warn you it doesn't recognize the program: if YOU trust Gildor's UE Viewer, click the More info button and then choose the Run Anyway option.

NOTE: There is actually a forum thread about the Windows Defender warning on Gildor's website (see here), but make sure you only use UE Viewer if YOU completely trust it of course and NEVER disable your anti-virus software completely!



- When the UE Viewer starts, it will automatically ask you where the .u game packages are: use the button with the three dots ... to browse to the folder where you unpacked them (UE Viewer won't show them in the screen, so make sure it's correct folder) and then click the Select folder button.

- You can leave all the other options in the UE Viewer Startup options as they are and then click the OK button at the bottom.

- Now UE Viewer will show you a list of all the .u packages it found in the folder you specified, but, only four of them actually contain 3D models:
  • DeusExCharacters.u (contains the 3D models of the game's characters, robots and animals)
  • DeusExDeco.u (contains the 3D models of the game's vehicles, furniture and plants)
  • DeusExItems.u (contains the 3D models of the game's weapons and items)
  • MPCharacters.u (only contained one 3D model when I looked; maybe there will be more if you install a multiplayer game?)
-If you want to export a character model like I do, select DeusExCharacters.u and then click the Open button to open it.

- UE Viewer will load the game package that you selected and automatically start the object viewer.

-Have a good look at the description in the top left corner where it tells you:
  • The name of the Package you're using
  • The Class (type of game object) you're looking at (really only Textures and LODMesh matter in this case, though)



- In the object viewer window, you can press the H key on your keyboard to show the controls of the model viewer window.

- Press the PgUp and PgDwn keys to browse through the loaded Objects until you find the textures for the 3D model you want to export (they will be simple 2D images with the Object name of the character that you're looking for).

- Like all characters, JC Denton has multiple texture images: extract them one by one by making sure the texture image you want is showing in the viewer, then open the Tools menu and choose Export current object.

- You can leave all the Export options as they are, but personally I like to change the Texture format: to PNG in the dropdown menu under Texture Export.

- Click OK and if you didn't change the export folder, there should be a new folder inside the UE Viewer folder called UmodelExport.

-Inside that will be a folder with the name of the .u game package you used, and inside that will be a Texture folder: inside that folder will be the exported texture image.

- Repeat this for all textures with JCDenton's name (8 in total; 5 of them will just be different heads and hands, the others will be textures for his trenchcoat, body armor and pants).


- Now we will need to find the actual 3D model that goes with the character: go back to UE Viewer and use the PgUp and PgDn keys again to browse through all the loaded objects from the package until you find a LODMesh (it will say so next to Class: in the description on the left side of the Object viewer and the preview will show a 3D model).

NOTE 1: LODMesh objects have some extra controls to see them better in UE Viewer:
  • Rotate the 3D model (mesh) by moving the mouse while clicking and holding the left mouse button
  • Move the 3D model (mesh) up and down and left and right by moving the mouse while clicking and holding the middle mouse button (the mouse wheel)
  • Zoom in and out by moving the mouse while clicking and holding the right mouse button
  • If the 3D model has animations, browse through the different animations using the [ and ] keys on your keyboard
  • With the < and > keys you can select a specific animation frame
  • Press the Space bar to play a selected animation once or X to play a looped version

NOTE 2: There are three types of character LODmeshes:
  • Animals: with Object names like Cat, Doberman, Fish etc.
  • Robots: with Object names like MedicalBot, MilitaryBot, SpyDrone etc.
  • Humans: categorized into
    • males (their Object names start with GM_)
    • females (their Object names start with GFM_)
    • and  male kids (their Object names start with GMK_; there are no female kids in the game)
NOTE 3: The human characters have a green with orange and white checkered placeholder pattern because their Objects can have multiple Skins (the same 3D model but with a different texture images, to effectively create a different character (Skin) in the game).

- If you know the game a bit, the object names provide enough clues to find the LODMesh for the character that you are looking for: I know that JC Denton is a man and that he wears a long trenchcoat, so I guessed that the LODMesh that the design team used for him in the game is GM_Trench (Male_Trenchcoat; when I saw the sunglasses that JC Denton wears in the Object viewer I knew I was probably right 😉)

- Make sure it is the one showing in the window: then select the Tools menu and choose Export current object again.
-You don't have to change any of the Export options; just click the OK button, and UE Viewer will make another folder called VertMesh in the same umodel_win32 -> UmodelExport -> DeusExCharacters folder where it created the Texture folder when you exported the texture images.

- Inside the VertMesh folder you will find two files in an Unreal Engine vertex mesh format: a ..._d.3d data file (which contains the mesh (3D model) info) and a matching ..._a.3d aniv file (with has the animation info for the mesh)You always need both for these kind of game models!!





◾ CONVERTING THE 3D MODELS (Blender with UE1-VertexMesh-Blender-IO by Skywolf285)

- To convert the _a.3d and _d.3d files into a more common file format, first download the latest version of Blender from:
https://www.blender.org/download/ (you can even use a Portable (.zip) version that you don't even have to install! 🙂)

- Then download the Unreal Engine 1 _a.3d and _d.3d vertex mesh format exporter and importer for Blender by Skywolf285 from:


- Start up Blender (delete the cube that is there every time on startup... 😆) and then open the Edit menu and choose Preferences.

- Make sure you are on the Add-ons tab and select the Install an add-on option at the top.

- Browse to the location where you saved Skywolf285's io_u_vertex_m.zip plugin; select it and then click the Install Add-on button.

- Make sure the newly installed Import-Export: Unreal Engine 1 Vertex Mesh Format plugin has a checkmark in front of it indicating that the plugin is activated and then click the 'hamburger' icon at the bottom of the Preferences window to Save the settings you made.



- Now close the Blender Preferences window and open the File menu.

- Select the Import -> Unreal Engine Vertex Mesh (_a.3d, _d.3d) option and browse to the VertMesh folder where you exported the _a.3d and _d.3d files to.

- Select either one of them (it doesn't matter which one, as long as both matching files are in the same folder!) and then click the Import Unreal vertex mesh button.

NOTE: You will notice that the 3D model will look very skinny; for some reason, the vertical axis in the exported model from UE Viewer is stretched too much compared to the other, horizontal axes... 😟 Don't worry about it for now, it's easy to fix later on manually!

- You can select a specific pose from the animations that the model contains using the animation slider at the bottom; then open the File menu again and choose the Export ->  Wavefront (.obj) option.





◾ CHECKING AND FIXING THE 3D MODEL (3D software of your choice)

- Now open the exported Wavefront .obj file in a 3D software of your choice (I like to use Metasequoia because it's free, has all the basic functions I need for papercraft modelling and its file format has a perfect compatibility with Pepakura Designer, which I will use to unfold the 3D model into 2D papercraft parts later).

- Now it is time to fix the vertical distortion of the 3D model: luckily, it's very easy to fix by simply scaling the 3D model by a factor of 0.5 (halving it) in only the vertical direction. 🙂

- Next, you will need to link the texture images that you exported to the right materials that are  automatically created in the 3D file when you exported it as a Wavefront obj. file from Blender.

- In Metasequoia you can select a Material in the Material Panel (press Ctrl+M if the material panel isn't showing yet) and then click the Sel Mat button under the Edit commands that you can see on the left side if you are in Modeling mode (you can select this mode from the big pull-down button in the top left corner).

- This option will highlight the part of the 3D object that the selected material is used on, so you can very easily match which texture image shoulc be linked to that material: if the head lights up with a certain material, you can link one of the head texture images to that material. The same goes for the trenchcoat, the torso and the legs, etc. Note that one texture image can be used simultaneously for more than one material, like the texture image for the trenchcoat! For the head, you can pick one of the head textures that you like best.



- Repeat all these step in the tutorial steps to extract a weapon from the DeusExItems.u game package, scale it to match the character, and then you will be ready to start (re)modeling the exported 3D game model into one to make a papercraft from! 

Stay tuned and have fun!



Tools used:

2 comments:

  1. Hey. This was a good read, but I would like to get the levels mesh and texture. Can that be done?

    ReplyDelete
    Replies
    1. I don't know to be honest, sorry... :o( I only looked into extracting the characters, and I think for the level data you would need other tools, made by people that know a lot more about things like that than I do. I always look in forums or fan sites to see whether other people already tried extracting things from the games; if games are popular enough, there will be a lot people that like to play with tools like that and thos kind of forums and sites are where they'll talk about it. So that's where I would start! :o)

      Sorry that I can't really help you, I hope you can find some good information about it online!

      Delete