Initial Atlas Terrain Checkin (Pretty Pictures In Here!)
by Kyle Carter · in Torque Game Engine Advanced · 05/27/2005 (6:36 pm) · 249 replies
Hey guys,
I just committed the first public version of the new TSE terrain, codenamed Atlas. This is a fully modern, scalable terrain engine. Check the docs (updated with a whole new chapter :) for details.
This is a private release to our beloved TSE licensees. Congrats, guys, you get first shot at this new toy. :) We'll be rolling out a full launch of Milestone 2 - this was the last piece - next week when we all get back from Memorial Day of Weekend. I'd appreciate it ever so much if you'd keep on the quiet side about this until then!
The toolchain is currently a bit on the basic side. A fuller toolchain will be rolled out as part of MS3.
Please take a moment to give it a try. Feedback is welcome - post it here, in a new thread on this forum, or mail it to me. There's a lot more work to be done, but this represents a basic usable point for people to work from. :)
You can get this release by doing a CVS update, of course.
And finally... A rundown on the features:
Lightweight CPU Usage
Atlas uses less than 10% of CPU time per frame to update and render. Compare this with approximately 30% for legacy terrain.
Massive Landscapes
Supports landscapes of arbitrary size, bounded only by disk space. The current system supports approximately 10 quinquagintillion (or ten thousand quintillion vigintillion for those Brits in the audience, or 10154 chunks on the base level).
Vast View Distances
Can quickly render unlimited view distances, bounded only by the working range of the video card's Z-Buffer. Atlas can achieve 100+ fps on a midrange Radeon, with a view distance of approximately 4,000 meters. The legacy terrain is not even capable of rendering this view distance by default!
Unique Textures
Atlas supports a single massive texture for your entire terrain! Every texel is unique. Support for extremely large textures (in excess of 32,768 by 32,768 pixels) on all hardware. Of course, all this is streamed, so you only pay memory cost for the texture detail near you. A future release will support on-the-fly texture blending like the legacy terrain.
Streaming Data
Data is streamed from the disc as needed, so you can have very large terrains without exceeding your memory. Both geometry and texture data are loaded on the fly.
Accurate Collision
What is rendered is what is collided against, so you get full interaction support for anything Atlas can render - overhangs, gaps, ditches, and so on. As the toolset for this engine matures, it will be possible to actually create such terrains. But the runtime as of now supports this sort of topology.
Compressed Textures
Atlas fully supports industry-standard DXT texture compression. It compresses offline for maximum quality, pregenerates mipmaps for minimal CPU usage at runtime, then streams it directly into GPU memory.
Ok, I'm going to a party. I'll be back online later tonight to check up on things, and will be around during the weekend as well. Thanks for being so patient with me! :)
#62
05/28/2005 (2:35 pm)
@Nick - does the problem go away when you switch to fullscreen? (alt-enter)
#63
05/28/2005 (2:41 pm)
Ben it does go away when I switch to full screen. Hmm...
#64
05/28/2005 (2:42 pm)
Ah... Ok, I get a bit of the same problem on my system. No idea what causes it... It's super lame. :-/
#65
I only see an .exe to run the interactive demo. Is there a command line switch?
05/28/2005 (2:54 pm)
Ok, dumb question... how do you run the terrain_water_demo?I only see an .exe to run the interactive demo. Is there a command line switch?
#66
The changes Ben.. not the skybox :p Have anything new (codewise) been updated on CVS?
05/28/2005 (2:57 pm)
Quote:
Has what?
The changes Ben.. not the skybox :p Have anything new (codewise) been updated on CVS?
#68
05/28/2005 (2:58 pm)
Thanks :)
#69
Thanks for the post, Tom! :)
05/28/2005 (3:03 pm)
Just what I mentioned in my previous messages... Fixes for player, fixes for memory asserts.Thanks for the post, Tom! :)
#70
05/28/2005 (3:04 pm)
Incidentally, has anyone tried rotating or translating the terrain? :P
#71
Very cool Ben :)
-Josh Ritter
Prairie Games
05/28/2005 (3:12 pm)
I am going to check this out as soon as my VS7 arrives...Very cool Ben :)
-Josh Ritter
Prairie Games
#72
--While you can only import height map based terrains, Ben has assured me that the terrain itself is a set of polys, and yes, you can have overhangs, etc. Will become much more obvious (and useful!) when they editors are done (no, we don't know when that will happen!)
--As Ben just mentioned (edit), you can rotate (in all 3 axes), as well as translate terrains, as well as have multiples...think of the cave generation technique where you flipped in a second terrain block upside down over the first...
--anyone notice any stutters or delays directly attributable to paging in another terrain section from the disk? I didn't think so ;)
Great work Ben, it's awesome to finally have this out and being beat on (although the next week or so is gonna be rough, hehe).
05/28/2005 (3:14 pm)
Btw, Ben didn't capitalize on the "leading questions", so I will!:--While you can only import height map based terrains, Ben has assured me that the terrain itself is a set of polys, and yes, you can have overhangs, etc. Will become much more obvious (and useful!) when they editors are done (no, we don't know when that will happen!)
--As Ben just mentioned (edit), you can rotate (in all 3 axes), as well as translate terrains, as well as have multiples...think of the cave generation technique where you flipped in a second terrain block upside down over the first...
--anyone notice any stutters or delays directly attributable to paging in another terrain section from the disk? I didn't think so ;)
Great work Ben, it's awesome to finally have this out and being beat on (although the next week or so is gonna be rough, hehe).
#73
05/28/2005 (3:18 pm)
I tried translating the water, which didnt go too well.
#74
generateTQT("terrain_water_demo/data/terrains/test.jpg", "terrain_water_demo/data/terrains/test.tqt",3,256);
I keep getting "the instruction at X referenced memory *crap* the memory could not be read". Right after it says its allocating the decompression buffer for the jpg.
05/28/2005 (3:22 pm)
So if I have a 2048 texture to apply to my terrain, is this the right code to apply?generateTQT("terrain_water_demo/data/terrains/test.jpg", "terrain_water_demo/data/terrains/test.tqt",3,256);
I keep getting "the instruction at X referenced memory *crap* the memory could not be read". Right after it says its allocating the decompression buffer for the jpg.
#75

