Tomb Raider Room Editor NOW!


Coming next: exporting moveable with texture coordinates / drag and drop of meshes & moveables between levels

TRViewer V0.42 released (2000/05/01) 

Click to enlarge   Click to enlarge Click to enlarge

I intially planned to release a V0.5 and not a V0.4 as it should be because there are lots of work done since the V0.3 (not always visible from the user point of view, though). The V0.5 is currently not completed, but because it's a long time from the previous release and people call out for a new version :-), I decided to make a release now. So that's why this release is numbered V0.42.

Then, what's new this time:

- you can edit all the properties of a mesh: collision sphere / lighting (for internal lighting). In addition, you can translate the mesh in its coordinate system, which in effect allow you to change the position of the pivot point use for this mesh during animations (the pivot point is the origin of the coordinate system)
- you can view / change the hierarchy of a moveable
- you can import a mesh / moveable from a .3DS file with full textures
- you can drag and drop a tile from one level to another tile of the same level or of another level
- you can drag and drop a mesh / moveable into another mesh / moveable of the same level. You can't for the moment drag and drop mesh / moveable between levels

I used this last possibility to make the two screenshots above on the right: I used mesh #16 in the nevada level to replace Lara and mesh #12 in the office level (to play TR3 levels from your HD and not from the CD, you need to take this TR3 .exe). I don't have time now to explain better the new capabilities, but you can read here the description of the steps needed to replace Lara by the bad guy #16 in the nevada level. If you understand how it's done, then you can replace Lara by whatever moveable you want in a given level (the restriction is that the moveable you replace Lara with must be in the same level as Lara - I hope this restriction will be removed in the V0.5). Also, feel free to ask me (and others) questions about TRViewer in this great place: Tomb Raider Level Editor & Utility Discussion Forum from Eepē site.

The main point I would like to look at is the importing of moveables, but I have no time now. However, if you want to use it, keep in mind that:

- moveables generally face away from you at their initial position (look Lara in TRViewer for example). So, if you import a .3DS, make sure you see your caracter from the back in 3D Studio before importing.
- also, meshes in 3D Studio must not have modeling transformations other than the identity. To achieve this, make sure to apply a "reset X Form" on all your meshes just before you define the hierarchy in the keyframer, and after you applied all the transformations you wanted to make on your meshes (translations / scales / etc). If you have to come back to the 3D editor to make modifications to your meshes, you must unlink the meshes in the keyframer before, then make your modifications, then re-apply "reset X form" on all meshes and re-link your meshes in the keyframer.
- in the keyframer, you should link the meshes in the same order as they appear in the moveable you want to replace. For example, the Lara hierarchy begins with hip / left thigh / left shin / left foot / etc, so if you design a moveable to replace Lara, you should link the left thigh to the hip, then the left shin to the left thigh, etc. However, it's not a requirement because you can change the hierarchy in TRViewer after having imported the moveable.
- in the keyframer, position correctly the pivot points. You can see where the pivot points should be for each mesh of a moveable by looking in TRViewer at the green plane when browsing a mesh: the intersection of the red lines gives you the position of the pivot point. However, you have the possibility to change indirectly the pivot point in TRViewer by moving the mesh with regard to the green plane. In effect, it will really change the pivot point position.
- when importing a moveable into TRViewer, make sure that the textures are in the same directory than the .3DS file (textures must be .TGA files).

One more thing: I can't provide a demo of the modified nevada / office level because the merging capability no longer exists (but should come back in a next version): so you would have been required to download the full level (about 1 Mo each) plus it would not be very legal (though TRViewer itself is not very legal...).

Known problems:

- The object toolbox window stays on top of all other window, even if TRViewer is minimized / out of focus. I will fix this later.
- TRViewer seems to crash intermittently... Please, report such problems if you encounter them. Thanks.

Play Goldorak in the Great Wall level ! (2000/03/19) 

Click to enlarge   Click to enlarge
To demonstrate the new capabilities of TRViewer (see below), I have replaced Lara (sorry Lara...) by Goldorak (a 3D mesh from a japanese animation, if you don't know him) in the first level of TR2 (the Great Wall): just download the package here, run the .bat file and you are ready to play ! You may need to modify Tomb2.exe to make it read the modified wall.tr2 from your HD: check the downloads section if you don't know how to do.

Important: after copying the data directory from the CD to your HD, unset the Read-Only flag of all the files in the directory. If you don't do that, you won't have any error when launching the .bat file, but modifications to the level won't be made !

TRViewer V0.3 released (2000/03/19) 

Click to enlarge You can now:

-Load/replace the palette (8/16 bits) of TR1/2/3 levels. The palette format used is PaintShop Pro 4's one: to look at it (very simple format), just export a palette from a TR level using TRViewer and open the file in a text editor. It should be self-explanatory.

-View moveables from TR1/2/3 levels (a moveable is a hierarchy of meshes - for eg, Lara is a moveable).

-Export/import a .3ds to replace any mesh of a TR1/2/3 level.

-"Clear" a mesh (replace a mesh by a mesh with 0 vertices/faces): useful to remove the ponytail for Goldorak, for eg :-)

Take a look at the Wall level with Goldorak replacing Lara (described above): Goldorak was imported into the level using these new capabilities of TRViewer.

Limitations:

