TTLG|Thief|Bioshock|System Shock|Deus Ex|Mobile
Results 1 to 16 of 16

Thread: Generating landscapes with Terragen

  1. #1
    Member
    Registered: Sep 2004
    Location: Finland

    Generating landscapes with Terragen

    Lately, I've been thinking about how to make editing easier. Jörg Fischer wrote a tool that could interface between the Terra Nova Word Editor (TNWE) and Terragen, a landscape generator. Since TNWE can import and export heightmaps... And Terragen can export landscapes...
    The first thing was to export (shift-e) a heightmap from TNWE. IrfanView says the following:

    • xportmap.pcx
    • RLE encoded PCX
    • 1025*1025 resolution
    • 256 colors greyscale (8 bit)
    • Every "pixel" is actually 4*4 pixels

    I won't get into how I made landscapes in Terragen since I only played around with it a few hours. Fairly easy to use and there are many tutorials and plugins available online. It's possible to import original heightmaps from Terra Nova into Terragen by converting them into .tga with the same resolution as the Terragen terrain size (513*513 is max for the unregistered version).

    The Terragen heightmaps must be exported in 8 bit .raw format, not .sgi. I resized the heightmap back to 1025*1025 in IrfanView and saved it as xportmap.pcx in the TNWE directory. I started TNWE and pressed shift-i to import the heightmap, and ctrl-m to recalculate terrain shadows. Success! This sure beats inputting the height values for all 261121 tiles manually!
    Last edited by Gigaquad; 19th Feb 2007 at 08:39. Reason: Images no longer exist

  2. #2
    Member
    Registered: Oct 2001
    Location: Gosford, NSW, Australia
    DAMNIT!

    Now I wish even more I hadn't lost the Terrain and World files from my old Terragen renders.

    It'd be cool to see how a map from the game looks in Terragen.

  3. #3
    Member
    Registered: Oct 2001
    Location: Gosford, NSW, Australia
    I exported map 20, the map used for the attack on the pirate base that you had to scout in mission 3.

    I think terragen exaggerated the height, but for early results, it's interesting.

    1
    2

    I think these last two are along the mountain road.
    3
    4.

  4. #4
    Member
    Registered: Sep 2004
    Location: Finland
    Did you use the default parameters when importing? I did a little experimenting with the first of the demo's three missions, which has an easily identifiable lake.

    I kept the Terrain grid points at 513*513, but changed Landscape area to 3000*3000m, which is the level size indicated by navigation points. The following settings resulted in a fairly similar contour and scale: Height scale 50%, Height offset -28%.

  5. #5
    Member
    Registered: Oct 2001
    Location: Gosford, NSW, Australia
    Thanks for the values. I've done a render of part of the level where you attack the pirate outposts on the little islands. It looked best at water level -99m. -100 puts it below all terrain. I'm not sure if those values will work for all maps. Just keep decreasing the height until you see no more terrain underwater in the sculpting window. I used 1025 for terrain size, as at 513, it only showed a quarter of the map.

    Islands
    Took 3 hours to render on my old 333mhz machine. I don't know what that dot in the upper middle is. Perhaps some rendering error. There was a large visual error around there when it was rendering, but like I have seen before, it was not present in what is is actually being rendered.

    Now what we need is a program to output all the tiles used in a level as one big image, so that it can be imported into terragen and mapped over the terrain.

    I think the guys behind Terragen would be interested in this. Terra Nova is a very old game, but this does show off what Terragen can do. Games have used Terragen to make skyboxes and textures and such for years... but levels?
    Last edited by Drat; 1st Jan 2006 at 14:03.

  6. #6
    Member
    Registered: Sep 2004
    Location: Finland
    Beautiful. Apparently you don't even need to register Terragen for great results, as this shows . I need to read some tutorials instead of randomly adjusting sliders...

    Now what we need is a program to output all the tiles used in a level as one big image, so that it can be imported into terragen and mapped over the terrain.
    I just noticed the editor's ctrl-m function isn't documented, but you can enter any number for light intensity and the shadows will be calculated accordingly. A large enough number will result in no shadows. It's a step in the right direction, since shadows would distort the textures.

  7. #7
    Member
    Registered: Oct 2001
    Location: Gosford, NSW, Australia
    I just had an idea. Download a DEM file of a region, load it into Terragen, export it, and put it (or a portion of it) into the game. Real world locations in Terra Nova!

  8. #8
    Member
    Registered: Oct 2001
    Location: Gosford, NSW, Australia
    Tomorrow I'll be borrowing a much better (but still weak) machine for some time. I may try some renders on it. It takes too long on this one, except for previews, and the memory requirements chew up my system drive with virtual memory. I left too little leeway for my system drive when setting up this system. Soon to be resolved, hopefully.

  9. #9
    Awesome stuff, guys!

    Love that islands render, too... it would be very cool to see some more of the landmark locations from the game rendered in this manner.

  10. #10
    Member
    Registered: Oct 2001
    Location: Gosford, NSW, Australia
    Here are a couple more renders. I'll do larger ones and ones with water on the faster machine. These two renders took 38 and 33 minutes respectively, which goes to show how much more work it is for the CPU to do the reflectivity in the other ones. Granted, these two also show less terrain than the Islands one, leading to less render time.

    A plot twist occured here
    Now, where did he park that ship?

  11. #11
    Oh man, I'm loving this!! Memories come flooding back with every screen, Drat :)

  12. #12
    Member
    Registered: Oct 2001
    Location: Gosford, NSW, Australia
    Hey, if someone wants copies of the heightmaps from the games, to render for themselves, I can email them. I don't have the webspace to put it up. You'll need to be able to accept a 7.13 meg zip file. Alternatively, I could send 8 smaller RAR files, and it will be 260 kb larger overall.

    Edit: I batch converted the PCX files to 24 bit, uncompressed Targas with PSP7, which resulted in 159 megs worth of files. On a whim, I compressed them with RAR, which brought them down to 7 megs. Granted, one can imagine that there would be a lot of redundant data going from a simpler format and lower bit depth to a more complex format and higher bit depth, but damn.
    Last edited by Drat; 8th Jan 2006 at 07:49.

  13. #13
    Member
    Registered: Feb 2002
    Quote Originally Posted by Drat
    Hey, if someone wants copies of the heightmaps from the games, to render for themselves, I can email them. I don't have the webspace to put it up. You'll need to be able to accept a 7.13 meg zip file. Alternatively, I could send 8 smaller RAR files, and it will be 260 kb larger overall.
    I have some webspace I could host them on, if you'll let me. Send me a PM?

    (We really need to get a section on SBF or something...)

  14. #14
    Member
    Registered: Oct 2001
    Location: Gosford, NSW, Australia

  15. #15
    Member
    Registered: Sep 2004
    Location: Finland
    Gigamap extracts the texture mapping information from Terra Nova levels and passes this to batch files. A batch file instructs ImageMagick to piece together small tiles to form one giant texture map.

    Warning!
    The largest possible texture map is one gigapixel: a 32768*32768 pixel BMP (several hundred megabytes). Creating such a file may take several hours, and you may need to leave the command prompt active and not use any other programs during the creation of the texture map.
    Static is a heightmap extractor for Terra Nova levels. The heightmaps can be used to recreate the terrain in other game engines or rendering software.

    Features:
    * Extracts both the low- and high-resolution heightmaps
    * Accurate height levels thanks to 24 bit colour depth
    * Gives a summary of map properties
    Most importantly, there's a text file describing the map format. Get everything from http://terranova.110mb.com.

    I knew I forgot something: DeathValley before and after texture mapping. The improved heightmap has resulted in smoother slopes.
    Last edited by Gigaquad; 19th Feb 2007 at 08:47. Reason: Weird. The embedded picture was visible only when logged in, changed to link

  16. #16
    I found Jörg's previous Terra Nova fansite after browsing the TTLG news archives. All files were recovered from the Internet archive, including the programs.
    Good work!! I spent ages trying to track all of that stuff down, and I thought that I'd scoured the archive for everything I could think of at the time. Very happy to hear that you had better success (or that I was dumb and hadn't checked everything after all... I'm happy now either way :)

    edit: Oh, you need to edit the various download URLs on that site. You have a backslash instead of a forward slash before the filenames.
    Last edited by Shadowcat; 5th Feb 2007 at 19:48.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •