Game Development Community

Initial Atlas Terrain Checkin (Pretty Pictures In Here!)

by Ben Garney · in Torque Game Engine Advanced · 05/27/2005 (6:36 pm) · 249 replies

public.garagegames.com/beng/terrain001.JPG
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! :)
#141
05/30/2005 (12:45 pm)
@ Phil, that helped... it make the file almost instantly. thanks!
(I was following what the docs said, so I didn't think I had to change anything :( )

Next thing is to work out how to render a terrian texture w/o paying $99 for a full copy of terragen :\
#142
05/30/2005 (1:07 pm)
.
#143
05/30/2005 (2:25 pm)
Ben & Pat, the crashes went away with the changes in the preprocessor which you proposed.
I really think that should be added to the documentation so that others with VC6 can benefit from it :) It's really far more enjoyable now when it doesn't halt.

Thanks alot
#144
05/30/2005 (2:31 pm)
This is just plain old awesome.

Rotating the terrain, that is pretty freaking awesome as well.

This is a happy day for garney's everywhere. :-)

Everything works on my end too.
#145
05/30/2005 (4:08 pm)
Hmm, still having huge pukings when generating TQT files. Its just... puking :)

I'm generating a 4096 jpg based texture using file file 3 512 and its dying, so I change it to 4 256 and its dying...

Believe me this IS going to work!!! wether it likes it or not!!!
#146
05/30/2005 (5:59 pm)
Depth of 3, size of 512 won't work for a 4096 - it'll only work for a 2048. You want depth of 4, size of 512 (or depth 5, size 256).

Changing the leaf size in general won't affect whether it's working or not. I think I've got some ideas on how it can be a bit more intuitive.. Watch for changes this week. :)
#147
05/31/2005 (3:33 am)
Quote:Next thing is to work out how to render a terrian texture w/o paying $99 for a full copy of terragen :\

I've actually been tryin to mess around in photoshop with a heightmap for this. Color in the spots you want with the heightmap as a guide or just use some sort of clouds and do it randomly, whatever you want, and put the heightmap as the alpha texture. Then use the render lighting filter and use the alpha map which is the height map to render detail onto it and that'll give your textures lightin. Haven't gotten to test this yet, but the results so far look like they'd work. And its way faster then terragen.
#148
05/31/2005 (7:44 am)
Compiled fine for me. I did notice a few seams in the large terrian when viewed at a distance. LOD problems i wonder.
I also noticed that the terrian looks a little fuzzy at a distance but get really sharp when you get closer. I guess it's to do with the resolution of the normal maps. Not bad for the first public release.

One Problem i was having is that the free flying camera doesn't give you much of a sense of the scale. so i took this picture as a reference. This is the default mission with the large terrian provided above.
home.ripway.com/2005-2/263802/TSS/screenshot_00001.pngif you look carfully you will see a cyan dot. that is the spinning cube with the animated numbered textures. wow!
#149
05/31/2005 (8:05 am)
Hmmm, now THAT is weird... I generate the TQT file at 2, 512 and it works, but its a bit wonky, then I do the same jpg at 3,512 and it works perfectly!! :)
#150
05/31/2005 (9:06 am)
I can't see water anymore. it has just vanished. The waterbolcok is still there in the mis file but its not rendering anything. I updated my ATI video driver last night to 5.5(I have a Radeon 9800 Pro 128MB). That must be it. GRR!
#151
05/31/2005 (9:48 am)
Hey Michael,

One of the things on my shortlist is to put a real LOD calculation scheme in there. Right now I'm just hardcoding some values; will be sitting down early this week and getting the appropriate equations in, which will reduce blurriness significantly. Similarly for the seams, which seem to have, er, popped up again, if you'll excuse the pun. ;)

Are there any console errors for the water? Though to get a faster response you probably want to bring that up on a new thread... I'm not sure Brian is still tracking this thread closely after the hundredth odd post. :P
#152
05/31/2005 (11:34 am)
Everyone,

If 8192x8192 pixels are not enough for you (for us it was not) you can get around this "problem" in Terragen.
It's simply a matter of changing the lense of the camera to half of what it is (assuming your width and height is 1024), then rendering one 8192 texture for each 4th of the screen.

Then you combine these into one image totalling 16384 pixels. You can go even higher but it was not feasible for my team because it would take so long to render.

I'm working on making this a script for Terragen, I'll post it when I get it done. Might get a while considering it's my first script attempt in Terragen.
#153
05/31/2005 (11:42 am)
@Ben - Speaking of the seams, i see you're using a form of the "ribbons" method for crack filling (i also assume most of your work is inspired from Thatcher's chunked LOD paper). If you make the ribbons a uniform length and correctly calculate the UVs to match the connecting tile edge (more than a single stretch pixel row), you can be extremely aggressive with the LOD changes. The ribbons method is a really great way to hide those cracks.
#154
05/31/2005 (12:21 pm)
Hey! lets have a fun quiz!!

See who can guess what this terrain is!

www.zoombapup.com/airace/tse01.jpg
#155
05/31/2005 (12:43 pm)
@Stefan - 8192x8192 was definitely not enough for me either. I'll try this rendering techique. Of course a script would be fabulous. Are you aware of a graphics program that can deal with images 32768x32768 or larger? My version of Photoshop only allows upto 32000x32000.
#156
05/31/2005 (12:48 pm)
Sean,

I only tried as far as 16384x16384, but I know Photoshop has a maximum limit (most applications do) of 30 000. You can still create the image if you click "Proceed" when the dialog appears, but most image formats (except TIF, I believe) can't support as large dimensions anyway :/

I do not know of a program that can read higher dimensions, I'm afraid.
#157
05/31/2005 (12:56 pm)
@phil

What is Land number 1 for Air Ace?
#158
05/31/2005 (1:03 pm)
Phil, that looks brilliant! cough TSE terrian tutorial time? cough ;)
#159
05/31/2005 (1:11 pm)
As I thought Terragen wouldn't like my attemps at feeding it with a script. I gave it commands to move the camera 256 meters but it moved 192, so I'm clueless ^^

Anyway, it does work if you do it manually and the figures might be useful so I thought I'll post it anyway.
This is directly from the script, and should give you the basic idea.

//topleft
CamPos  256,768, 0
TarPos  256,768, 0
CamH          0
CamP          -90
CamB          0
FRend

//topright
CamPos  768,768, 0
TarPos  768,768, 0
CamH          0
CamP          -90
CamB          0
FRend

//bottomleft
CamPos  256,256, 0
TarPos  256,256, 0
CamH          0
CamP          -90
CamB          0
FRend

//bottomright
CamPos  768,256, 0
TarPos  768,256, 0
CamH          0
CamP          -90
CamB          0
FRend
#160
05/31/2005 (1:12 pm)
As far as doing the textures in Terragen..thats just a temporary tool. There are other things coming down the line to take care of that step for you :)