Saturday, June 13, 2020

How to extract the 3D models from ALL Tomb Raider 1-5 games for papercraft (or the Level Editor ;o)


I hope you liked the LEGO Lara that I showed you how to make, but after all: this is a papercraft weblog, so let's make a new papercraft Lara now! 😉

And to start of again, I want to share how I get the 3D models from the actual games to use as base reference to start with. Well, from all the classic Tomb Raider games at least. But I do mean all the classic Tomb Raider games, because the tool I use (TRViewer by E.Popov) works with all nine of these:
  1. The original Tomb Raider (1996),
  2. its Gold expansion Unfinished Business (which also includes Shadow of the Cat),
  3. Tomb Raider II,
  4. its Gold expansion Golden Mask,
  5. Tomb Raider III,
  6. its Gold expansion The Lost Artefact,
  7. Tomb Raider The Last Revelation (Tomb Raider IV),
  8. the Times Exclusive level,
  9. and Tomb Raider Chronicles (Tomb Raider V).

2024 Tomb Raider I-III Remastered update:

The method I explain below will also work with the classic style of the 2024 Tomb Raider I-III Remastered PC version because it basically uses the same level files as the original games (and Aspyr included the extra Gold/add-on levels this time of course for the Remastered version!).
IMPORTANT NOTE: when using game downloads from stores like Steam instead of CD-ROMs, always make a copy of the game files to work on👍 (instead of using the original files 👎) so there won't be any chance of breaking your precious game!!
It will not work for the Remastered 3D models, because they use a different .trg file format!
(you can easily find the Remasterd textures as .dds files in the game folders though without any effort! 🙂)


Now I want to use the 3D models as base reference to make into papercraft vignettes of course (they're not really suited for that 'as is', because the body pieces of the in-game models are not actually connected together!) but you can also extract them to edit and use in the original levels that you can make with the Tomb Raider Level Editor!

The Level Editor was originally bundled with Tomb Raider Chronicles in 2000, but although I did play with it a bit back then, I never really seriously got into it, so please don't ask me for tips about that...! 😇

There are however a lot of forums with lots of tutorials and tips and tricks, so search around a bit on Tomb Raider websites and forums if you're interested in making your own classic Tomb Raider levels: link!

But like I said, I'll just show you how to extract them to start a new papercraft vignette. 😊
IMPORTANT NOTE: The basic extraction method is very simple with only a few steps. For Tomb Raider 3, 4 and 5 (and their bonus levels) however there are some extra steps needed which I also wanted to explain. Keep reading for these specifics after the basic method!
ANOTHER IMPORTANT NOTE: As with many fanmade game extraction tools, I needed to tell my antivirus software to exclude the unpacked TrViewer 1.083 folder from its scans, or else it would delete the TRViewer.exe file when I tried to run it (thinking it is a harmful file). Only do this when YOU trust the tool of course, and NEVER turn off your antivirus software completely!!
And now finally...


1) Extracting 3D models from Tomb Raider 1 & 2 (including the Unfinished Business and Golden Mask bonus levels): TRViewer

- There's no way around it: you need to either have the original PC CD-ROM versions of the games or the Steam or Gog versions because as I said the TRViewer tool extracts the 3D models from the actual game files.

- Download TRViewer V1.083 binaries (565 ko, in zip format) from this archived version of E.Popov's website:
https://web.archive.org/web/20180829025630/http://evpopov.com/_Downloads.html (Download the TRViewer V1.083 binaries (565 ko, in zip format) version)

