TresEd: The Trespasser Level Editor

(Previously called TresView)

Introduction
News
Download
Screenshots
Misc
Screenshots Screenshots Screenshots

Introduction

TresEd as a level viewer and editor that I am writing for Dreamworks Interactive's game Trespasser. At the time of release the Trespasser game engine was a revolutionary achievement in terms of outdoor scenes and in-game physics. However, it is unable to take full advantage of modern graphics cards, and comes with no level editor. With TresEd I hope to reveal a little more of Trespasser's true beauty.

  • Load Trespasser levels, displaying them in 3D using OpenGL
  • View levels from any position
  • Export models as .3DS
  • Move/rotate/copy objects
  • Edit terrain
  • Edit Trespasser script
  • Add new models using GeomAdd (separate download)
  • Many other handy editing functions

TresEd is work in progress. Experimental features include shadows on objects and specular bumpmapping.

Downloads, new levels, and other resources

  • Download TresEd, GeomAdd, and other utilities here. If you have any comments or suggestions, or if skimming the included readme doesn't answer your questions, please feel free to mail me.
  • See the Diehard forum to discuss TresEd and other Trespasser related topics
  • Check out TresCom for lots of Trespasser related stuff, including new levels that fans have created using TresEd.

News and Screenshots

2004-02-22: It's been a busy past few months for me, and in the new year I started work for a NZ game company called Sidhe Interactive. I've moved an old test release of TresEd to the main download page, it has some improvements for terrain editing and a few other changes. The release wasn't made public at the time so you might want to get it.

2003-09-02: New release of TresEd and GeomAdd. Many new features, see the download page for details. TresEd now saves spatial partitions, which should fix the level slowdown problem that some people have experienced. There are also some MAX scripts to import/export .TPM files, which means that dinos can at long last be edited, and new dinos created.

TPass012.jpg A raptor that was edited using  MAX. TresEd008.jpg Specular bumpmapping. TresEd007.gif The new terrain edit mode.

2003-01-26: A few days ago I arrived back in New Zealand, completing my eight months of travel. While sleep has been my main activity of the past few days, you might have seen me around the forums trying to catch up on what's been going on. I have a bit of free time at the moment, so if you have any suggestions for TresEd, feel free to email me or post to the "Things to put in TresEd" topic at diehard.

2002-12-12: Test release of TresEd, TPAAdd and SWPz. I have now finished my travels around Europe, and tomorrow I will be heading for India. So this test release will be the last until the end of January 2003. Briefly: The TScript editor in TresEd can play sounds, and has some hotkeys. TPAAdd is an experiment that should allow new sounds to be added to Trespasser, and SWPz is an experimental utility to uncompress SPZ texture files. Merry Christmas to you all!

2002-11-18: New release of TresEd and GeomAdd. I've been visiting madppiper for a few days, having just completed my three month tour around Europe by train. In between watching episodes of South Park, I got a chance to work a little on TresEd, fixing some problems which people have mentioned. I thought it time for a proper release, given the large number of new features that have built up in the test releases. See download page for details.

TPass002.jpg My updates have been lacking screenshots recently, so here's one of a new sky texture, which could not be imported with previous GeomAdd versions.

2002-10-15: Test release of TresEd and GeomAdd. I'm now heading into a part of my travels where I don't have the time, nor computer access to work on TresEd. So this will be the last release of TresEd and GeomAdd for a month or so. (Not much has changed though, most useful is probably the find and replace dialog for TScript values. The experimental text-based model format may also be of interest. See the readme files for details.)

2002-09-07: Test release of TresEd and GeomAdd. See here for the download. Features include: toolbar, drop objects to terrain, and proper import of opacity maps.

2002-08-23: New release of TresEd. See download page for details.

2002-08-12: New release of TresEd - Loads correct terrain . See download page for details.

2002-08-03: New release of GeomAdd and TresEd . See download page for details.

2002-07-12: New release of GeomAdd, minor update. I'm now one month into my travels, having spend most of my time visiting relatives in New Mexico and Canada. But I have spent a small amount of time working on Trespasser, and hope to be able to do more in a few weeks time.

Because of limitations of the .3ds format, dinosaur import did not previously work. While new dinosaurs still can not be imported, I've added a command to export models in the native Trespasser .grf format. This means that dinosaurs can now be moved between levels correctly. See the end of the included GeomAdd.txt file for details. I may not be online again for several weeks, so for more help check out the diehard forum. I know that at least Rebel has got the dino transfer working. In other news, I (along with help from Rebel) have made some excellent progress regarding the format of the terrain file, so we are hopeful that in the near future terrain editing will finally be possible.

2002-06-07: New release of TresEd. Twelve hours until I hand in my Masters thesis and head off overseas! So this will be the last release of TresEd for a while. New features are to facilitate copying objects between levels: subobjects can be exported with an object, the geometry type is remembered, and hopefully rotation export works now. Also moved the "view object types" from the hacking menu into their own menu for easy access, as they are no longer a feature just for hacking, but useful for level editing too.

2002-06-03: Put up my collection of notes about how the Trespasser data files work.

2002-05-27: GeomAdd is finally here! Check out the downloads page for the Technology Preview of GeomAdd, the tool for adding new geometry to Trespasser levels (there's also a new version of TresEd). Some other important news that you should know is that in two weeks time I'm going away overseas for an extended period of time, so there may not be any more releases of GeomAdd or TresEd for a while. However, if you find some urgent bugs in the latest releases, please email me, and I may get a chance to fix them before I leave. Note that my email address has changed. I hope you can decode the cryptic way I wrote it, I'm trying to avoid the large amount of spam that I have been getting at my old address.

2002-05-23: New release of TresView. Test release, preparing for release of GeomAdd. Automatic update of subobjects, view and object transform type-in, several bug fixes and smaller changes, and some new features that will work in conjunction with GeomAdd.

2002-05-05: I've been busy working on my Master's thesis which is due soon, so not much progress made on TresEd. I hope to have a preview version of geometry addition ready for download in a couple of weeks time, or perhaps sooner if I can squeeze in the time to do it.

2002-04-18: New release of TresView, henceforth called TresEd, though I'm yet to redesign this web page. See previous news entry (just below) or download page for a list of the main new features, or the history section of the included readme.txt for a full list of changes.

2002-04-11: I've been overseas for three weeks, but since I got back I've made good progress on TresView and a model import utility. The new features of TresView will be mainly useability features, such as undo/redo, remembering settings, and help on menu items. But model import still has some problems to sort out before I release anything, so check back in a week or two.

NewTeapot.jpg New model and textures imported into Trespasser.

2002-02-28: New release of TresView. Main new features are the ability to copy/delete objects, and edit TScript. Many smaller changes, for more details see the release history section in the readme.txt that is included with the download.

2002-02-20: New release of Tresview. Experimental level saving - positions of objects updated. We didn't even need to figure out the format of the SCN, Trespasser can create it for us! YAY! (Well almost, a small part of the SCN is needed. I believe that part is related to the hierarchy of objects, so we'll need to figure it out in order to add new geometry to levels.)

TPass001.jpg Friday the 13th in the TestScene? No, it's the new TresView! ha ha ha! TPass000.jpg Trespasser Demo screenshot, moved the gates and the end of level trigger to let the T-rex out.

2002-02-15: New release of Tresview. See download page for new features.

2002-02-13: I'm trying to make TresView more helpful for understanding levels by adding the option to display non-visible objects, which include triggers, vocal objects, boundaries, and physics objects. I'm also improving the display of the scripting to help understand how triggers and stuff work. For example, there are large rectangular triggers in the ocean named "TrigSheDies" which enflict huge damage on her. I hope to make a new release soon, once I've tidied up the interface.

TresView060.jpg Trigger objects shown in pink TresView059a.jpg TresView059c.jpg Broke something... reminds me of Alice in Wonderland

