Not logged in, Join Here! or Log In Below:  
News Articles Search    

Submitted by Benedict Walmisley, posted on January 30, 2001

Image Description, by Benedict Walmisley

This is a game I've been working on in my copious free time. Its a RTT with you controlling upto 8 tanks at the same time.

The engine renders around 2.5 MTris/sec (100 Fps) on a Geforce 2 MX. Things I've added recently that didnt make it into the pics are terrain scarring and procedural creation of small rocks (a la Sacrifice).

The landscape is a heightfield using ROAM. I'm considering replacing ROAM with a quadtree algorithm as that is more hardware TnL friendly.

Image of the Day Gallery


Message Center / Reader Comments: ( To Participate in the Discussion, Join the Community )
Archive Notice: This thread is old and no longer active. It is here for reference purposes. This thread was created on an older version of the flipcode forums, before the site closed in 2005. Please keep that in mind as you view this thread, as many of the topics and opinions may be outdated.
Hannu K.

January 30, 2001, 04:50 PM

me too, me too: WOW!!!

Just the thumbnail made by jaw drop! :)


January 30, 2001, 06:25 PM

This is you use bump-mapping for the detail, or is it just enough polys to kill my slow old non-GF computer?


January 30, 2001, 06:35 PM

Where's the author of this engine, are you still alive lots of people have questions here. From what I gather, the picture in the bottom left would be unplayable with anything lower than a GeForce 2. Am I not right? Either that or your looking at the side of his sky box and it's just a texture.

Jo Meder

January 30, 2001, 07:04 PM

As the developer of the Mac version of Terragen, and having looked at more Terragen images than I care to think of, that looks a lot like Terragen to me. Although it's a little hard to tell from the small images, the clouds look to have all the telltale TG signs. The surface map also has the characteristics of a TG surface including, in the top left image, the way the surface map tends to not be bump mapped properly in shadowed areas. The fogging in the bottom left one looks exactly like the haze/fogging in TG as well.

I would be very interested to know how this was done, especially as the Mac version of TG has a 3D Preview, also using a ROAM. About the only way to get the surface map out of TG for end users is to render an image from directly overhead, and I think that's pretty tricky do without distortion. You'd have to do it at a pretty massive size to get all the detail you can see in the surface map of the images above. We haven't published the surface map file format yet.

I hate to say it, but it seems to me, in the absence of a demo, that this is basically 4 renderings straight from TG with the crosshairs edited in. It looks too much like actual renderings. If I'm wrong, then I apologise profusely to Benedict, and I have to say I'm very impressed. I'd like ask him a few questions too.


Jo Meder

Scrambled Monkey

January 30, 2001, 07:20 PM

Yes I live in a hole... Where can I get a copy of Terragen? Is it free? :) Anyway, yeah the pics look absolutely incredible, though I'm inclined to believe it's prerendered because that bottom-left shot is just WAY too detailed.... Benedict, speeeeeak! :) The sun effect in the bottom-right looks sweet prerendered or not btw.


January 30, 2001, 07:35 PM

Looks pretty cool. The bottom two REALLY look like something from terragen. But the top two im not so sure about. The gound is closer to the near view plane which makes it look like something from a regualar(?) terrain rendering engine; it has that conventional blurry 3d accelerated look to it. If that is a real terrain engine, man im impressed. If this is just terragen, then well, you know. :)


m a d r i g a l

January 30, 2001, 07:44 PM

I must agree with all the people above. Well Done!!!

Could you shed some light on the techniques you used? For example, how is shadowing accomplished?

- Ron

David Frey

January 30, 2001, 07:59 PM

I agree it appears faked. Careful analysis of the crosshairs and line underneath them appears to show them to be different in size and placement with respect to each other, in each thumbnail.


January 30, 2001, 08:01 PM

You're half right. The textures (landscape and skybox) are Terragened. The texture is generated at a very high resolution(4096x4096) with the camera perched somewhere extremely high with an extremely high zoom. (Haze etc being turned off, otherwise the colours are washed out).

Aside from that it really does run as advertised.

Yes. I am still alive. Had to take a day away from the keyboard as my wife was sick. Oh well.

My main decision to go with prerendered clouds was basically - will dynamic clouds make any difference to the playability? Answer: No. I did have some nice looking dynamic clouds that looked very nice - but only worked correctly on Voodoo's. G400's failed and looked dreadful.

The textures in these screenshots vary from 512x512 upward. At the moment I use 2048x2048 textures for the landscape (precompressed using texture compression). I do use detail textures as well.

