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! :)
#82
05/28/2005 (5:23 pm)
Oh, and a suggestion for the future, just to make sure its in mind, is texture generation from torque, like TGE has. Like, put it certain textures and tell it how to place them, then torque generates the file for you, just like TGE did.
#83
Another gave, like Spilmans. I agree, I believe that the lighting simple needs to be lowered for this to work.
05/28/2005 (5:42 pm)
[img]http://kuattech.no-ip.org/cave2.jpg[/img]Another gave, like Spilmans. I agree, I believe that the lighting simple needs to be lowered for this to work.
#84
05/28/2005 (6:24 pm)
How exactly are you doing those caves? I wanna try :D
#85
05/28/2005 (7:08 pm)
I think they are just translating the terrain and rotating it around it's axis so it faces the camera with it's top.. then lowering the levels of that terrain to make it look more "hole"ish.
#86
@Jacob: If you can give me the text of the assert that's triggering, or the line it's dying on, I can help solve the problem!
@Mike: I'll go double check that. It's probably just some minor flag issue, as I spent about a week driving around on various terrains before I made the code public.
@Jacob: There's a special section in the manual where I outline the areas in which it planned that Atlas will be improved in future releases.
@Mike: I have no idea what you just said, but the picture is pretty.
@All: The terrain download page has been fixed, incidentally. A missing tag, now repaired.
05/28/2005 (7:14 pm)
@Phil: Send me your JPEG and I'll see what I can do with it. Or get on IRC. Or IM me. Let's get this sorted out. :)@Jacob: If you can give me the text of the assert that's triggering, or the line it's dying on, I can help solve the problem!
@Mike: I'll go double check that. It's probably just some minor flag issue, as I spent about a week driving around on various terrains before I made the code public.
@Jacob: There's a special section in the manual where I outline the areas in which it planned that Atlas will be improved in future releases.
@Mike: I have no idea what you just said, but the picture is pretty.
@All: The terrain download page has been fixed, incidentally. A missing tag, now repaired.
#87
05/28/2005 (7:22 pm)
Ok, added missing flags for hover and flying vehicles. Now to test the collision...
#88
05/28/2005 (8:17 pm)
I just compiled with no errors and it is beautiful. Now I just have to figure out how to use it. Looks like I don't need a temp mesh terrain solution for my Innertubing game anymore! Yeehah!!!
#89
05/28/2005 (8:21 pm)
@Jacob - Yea just add a second instance of terrain into the mission file. Then set the rotation on it to 1 0 0 180. This flips it over then move it up/down to make the roof for the cave. The lighting is all wrong for a cave, but it's a neat trick to do with the new terrain. Still it's cool that we can have multiple instances of terrain now. This means you could say make a small room in an interior which has a terrain inside of it.
#90
There was a typo in the initPersistFields code - detail textures were getting confused with the shader material. Whoops!
Ah, the problem is somewhere in the transform code. Collisions work perfectly - as long as you've not applied any transform to the terrain. I'll fix this problem ASAP, until then make sure that the position is "0 0 0", scale is "1 1 1", and rotation is "1 0 0 0", in which case the collision will work great. Just dropped a few buggies from about a kilometer in the air to test, and all went perfectly.
Added a $TypeMask::AtlasObjectType to the script engine.
Sorry about the trouble! Will fix as soon as I can! :)
(Wow, busy thread - I posted and there were four more posts by the time I got done! :P)
I think a tower with a little miniterrain that was the same as the terrain OUTSIDE the tower would be mindbogglingly cool. Can do it very cheaply, too, as data is shared between instances of the same terrain. :)
Some of the LOD code will currently get a bit confused by that, though, as it's hard coded and not calculating based on pixel error. I'll be fixing that ASAP.
05/28/2005 (8:28 pm)
Checked in a bunch of minor fixes to the code. The collision does seem a bit wonky on the more finely tesselated terrains.There was a typo in the initPersistFields code - detail textures were getting confused with the shader material. Whoops!
Ah, the problem is somewhere in the transform code. Collisions work perfectly - as long as you've not applied any transform to the terrain. I'll fix this problem ASAP, until then make sure that the position is "0 0 0", scale is "1 1 1", and rotation is "1 0 0 0", in which case the collision will work great. Just dropped a few buggies from about a kilometer in the air to test, and all went perfectly.
Added a $TypeMask::AtlasObjectType to the script engine.
Sorry about the trouble! Will fix as soon as I can! :)
(Wow, busy thread - I posted and there were four more posts by the time I got done! :P)
I think a tower with a little miniterrain that was the same as the terrain OUTSIDE the tower would be mindbogglingly cool. Can do it very cheaply, too, as data is shared between instances of the same terrain. :)
Some of the LOD code will currently get a bit confused by that, though, as it's hard coded and not calculating based on pixel error. I'll be fixing that ASAP.
#91
05/28/2005 (8:49 pm)
@Ben - So you mentioned that the format for the terrain supports "overhangs". How radical can we get with it? Will collision still work in these cases?
#92