2002-02-04: Working full time on my Masters thesis which is due soon, but I did spend a short time seeing if TresView could save levels given what we currently know of the .scn and savegame files. However, I ran into several problems, which I believe TSOrd also had with his MasterHack program. When loaded into Trespasser, the moved objects can sort-of be seen in the new position, but there are several problems. 1) The object is only visible when the original position of the object is visible. 2) The object level of detail is measured from the original position, so they are often rendered as very chunky textures. 3) Trespasser randomly crashes. These problems can all be explained by assuming the object position is also stored in a BSP tree (or something similar) which would be used for visibility, object culling, and speeding up the physics. As I'm not updating the BSP tree, there would be visibility and level of detail problems. Also, the program would expect the object to be in a valid position in the BSP tree. Because I'm moving the object but not updating the BSP tree, they are likely in an invalid position, and it's not at all surprising that Trespasser crashes. So in summery, until someone works how the BSP tree is stored in the .scn files, we can't save levels.

2001-12-14: Been busy with University recently, and now Christmas holidays, so there likely won't be any more updates for a while. Merry Christmas to all, with appologies for not having a Christmas release of TresView! (Raptors, christmas trees and snow... might be an interesting mod)

2001-11-11: 3DS model extraction now has the option to extract bumpmaps, but they are usually very bad quality. The problem is Trespasser stores the bumpmaps as normal vectors. This is what graphics cards need to render bumpmaps, but I believe modelling programs prefer heightmaps. While generating normals given some heights is easy, doing the reverse is much harder, and I'm just apporoximating it at the moment. (Well actually any method is an approximation, just that my approximation is a particularly bad one...)

I've added an option to display the texture objects that are used to generate the terrain textures. These offer interesting insights into how the terrain was modelled - see the readme in the latest release for more info. Also added an experimental fullscreen mode (the menus can be hard to use though).

2001-11-07: Model extraction. Click and drag to select a bunch of models, select the output file and voila! models and textures are extracted. I propose the redefinition of 'infinite' as the amount of improvement this is over using the old utilities...

I've added a level load dialog to allow selection of texture detail and a few other things. Also improved the shadow object bounding volumes so the terrain textures update properly when objects move.

2001-10-28: I'm having trouble getting my render-to-texture working on non-nVidia graphics cards. This means the terrain and shadows don't always work. So if you have a non-nVidia based graphics card and can see the terrain properly, let me know what sort of card you have. And if you can't get it working, send me the debuglog.txt file to help me find out what the problem is. Thanks!

2001-10-25: Object shadows! Trespasser cast beautiful shadows onto the terrain, but I always wished that shadows were cast onto non-terrain objects too. In TresView they will!

A popular way to do shadows is using the stencil buffer. However, Trespasser is full of objects with partly transparent textures (eg. the vegetation) which is something stenciled shadows can't handle. The nVidia developer site has some great shadow demos using a z-buffer drawn from the light's point of view. I may implement the full method eventually, but to begin with I'm going to assume that objects don't cast shadows on themselves. This means I can ignore the light's z-buffer when rendering, and just use normal projected textures (which are a bit easier on the ol' brain cells, as well as non-GeForce3 cards). Actually they're not quite normal, because to get proper lighting objects need to be rendered twice - once with only ambient lighting, then again with only diffuse lighting but using the shadow map to mask out the shadowed areas. Stencil methods (like what John Carmack is using for the new Doom game) also require rendering objects twice to get proper shadows, so it's not as bad as it sounds :P