I'm not using a beefy computer. (Well 533 Celeron, 128Mb RAM). The main speedup is not retriangulating the terrain every frame. (Why bother? - the angle of view doesnt alter that quickly and tanks dont move quickly so I spread the cost over a number of frames). (Also putting the vertex data into dynamic vertex buffers does help).

I dont know how it will run on a V3. The textures should be automagically resized down (boo) as the voodoos are restricted as to the 256x256 at maximum size. The detail texture does make this less of a problem.

I'm humming and hawwing about releasing a demo as I fear that I've still got a fair amount of work to do on compatability. I'm petrified that DX8 wont work on V3's. (I got my fingers burned a few years back with one gfx card that shaded everything grey - the projection matrix wasnt setup correctly so the fogging was messed up.)

Developments since:
Since the pics were taken I've got a landscape scarring system in place - works well but does give me crashes. Bummer. I've also got procedurally defined rocks scattered about. Collision detection is still a slight problem as is the ye olde floating turret problem.

There are full size images of a couple of the pics at:

If any poor sod wishes to volunteer as a tester mail me (with your system details) and I'll see if I can get a distributable up and running. No promises, might be a big download, WILL require DX8.




January 30, 2001, 08:24 PM

Um... those crosshairs look like they indicate things such as position or height or something, just like in flight simulators. Otherwise there's not much point to having those horizontal lines, hm? The crosshairs could easily move around as active indicators of stuff.

IMO, these screenshots don't show anything remarkably impressive, just nice-looking textures with a bit of added glitz for the haze and such. Nothing really that remarkable, just very nice-looking.

Robert Hayes

January 30, 2001, 08:48 PM

At the moment I use prerendered clouds also. However, I scroll them on a plane; so there is some movement. You might want to try that.


January 30, 2001, 08:52 PM

I've uploaded some additional pics at:

Crosshairs also indicate weapon type. You're dead right though - it doesnt matter how pretty an image is - its the gameplay that counts and that is far, far harder to get right. I've tried about 4 different control configurations and some were a nightmare but looked good on paper.

Crosshairs etc are in variable position essentially because the program at the moment runs in a window - so I've cropped the MS Windows rubbish off by hand which gives you the variability. Not a hoax, honest.

If anyone who wants to verify this and is in the SomersetBristol area of England, UK they're free to take a look. Just mail me first so I can tidy up. :-)



January 30, 2001, 11:42 PM

"I've tried about 4 different control configurations and some were a nightmare but looked good on paper."

How about coming up with a 1/2 decent config, but allowing the user to specify their own configuration.


January 31, 2001, 12:25 AM

Pretty amazing pictures I must say

As I understand you got a big shadow map, a big height map and a big texture map for the whole landscape right? Well this sure looks good! But since most of the people are still limited in term of video mem and main RAM have you considered using small textures (i.e: 256x256)
and combining them in term of the height of the vertex (and maybe add some random values)?

This would probably slow down your engine though but your demo won't take 100mb anymore :)

still your engine looks very promising! keep up the good work!



January 31, 2001, 01:14 AM

I achieved similar results with the java 3d api......yeah right:)


January 31, 2001, 02:34 AM

Very impressive :)


January 31, 2001, 05:43 AM


Yeah I did consider that. In fact I did use to do something along those lines. (With precalculated per vertex lighting). The results were nice but when the graphics cards supporting texture compression started appearing compressing looney sizes of textures became possible. I do test the program with low res landscape textures (256x256 and 512x512) and the results are not bad. The detail texture does help here a lot.

The main landscape and texture(s) only takes up 2307Kb on disc. I figured the tradeoff was worthwhile.



January 31, 2001, 08:05 AM

Ahh very nice work, I do have some questions though.

You said you used one big 2048x2048 texture, however have you preblended the shadows into that or is it 'just' a grayscale shadowmap? At the moment I use the latter and it works just great...

And I wonder, how do you use the detail texture (around the camera?)? I have come up with some ways to do it but I would love to hear how some other people done it...

Last question, do you use a normal heightmap array or do you do some other magic with your heighg values?

Thanks and greetings,



January 31, 2001, 09:22 AM

Heightmap is preblended into the texturemap. I am tinkering with dynamically generating the shadows (because this would give me cheap object shadows as well) but that would require two passes drawing the landscape. Plus I'm having hellish problems with that area - crashes after 30 secs - rip it out and it works fine.

At the moment I'm using 2 texture stages (texture + detail map) - this can be drawn on most graphics cards in a single pass whereas texture + shadows + detail map would take two passes.

The detail map applies to the entire landscape.