I am not supposed to cry... I am a man.
So, for something like this, am I supposed to give you guys my firstborn?
05/28/2005 (8:50 pm)
The new terrain can be rotated. I can make my mountain sides.
I am not supposed to cry... I am a man.
So, for something like this, am I supposed to give you guys my firstborn?
#93
05/28/2005 (8:53 pm)
Ditto to Tom Spilman's question about overhangs.
#94
Of course, right now the generation tool only reads in a heightmap, so you can't get anything other than a heightmap-like geometry out of it. Once I get TGE 1.4 done, I can focus back on the toolchain, at which point we should start seeing some supercool things. I won't go into much more in the way of details on that - would rather let the results speak for themselves. :)
@Anton: Isn't that awesome? :)
05/28/2005 (8:54 pm)
@Tom: The format and runtime simply model the terrain as a bunch of chunks of geometry. Chunks can have an optimized collision quadtree attached to them, that speeds up geometry look-ups for raycast or convex/polylist queries. The collision itself is essentially done per-triangle, so there aren't any limitations on concavity of the mesh. End result, you can put most any sort of geometry in the system and it'll deal with it just fine. There are some implementation details that favor geometry placed in a regular grid, and right now texture co-ordinates aren't stored (instead, a texgen in the vertex shader is done), but these are very minor limitations. The biggest danger is trying to push too many polygons through, but as long as you're sane about that, you can do overhangs, holes, even towers or simple objects! It's all superfasts, too, as it just does a couple of bounding box compares, then runs through a short list of triangles.Of course, right now the generation tool only reads in a heightmap, so you can't get anything other than a heightmap-like geometry out of it. Once I get TGE 1.4 done, I can focus back on the toolchain, at which point we should start seeing some supercool things. I won't go into much more in the way of details on that - would rather let the results speak for themselves. :)
@Anton: Isn't that awesome? :)
#95

Yeah... you guys own my soul now.
05/28/2005 (9:01 pm)
I can have more than one terrain at a time!
Yeah... you guys own my soul now.
#96
05/28/2005 (9:03 pm)
Hehehe.... It only gets better. ;) That's pretty cool looking.
#97
Things like this then seem possible:
05/28/2005 (9:12 pm)
So it seems the only limitation here is how to get this non-heightmap data into the chunk file. A volume texture seems like overkill... plus how the hell do you convert that into a mesh. Looking to Terragen they state this in their page on Terragen 2:Quote:Overhanging terrain using procedural displacements, image-based displacements, or imported geometry.Which makes me think that we could support a second texture which solely encodes an x/y displacement for each terrain height. This way you could push some samples to overhang neighboring samples. This would especially be a neat feature once the Terrain editor is back up and running. Think of a brush stroke that can push out the samples to overhang.
Things like this then seem possible:
#98
05/28/2005 (9:18 pm)
That would be supercool. If you don't mind, I'm not gonna talk here much more about future editor work beyond saying that there will be in-game editors, there will be a lot of active development after TGE 1.4 is done, and I expect all of you to make cool games with this tech. :)
#99
05/28/2005 (10:55 pm)
This is amazing.. Thank you ben
#100
In your screenshot above, I see the healthbarhub. So just wondering if this control been ported over yet? Thanks.
05/29/2005 (1:39 am)
@Ben:In your screenshot above, I see the healthbarhub. So just wondering if this control been ported over yet? Thanks.
Torque Owner Mike Kuklinski