-The main limitation is that the texture coordinates are not imported with the .3ds file: the color of a face is taken from the diffuse color of the material for that face. Importing textured .3ds is planned for the next TRViewer release.
-Exporting .3ds is not very useful on its own because each face of the TR mesh is converted into one mesh in the 3DS file (this is that way because a vertex in a TR mesh can have multiple texture coordinates, which is not possible for a vertex in a single 3DS mesh). One side effect is that lighting is not handled correctly because each vertex of each face has its own normal (the face normal), which is different from the same vertex of an adjoining face. So lighting does not smoothly blend between faces. Another "side effect" is that geometry is duplicated: a mesh exported to a .3DS file has always num vertices = 3 * num triangles !
The main goal for exporting to a .3ds file is to be able to scale/move correctly a mesh in 3D Studio before importing it into TRViewer. Indeed, because you can only replace a mesh and not its hierarchy, you should replace a TR mesh with a 3DS mesh which has dimensions as close as possible to the dimensions of the replaced mesh. To achieve this, export the mesh to be replaced to a .3ds file (right-click on the mesh in the tree and choose "Export to 3DS"), load it into 3D Studio, merge with your replacing mesh and then scale/move your mesh to fit the dimensions/positioning of the source mesh. Then, when you think your mesh is ok, delete the source mesh from your 3DS project, save the file and import it into TRViewer to replace the source mesh (right-click on the mesh in the tree and choose "Import from 3DS"). Et voila: you have replaced a TR mesh ! That's a somewhat involved process: importing a moveable (meshes + hierarchy) should be welcome (next release of TRViewer)...

TRViewer V0.2 released (2000/03/05)

Errata: sources have been updated (on 2000/03/06), it didn't compile (missed some files in the project, though present in the directory / used glut which is not needed). Sorry for the trouble :(.

Click to enlarge You can now view meshes from any TR1/2/3 levels (use OpenGL, so make sure you have proper drivers) !
When browsing a mesh, camera can be in two modes: automatic and manual (use the radio button to select the mode). In automatic mode, the camera rotates around the mesh automatically. In manual mode, you can move the camera with these keys:
- PgUp / PgDown: zoom/dezoom
- Del / End: rotate about Z axis
- Left / Right arrow: rotate about Y axis
- Up / Down arrow: rotate about X axis
When a mesh has internal lighting, you can switch between internal / external lighting pushing the appropriate radio button. Internal lighting means that the mesh has its vertex intensities precomputed, while in external it has not. In this latter mode, in TRViewer, mesh is rendered using its base textures, with no lighting (note that in TR, external lighting means that objects are lighted by external light sources, like lens flares or light sources present in the rooms).

Known problems:

-alpha in textures are not correctly handled. I should sort faces with alpha-texture and render them at the end. So artifacts are visible when browsing a mesh which uses textures with alphas. I will try to fix this, but I'd like OpenGL to handle this alone (should sort and render appropriately those faces with alpha-texture) !
-not really a problem, but my camera class is awfull, I reused one I wrote some years ago, I have to rewrite it. But it works, it's the point :)
-more generally, the code is not always very clean. Please don't report (yet), it's a work in progress. When time comes, I will work on this (doc and so on).

TRViewer V0.1 released (2000/02/27)

TRViewer lets you browse textures from a Tomb Raider level (TR1/2/3/4).
You can export / import textures into the level, then save the new level, ready to be played.
In addition, you can save a .mrg file, which is the "difference" between the original level and your new level. By spreading this .mrg file and TRMerger.exe (a little tool in the TRViewer package), everyone is able to rebuild the new level using this .mrg file and the original level.

Using TRViewer:

Just launch the exe and choose a .phd / .tr2 or .tr4 file to browse. To import / export a texture, select the node in the tree, then click on the right mouse button and choose what you want to do. When you have imported a texture, you can revert to the original one by choosing "Revert to original" in the popup menu displayed when right-clicking. Textures are exported as 32 bits .TGA files and can be imported as .tga, .bmp, .gif, .fli, .flc and .cel (don't be fooled: .fli/flc does not import texture as an animation ! Just the first frame is imported).

To save your new level, you must proceed in two steps:

- first choose "Save As .mrg" in the file menu, and save the file. Caution: you must save the .mrg file in the same directory as the original level file one, in order for the step 2 to work.
- then, choose "Merge level" in the file menu and select the .mrg file to be merged with the original level. The original level is backuped to a .bak file and the new level is created, merging your modifications with the original level.

In a .tr4 file, if you replace texture 1 or texture 2, don't forget to replace the other: both textures are the same, except for the depth (32 bits for texture 1, 16 bits for texture 2). By the way, you can replace the texture 2 (the 16 bits one) with a 32 bits TGA file: TRViewer will make the conversion for you during the import.

Known problems:

- You can only replace the 16/32 bits textures, not the paletized ones. It's not a bug, it's a simplification on my part :)
- There are some memory leaks when exiting the app. I will fix this later.

Using TRMerger:

You can merge a .mrg with a TR level using TRViewer ("Merge level" in the file menu) or with TRMerger. It's a little command-line utility which takes the .mrg file name as input and produces the new level as output (the original level is backuped as a .bak file). Caution: you must launch TRMerger from the same directory as the original level one.

Downloads


Sources are for Visual C++ 6.0. Binaries should work on W95 / W98 / NT. Mesh/moveable viewing need Open GL support.