(or get it from: https://www.aspidetr.com/en/tools/tr-viewer/trviewer-1-083/)

- Wherever you get it from, make sure you have a working version: the TRviewer V1.083 should include the glut32.dll, ReadPic.dll and ZLIB.DLL files and a resources folder.


- Now start the TRViewer (remember to create an exception for its folder in your antivirus software if needed!) and open one of the .phd (for Tomb Raider 1) or .tr2 (for Tomb Raider 2) level files from the data folder that's on the CD-ROM or in the games's installation folders on your computer.

- In the TRViewer tool, click the little + icons in the file tree on the left. This will show you all the files from the level that TRViewer can read. Lara and her enemies and any other 3D models that have animations in the game are under the Moveables header and any non-moveable objects are named Static meshes.

- Click the little wrench icon in the Toolbar at the top to Toggle the object toolbox.

- In the object toolbox, go to the Animation tab and choose one of the Animations from the dropdown list (unless you're wanting to export a Static mesh of course 😉).
(TIP: you can stop Lara from constantly spinning by clicking the little film camera Camera mode icon in the Toolbar at the top, and you can pause the animation by changing the mode from Automatic to Manual in the object toolbox.)
- Once you found an animation you like, remember its # number.

- Now right-click the model name in the file tree on the left and choose Export to 3DS.

- In the Exporting moveable dialog box, make sure the With animation box is checked and select the # of the animation you liked (unless you're exporting a Static mesh of course). Then Export the 3D model to a folder on your computer. Together with the .3ds file, TRViewer should export a .tga texture image file (if it doesn't, you might be trying to export a model's dummy meshes instead of its real meshes; more on that later).





2) Opening the exported .3ds files with animations: 3DS MAX

- Although many 3D programs can open .3ds files, it seems most of them can't understand the animation data that TRViewer outputs and will only show Lara in her static standard pose... 😥 I use an old version of 3DS MAX 9 to open TRViewer's .3ds files, because 3DS MAX does show Lara's animations correctly so that I can choose a nicer pose for the papercraft!
(Note: unfortunately, 3DS MAX is a very expensive program and I haven't found a free or at least cheaper 3D program that can open the .3ds files correctly with the animations... 😥 The .3ds files will open in other regular 3D programs without the animations though, so you can pose Lara manually in most other 3D programs for your papercraft if you don't have access to 3DS MAX!)
 - Import the .3ds file in 3DS MAX by choosing File > Import and then selecting 3D Studio Mesh (*.3DS, *.PRJ) from the Filetype dropdown list.

- After importing the .3ds file, you can choose any pose from the exported animation for the papercraft model you want to make by moving the animation slider at the bottom of the 3DS MAX screen.

- Then Export the 3D model in the pose you like in a file format you can easily work with. I like to use the Wavefront Object (*.OBJ) format. Make sure the Texture coordinates box is checked in the OBJ Exporter options!

- I like to use Metasequoia for papercraft 3D modelling because it works perfectly with Pepakura Designer that I use later to unfold the 3D model for papercraft (but you can use many other 3D programs that can open Wavefront .obj files of course).

- When opening the exported .obj file in Metasequoia, make sure to check the Invert V of mapping box under OBJ options so that the exported .tga texture image will be applied to the 3D model properly.

- Metasequoia should normally automatically apply the texture data to the model if you have the .obj file, the .mtl file that 3DS MAX automatically exports with the .obj file and the .tga texture file in the same folder, but if it doesn't, simply assign the .tga texture image to the tile0 material manually.

- And for Tomb Raider 1 and 2 and the Gold bonus levels of Unfinished Business and Golden Mask that's that; the .obj file can be used as a base reference for a new papercraft model!





3) Extracting Lara from Tomb Raider 3 (including The Lost Artefact bonus levels): dummy meshes & Lara true appearance .TRMVB
(NOTE: These extra steps are only necessary for Lara, whose model uses dummy meshes. The other 3D models can be extracted directly just like with Tomb Raider 1 and 2.)
- For Tomb Raider 3 and The Lost Artefact bonus levels, there is an extra step needed to replace Lara's dummy meshes with her real meshes; if you select the normal Lara 3D model in TRViewer and then uncheck the Show real meshes instead of dummy meshes options in the object toolbox, the 3D model will disappear and just show some blue nodes. If you try to export this model as before, TRViewer will actually have nothing to export and the .3ds file will be empty:


- So if you want to extract Lara's 3D model from Tomb Raider 3 (or 4 and 5, but more on that later) scroll down the file tree on the left until you come across Lara true appearance: this holds the real meshes for Lara's 3D model.

- Right-click on the Lara True appearance listing and this time choose Export as .TRMVB. Save the .trmvb file somewhere you will be able to find it.

- Now right-click on one of Lara's standard listings in the file tree, and choose Import from .TRMVB. In the Data type to import box, UNCHECK the Animations checkbox (otherwise you will lose Lara's animations!).

- Select the Lara true appearance.trmvb file to import and that's that: now Lara's dummy meshes are replaced with the real meshes and now you can export and convert her with her animations the same way you did with the Tomb Raider 1 and 2 games!