TresView051.jpg Shadows on objects! TresView052.jpg You can sort of see the semi-transparent shadow of a tree on the wall and the base of the block (though it's not particularly clear in this shot).
TresView053.jpg Better view of textured shadows. The shadows don't match those on the terrain as my terrain shadows assume the terrain is flat. TresView054.jpg Shadows on vegetation.

2001-10-23: Fixed the terrain interpolation! No more bumpy floors in buildings or under powerlines. The inside of the buildings and similar objects are flattened automatically, and a few remaining problem objects I have manually excluded from the terrain interpolation. I have missed some, but that's easy to fix if TresView is ever used for something that needs it.

Also worked on using the bumpmaps (see the help screen in TresView for instructions). Unfortunately my video card does not support specular (shiny) bumpmaps so I had to do diffuse ones. Displaying just the bumpmaps looks awesome, lots of detail that is not very noticable in the game. However when textured they don't look good. One reason is the textures have shadow areas painted onto them - so parts the bumpmap wants to make bright it can't as the texture is already dark. But a rare few objects look better, for example the gold bar.

TresView045.jpg Bumpmap with no texture TresView047.jpg One of the few objects that the textured bumpmap is noticable on

2001-10-20: Got colored fog working. I have tweaked the fog parameters for the summit to get a better sunset, as Trespasser's parameters do not look all that good. Also went back to the lower resolution textures as OpenGL loads textures significantly slower with compression enabled =-(

TresView043.jpg Non-white fog TresView044.jpg My improved sunset (Trespasser screenshot inset)

2001-10-18: Enabled loading of full resolution textures. Previously I had clamped the maximum texture resolution to 64x64 because the raw textures for the town took up almost 200Mb, which brings my system to a crawl. I'm now using OpenGL compressed textures which brings the memory down to about a quarter of that. The downside is level loading is much slower because OpenGL has to compress the textures as they load. I could cache these to disk - levels would much faster on subsequent loads - but I can't justify the effort at the moment as there is so much else to do.

TresView037.jpg

2001-10-17: Playing around with my terrain heuristics, got the ocean working but broke some other things, and decided it's too hard to automatically determine what objects should touch the ground. I think a better approach would be to manually mark problem objects as 'not to be used in the terrain interpolation'. Most objects work fine, I don't think it would take long to go through a level and select objects that shouldn't touch the terrain. These could be saved to a file and included with the TresView distribution. I'm also considering somthing like the cheat 'tnext'. For example, it could jump between all the off the path objects in a level, some of which are quite interesting.

TresView035.jpg I can see again! (the ocean that is) TresView039.jpg Off the path at the beach

2001-10-15: Created this page, adding some previous news for interest. Fixed several bugs preventing TresView working any system except my own :-) It has been tested on several different cards now, and hopefully it will work on any modern graphics card. So I've released it as beta version.

TresView032.jpg The Lab. TresView031b.jpg Comparison of TresView and Trespasser, which is which?

2001-10-13 Got my OpenGL fog matrices mixed up, but it created a not to bad ground fog effect.

TresView030_ground_fog.jpg

2001-10-13 Working on terrain textures and shadows. Due to Trespasser's software engine, they could do some neat things like have arbitrarily shaped terrain textures. Basically, these are just normal objects that are projected vertically down onto the terrain. That is very hard to render in real time though. So I am 'baking' the textures. The terrain is divided up into square textures, and the terrain texture objects are rendered onto them. The textures are dynamically resized and re-rendered as the viewer moves through the scene.

TresView029.jpg The neat thing about baking textures is that shadows can generated by regarding normal objects as terrain texture objects, except rendering them as darkness instead textured, and projecting at an angle instead of vertically down. I am currently making the same approximation that Trespasser does - shadows are projected onto a horizontal plane at the base of the object, instead of onto the actual terrain. Most obviously, this means that on slopes the shadows are not the correct length, and if parts of objects are below ground, they cast a shadow backwards towards the light. But it normally it looks convincing.

2001-10-07 Speed up the terrain approximation code, and added some heuristics to match the terrain more closely to the objects. Unfortunately it breaks near some objects, in particular dinos and telephone wires, but forrest scenes look good.

TresView016.jpg

2001-09: After after a long absence from the Trespasser scene, I've decided to make use of all the effort I put into hacking the level file formats and create a level viewer. I never realized just how buggy GeomExt (the utility I wrote for extracting Trespasser geomtery) is! . Problems include some geometry not extracting, missing and/or badly placed textures, and an inability to extract levels. So after many bug fixes I'm now convinced I can load >99% of the models without problems. And, of course, load whole levels too.

Unfortunately the format of the terrain files is still a mystery. So I've approximated the terrain by interpolating between the positions of the objects. This doesn't work very well, but it's much better than no terrain at all. Typical dynamic level of detail terrain algorithms like ROAM are not all that easy or fast to implement, so I came up with my own ;-)

TresView009.jpg TresView017.jpg


Page created 15 Oct 2001, last updated 22 Feb 2004, and is copyright 2001-2004 by Andres James. All rights reserved.