I'm trying not to create the best landscape engine ever, just get it good enough so that I can start putting gameplay on top. With any kind of self build project you cant spend forever on one area - you have to have the landscape, skyboxes, object drawing, targetting, particle effects, explosion textures not to mention creating the object meshes, textures, typefaces, logos. Then you've got the big two. AI and gameplay. The second is tweak tweak tweak and the first is a massive problem - unless you cheat and completely avoid the popular solutions. :-)

Its bit like painting the Forth bridge - by the time you have one section 'done' the hardware gets radically upgraded and you can redo an entire section with better capacity. This is revision 3 of the landscape renderer.

At this point I ought to thank Richard Heeley for all the hard work hes put into doing the meshes/fonts/object textures and listening to my witterings.


Alex J. Champandard

January 31, 2001, 09:55 AM


Can you do me a favour and take a wireframe shot? The quality of the texture map makes it look really cool, but i want to see how much details the polies add.

This will confirm Phil's theory ;) It's all about texturing!



February 01, 2001, 05:03 AM

"Heightmap is preblended into the texturemap."

Is this a typo and do you mean that the lightmap is blended onto the texturemap? Or have I been drinking too little coffee? :-)

"The detail map applies to the entire landscape."

So how would you define a detail map if I might ask? Because to my humble knowledge it was a texturemap used in the near surroudings of the camera to blend onto the much lower resolution 'big' landscape texture that was being used all over the place.



February 01, 2001, 06:01 AM

> crashes after 30 secs - rip it out and it works fine.

especially tha last part of that sentence gives me the feeling you're not using a debugger.. (hint)


February 01, 2001, 02:49 PM

LE: Oh I'm using a debugger all right. The relevant code has been fired through Lint as well. The main problem is that the machine locks solid when this is active - so I cant even see the debug libraries spew output.

Running on the reference rasteriser for 12 hours produces no problems.

Every D3D call return values are checked. Pointers and parameters are verified using ASSERT.

My intention is to remove the offending code from the program for a couple of weeks then look at it again. With some luck I'll be able to spot the problem faster than hammering at it like I have been.

Prophylon: Sorry. You're correct. My typo.

The way the detail map is used is to give interest to the nearby surroundings. The Vertex buffer has two (2) sets of UV coordinates - one for the main landscape texture (going from 0->1) and one for the detail texture (going from 0 to around 20) giving 20 odd repetitions of the detail texture. The detail texture is superinposed on the base texture so that both are visible at the same time. On a Geforce card this can be drawn in a single pass.

You can see this on the bottom right picture and the top left picture. Look for very small 'dust' or 'soot' on the landscape.

This might give you a better look at it.

As far as I know this might be the tactic used by Ground Control - use a big texture for the landscape and another texture to improve looks.

I'll probally put an option into the setup/options part so that a user can disable the detail texture if nessesary. This would increase speed on old hardware.



February 01, 2001, 03:50 PM

LE: Ha! Got it fixed. Under certain circumstances the texture wasnt released. Time for a burn in test while cooking something.


February 02, 2001, 03:42 PM

Just to get this clear, the sort of debris on the surface is the detail map? It does add extra detail and looks very nice. What kind of mag filter are you using for the main texture btw? (linear?)

At the moment I am using two pair of tex coords too, however one for the detail texture (only one at the moment) and one for the lightmap. It looks nice, however I can not use more then one kind of detail texture. Else I need to render using multiple passes, which is not really that bad though on the newer cards.

The advantage of the approach you are using is that you can preblend different types of textures in that one big texture you are using. However if you are using nearly endless pieces of land this is nearly impossible, because then you have blend (and calc shadow) in realtime.

Oh well, hopefully I will find a nice solution.

BTW: What resolution and color depth are you running this in to get the results you mentioned?


February 04, 2001, 06:37 PM

WOW - So that's what the real world looks like. I must have been in the Matrix too long.


February 06, 2001, 10:14 AM

Prophylon: Yup. I'm using linear filtering.

Resolution 640x480x16 at 100fps gives 2.6Mtris/sec with detail texture turned on. On 'default' landscape detail settings I get 250fps or so.
At 1024x768x16 I get 90fps with 1.6 Mtris/sec.
At 640x480x32 - 100fps with 2.5Mtris/sec.

(I get all these figures by twiddling the detail level of the landscape so I get maximum throughput - high fps!=high throughput).


This thread contains 57 messages.
First Previous ( To view more messages, select a page: 0 1 ... out of 1) Next Last
Hosting by Solid Eight Studios, maker of PhotoTangler Collage Maker.