=)
Of course you would need to create a special terrain for the top, but this is awesome for doing some caves. I think we'll have to think about doing this in a few places.
05/28/2005 (3:28 pm)
Ben you evil bastard!
=)
Of course you would need to create a special terrain for the top, but this is awesome for doing some caves. I think we'll have to think about doing this in a few places.
#76
Don't quote me on this one here.. but as far as I understood Ben (watch out, lol) this is how it works:
TreeDepth * LeafSize = Resolution of your texture
-------------------------------------
Which means that in your example of 2048:
generateTQT("terrain_water_demo/data/terrains/test.jpg", "terrain_water_demo/data/terrains/test.tqt",4,512);
Should work.
05/28/2005 (3:46 pm)
Quote:
So if I have a 2048 texture to apply to my terrain, is this the right code to apply?
generateTQT("terrain_water_demo/data/terrains/test.jpg", "terrain_water_demo/data/terrains/test.tqt",3,256);
I keep getting "the instruction at X referenced memory *crap* the memory could not be read". Right after it says its allocating the decompression buffer for the jpg.
Don't quote me on this one here.. but as far as I understood Ben (watch out, lol) this is how it works:
TreeDepth * LeafSize = Resolution of your texture
-------------------------------------
Which means that in your example of 2048:
generateTQT("terrain_water_demo/data/terrains/test.jpg", "terrain_water_demo/data/terrains/test.tqt",4,512);
Should work.
#77
05/28/2005 (4:01 pm)
...speechless
#78
So 2^(3-1) = 2^2 = 4. 4 * 256 = 1024. No go.
For a 256 tile size, and a 2048 texture, you have 8*256 = 2048, so you solve 2^(treeDepth-1) for 8, which gets you 4.
So, 4 and 256 are the right values, not 3 and 256.
To summarize, this relationship must hold:
(2 ^ (treeDepth - 1)) * leafSize = imageSize
Hope this makes more sense. :)
I'll update the docs on this area of things, of course... I guess I wasn't clear enough. Also need to do more error checking. :)
BTW, if the TQT's treeDepth is greater than the CHU's treeDepth, the lower texture levels won't be loaded, since there won't be anywhere to put them... If it's not as deep the "nearest" texture is used, no problem there.
Incidentally, Tom, that's one of the most mind bending images I've ever seen. Nice work. :P
05/28/2005 (4:26 pm)
It's actually 2 ^ (treeDepth-1) for the number of tiles on a side of the tree. Sorry, was not clear.So 2^(3-1) = 2^2 = 4. 4 * 256 = 1024. No go.
For a 256 tile size, and a 2048 texture, you have 8*256 = 2048, so you solve 2^(treeDepth-1) for 8, which gets you 4.
So, 4 and 256 are the right values, not 3 and 256.
To summarize, this relationship must hold:
(2 ^ (treeDepth - 1)) * leafSize = imageSize
Hope this makes more sense. :)
I'll update the docs on this area of things, of course... I guess I wasn't clear enough. Also need to do more error checking. :)
BTW, if the TQT's treeDepth is greater than the CHU's treeDepth, the lower texture levels won't be loaded, since there won't be anywhere to put them... If it's not as deep the "nearest" texture is used, no problem there.
Incidentally, Tom, that's one of the most mind bending images I've ever seen. Nice work. :P
#79
It basically pukes out straight after initialising the scratch area for jpeg decompression. Maybe the jpeg decompressor doesnt like the image?
Its all lookin good though ben, if I can get this terrain texture to TQT up I should have a nice little example image :)
05/28/2005 (4:46 pm)
Hmm, well, after twiddling with almost every combo, I'm still unable to get it to work.It basically pukes out straight after initialising the scratch area for jpeg decompression. Maybe the jpeg decompressor doesnt like the image?
Its all lookin good though ben, if I can get this terrain texture to TQT up I should have a nice little example image :)
#80
This terrain looks pretty fun :D Bit tricky on making it all and still haven't exported a heightmap successfully yet. And my engine crashes after only 2 minutes of game. But still cool :D
05/28/2005 (5:14 pm)
How did you make a cave like that with it? This terrain looks pretty fun :D Bit tricky on making it all and still haven't exported a heightmap successfully yet. And my engine crashes after only 2 minutes of game. But still cool :D
Torque Owner Martin Schultz