4) Extracting Lara from Tomb Raider 4 The Last Revelation (including the Times Exclusive bonus level): dummy meshes & merging Lara skin and Lara skin joints meshes

- For Tomb Raider 4 The Last Revelation, you will need replace Lara's dummy meshes with the real meshes as well, only twice, because in Tomb Raider 4 (and Tomb Raider 5 Chronicles, but more on that later...) Lara's real meshes are separated into Lara skin (her bodyparts) and Lara skin joints (her joints) meshes.

- Export the Lara skin and Lara skin joints meshes separately as .TRMVB files like before.

- Now first import the Lara skin joints.trmvb file to one of Lara's standard models: be sure to remember the animation # number you use for exporting the 3D model as a .3ds file just like a Tomb Raider 1 or 2 model.

- Now import the Lara skin.trmvb file to the same 3D model and choose the same animation # number to export as a .3ds file; make sure to give the exported .3ds file a different filename so you don't overwrite the first .3ds file!

- You should now have two separate .3ds files and two separate matching .tga texture image files.





- Now import the first .3ds file with just Lara's joints in 3DS MAX. Keep this file open and import the second .3ds file with Lara's skin into the same 3DS MAX scene.

- In the 3DS Import options, choose Merge objects with current scene. Because the two files use the same names for Lara's bodyparts, you will get several Import Name Conflict notifications, but you can simply choose OK to have 3DS MAX rename them automatically.

- If you did it right and used the same 3D model and animation # number, the two imported .3ds files should match up and you can slide the animation slider to the pose you like (if you used different models or animation # numbers, you will get very weird results 😜)

- Now Export the combined 3D model as a Wavefront .obj again and open it in Metasequoia (or another 3D program of course).

- Because it really is two different 3D models combined into one and Metasequoia only creates one material, the textures don't look entirely correct: create a second material, set the two separate .tga texture image files that you exported from TRViewer to your new materials and then assign each texture material to their matching objects (the Lara skin joints .tga texture image to all the objects belonging to Lara's skin joints meshes, and the Lara skin .tga texture image to all the objects belonging to Lara's skin meshes).
(NOTE: you can also export the .3ds files to .obj files separately first, and then import them both in Metasequoia; if you do it this way, make sure you export the .obj files with the same animation frame or the position of Lara's skin joints meshes won't match the position of her skin meshes...!)
- Now you finally have a complete Last Revelation Lara in a nice pose as a base reference for your new papercraft!





5) Extracting Lara from Tomb Raider 5 Chronicles: converting the .trc level files, dummy meshes and merging Lara skin and Lara skin joints meshes

- For Tomb Raider Chronicles, there is yet another extra step involved because TRViewer can only read .phd (Tomb Raider 1), .tub (Unfinished Business), .tr2 (Tomb Raider 2 and 3) and .tr4 (The Last Revelation) level files, but the level files for Tomb Raider Chronicles come in .trc format...

- Luckily, a fan called Turbo Pascal created a small tool to convert the level files to the .tr4 format, called trc2tr4http://laraslevelbase.org/stuff/index.asp?Kat_1=%25&name=&Beschreibung=trc2tr4&submit=search&id=%25

- Unpack the self-extracting trc2tr4 archive to find the trc2tr4.exe tool and a small text document manual inside.


- trc2tr4 is a Command line tool, but I find it easier to create a .bat file: to do this, copy all 16 Tomb Raider Chronicles .trc level files to a new folder and place the unpacked trc2tr4.exe tool in the same folder.

- Create a new .txt Text Document in the same folder as well and tell the trc2tr4.exe tool which level data files you want to convert using the syntax:
TRC2TR4 levelname.trc levelname.tr4
- For levelname you have to type the exact .trc level name of course: make sure not to make any spelling mistakes! You can convert all 16 level data files at once by typing 16 separate lines for each level, or only one or as many at once as you like.

- Save the .txt file, and then change its file extension to .bat to actually make it into a batch script.

- Double-click the .bat file to run it.

- This will open a Command Shell window that shows the lines of script being run and the tool will start creating new .tr4 files in the same folder where you placed the level files, the trc2tr4 tool and your .bat file and these newly converted Tomb Raider Chronicles .tr4 files can be opened with the TR Viewer! 😀



(NOTE: the level names won't match the in-game level names, and the model names for the enemies and other objects won't be correct because TRViewer doesn't have a Tomb Raider Chronicles resources list, but they will open and extract properly)
- Tomb Raider Chronicles uses the same separate Lara skin and Lara skin joints method as The Last Revelation, so use the same method of exporting/importing .TRMVB files and merging the separately extracted .3ds files in 3DS MAX as I explained for that game.





Well done! :o)

Now you know how to use TRViewer to extract any 3D model from Tomb Raider 1, Unfinished Business, Tomb Raider 2, Golden Mask, Tomb Raider 3, The Lost Artefact, The Last Revelation, The Times Exclusive and Chronicles! 😀

When you open the extracted 3D models in a 3D program, you will see that they will need a lot of work to be made into a papercraft model of course as is usual the case with game models... But still: lots of opportunities for new papercraft Tomb Raider vignettes, starting with Lara blasting some dinos with a huge cannon; stay tuned! 😊



Tools used:
    - TRViewer Version 1.083 by E.Popov: Download TRViewer V1.083 binaries (565 ko, in zip format) from an archived version of E.Popov's website like:
https://web.archive.org/web/20180829025630/http://evpopov.com/_Downloads.html
(or get it from Aspidetr.com: https://www.aspidetr.com/en/tools/tr-viewer/trviewer-1-083/)

    - trc2tr4 by Turbo Pascal:
http://laraslevelbase.org/stuff/index.asp?Kat_1=%25&name=&Beschreibung=trc2tr4&submit=search&id=%25
    - Metasequoia 4http://metaseq.net/en/

Addendum: Tomb Raider level files extensions and model extraction overview:
    - Tomb Raider 1: .phd (right-click and export)
    - Tomb Raider 1 Gold (Unfinished Business): .tub (right-click and export)
    - Tomb Raider 2 & Tomb Raider 2 Gold (Golden Mask): .tr2 (right-click and export)
    - Tomb Raider 3 & Tomb Raider 3 Gold (The Lost Artefact): .tr2 (replace dummy meshes with Lara true appearance before exporting)
    - Tomb Raider 4 The Last Revelation & The Times Exlusive: .tr4 (replace dummy meshes with Lara skin and Lara skin joints meshes and merge the extracted files)
    - Tomb Raider 5 Chronicles: .trc (convert the .trc level data to .tr4 first with trc2tr4; replace dummy meshes with Lara skin and Lara skin joints meshes and merge the extracted files)

If you liked this tutorial and want to save it, you can download the combined steps as this single image:




4 comments:

  1. Hey ! I know it's a long shot but I found this post and was wondering if you know how to find the map of the level itself in the .phd with trviewer. Sorry to bother, thanks for your nice work !

    ReplyDelete
    Replies
    1. Hello! the TRViewer really is only for characters and objects, but you can use the Roomviewer "Rview 5.0 Revision 1" made by Turbopascal to explore the levels.

      You can search for it on many different classic Tomb Raider websites, but one place to download it is:
      http://laraslevelbase.org/stuff/index.asp?id=1078

      Classic Tomb Raider levels are made out of a lot of square(ish) rooms, that together make up the level (there's actually a maximum roomsize the creators of the games could make, and if they wanted a bigger room, they had to combine several smaller rooms into a bigger room; if you played around with the official level editor, you will understand ;o)

      So this tool can't show you the levels all at once but only one or two rooms at a time (if you select two rooms that are far apart though, you will also only be able to see one on the screen though), but with the tool you can explore the entire levels room by room (and you can export them to dxf format so you could stitch them together in a differernt program to make the level complete again - but some levels has hundreds of rooms so it's a lot of work ;o)

      It works with all the classic phd, tub, tr2 (they used the same for TR3), tr4 and trc level files and you don't even have to convert the trc files like you have to to use them with TRViewer. IEven though I have a very fast computer, the tool can be slow with large rooms, though, but that means you just have to be a bit patient sometimes. ;o)

      I hope this helps! There may be other tools, so try searching some more on classic Tomb Raider fansites, but this one works, just with the limitation that you can't see the entire level at once. Have fun!

      Delete
    2. Thank you very much for the reply, I'll try that !

      Delete
    3. This comment has been removed by the author.

      Delete