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

Submitted by David Galeano, posted on April 12, 2001

Image Description, by David Galeano

The terrain size is 16 kilometers by 16 kilometers and the far plane is located 5 kilometers away of the camera. This map has more than 100,000 plants.

The terrain is a simple quadtree rendered using static LOD. The plants close to the camera are pre-lighted models with 2 LOD, when they are far away they are draw as impostors depending of the angle with the camera.

The water is simulated using 2 quads with the texture tiling and moving in opposite directions. The water reflection is rendered to a texture than later is blended with the water applying a vertical blur.

The Sky is formed by a semi-sphere with a gradient of color from white to blue than is blended with a clouds texture that fades to the fog color in the distance.

For more screenshots: (Mirror)

Also, there is a demo available for downloading where you can see more effects that those I have described: (Mirror)

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.

April 12, 2001, 03:21 PM


Acedia Neurozin

April 12, 2001, 03:23 PM

I got the second!

Neil Witcomb

April 12, 2001, 03:26 PM

Nice image.

Just wondering if you can explain the occlusion culling method you use. I have looked at your webpage but found no information about the engine.


April 12, 2001, 03:56 PM

Looks pretty sweet.

How did you generate the Terrain that was used in this? Can you modified the heights and such within your editor as you travel around, or is it all pregenerated or edited another way?

What type of rig are you running this against to get the performance shown in the screen shots?

Just when you thought another terrain IOTD couldn't get any better, I tend to be impressed once again. I can't wait until I have the talent to put something like this together. Never seem to have the time to develop, or motivation, when I get home from work though. =)

Nice job.


April 12, 2001, 03:58 PM

looks great, demo worked on w2k GF2MX. the only problems i saw was when your in the water and look up, sometimes the water surface would clip wrong and you could see the sky. also the mouse lag is terrible, making me sick when navigating, i have had this same problem in my terrian demos, does anyone know what causes this? maybe a gradual correlation from mouse to player movement?



April 12, 2001, 04:59 PM

Demo worked sweet on my geforce2. Didn't work at all on my voodoo3. I assume that this is T&L supported cards only?


April 12, 2001, 05:31 PM


Sebastian Sylvan

April 12, 2001, 05:34 PM

How do you texture it? Do you just have one big texture or what?


April 12, 2001, 05:37 PM

Could be a texture issue. Lots of demos these days use textures bigger than 256x256 without checking the maximum texture size available for the card... So older 3dfx cards will fail, sometimes just showing blank white textures, sometimes crashing spectacularly.


April 12, 2001, 05:45 PM

Nice job, David! I too am interested in hearing about your occlusion culling scheme.

Sebastian: I believe he is texturing with a big texture plus a detail texture. If you turn off the detail, you'll see that the color still changes faster than the geometry (I think), implying multitexturing instead of per-vertex shading.

This is what I did in my terrain engine. I enjoyed it when I was running the demo and, forgetting that it was someone else's engine, pushed "d" to turn off the detail textures... and it worked. I guess programmers aren't very original, and we all make the same debugging code :)

Ran great on my GeForce I/PII at 2M polys/sec. Mouse was indeed wierd.



April 12, 2001, 06:06 PM

I am interested in learning more about how you create the terrain reflection in the water. You mentioned that you render it to a texture and then use some sort of post-processing and then you apply the this texture to the water. How do you render to a texture map - from what viewpoint, etc.? What is the resolution of the map?

Haven't tried the demo yet, but the screenshots look awesome!



April 12, 2001, 06:31 PM

What font is that you're using for the debug output? I know, stupid question, but it's a really killer font.



April 12, 2001, 06:39 PM

So nice I want to just dive right in.

Great job!


April 12, 2001, 06:52 PM

Very nice indeed.
Some problems on my AMD 800 128Mb ram /Geforce2MX 32 Mb ram,

I only got between 25/30 fps.., what machine did you use to get those 200+ fps ?
The mouse looks weird in the movement.,
but very nice indeed

keep it up,



April 12, 2001, 07:32 PM

Pretty cool, however I had some texture problems. To see a screenshot of what was happening go to There seems to be some missing textures or something going on. I have a radeon and am running windows 2000. I'd have to say I really like that motion blur. Its the first time I have seen it on my computer without it being too overdone. Maybe just tame it down a tiny bit more and it would look great.


April 12, 2001, 08:46 PM


great work - and very high framerates on my P2-450 / TNT2 !
but i'm aksing myself how you took the screenshots ? - if it's in your code, couldn't you put it online somewhere ? - my directx7 screenshot routine doesn't work with dx8 ;(



April 12, 2001, 09:59 PM

Semisphere gradients. I always loved that technique. I used to do something similar, but with two semispheres. The slightly smaller one would be on the inside, and it would be textures (incl. alpha) and contain graphics of clouds. Then I would rotate the semisphere. It would give a surreal effect... not good if you're attempting to mirror reality or something mundane like that. :)

Tim Wojtaszek

April 12, 2001, 10:32 PM

Not that I know, but it looks like Serpentine. I have a somewhat large example of it on my old site here

to download Serpentine, click me


April 12, 2001, 10:38 PM

that's f'ing amazing! it looks real! nice job!!

Wolfgang Engel

April 13, 2001, 04:14 AM

Really nice. Great work.
It doesn't work on my ATI Radeon/Win2000 driver 3102. The textures are wrong.
Any chance to see the source ?


April 13, 2001, 04:44 AM

That looks faboulous. Can you implement any data for the map, or is it generated at run time? If you want to make a demo that takes up less space, then runtime generated might be a nice way to go.
I have attacked this problem from the other side, (hehe) and have made a texture generator that uses scripts that are 30 - 60 bytes long to descibe the way in which to build up textures as a list of filtering operations like photoshop. I wish you would/could release the source, as i have been waiting for an engine capable of visualising my terrain, and I think this one is great.


April 13, 2001, 07:35 AM

I downloaded the demo, and it ran and looked great, but there was a few bugs. Before I list them, I just want to say that I still think your engine is really great!

The bugs:

Some of the triangles of the watersurface dissapeared.

When underwater, the surface doesn't look transparent, but you still render the landscape outside of the water.

You have non-overlapping shadows, which is great, but the edges were still overlapping, sugesting a single bit 'overlapping buffer', but your seem to be using 8 bit destenation alpha to achive this. Could'nt the extra bits bits be used to create smoother overlapping edges?

When switching to 16 bit colordept, all the placeholder billboards turned white. Also, he shadows starting overlapping, but that was as expected, since you don't have destenation alpha any longer.

When turning around with the mouse, your engine ignores slow mouse movement.

This was on a GeForce 2 GTS 64MB, 900Mhz Athlon, 384MB ram and PS2 mouse. Oh, and sorry about any spelling mistakes/gramatical errors in this post... :)


April 13, 2001, 07:53 AM

I forgot some sorry:

Sometimes when sidestepping, the movement became really jerky, even though the framerate istill good.

Not really bugs but:

With a resolution of 1600x1200, the engine still ran great, but the refletions in the water looked really blocky

The trees have far too big collision boxes

The soldiers are only displayed on the minimap, when they are inside my field of view, but they are still displayed on that map when they are behind a hill or something and I can't see them (Maybe you have a radar, but it only scans in the direction you are looking :)

The soldiers don't have collision detection, but you allready knew that :)

But, as I said, I still love your engine, it's great!


April 13, 2001, 09:47 AM

I am guessing (but not positive) that you are running in 16-bit color, which would run slowely with Alpha blending. Make sure you run it in a 32-bit color depth (I can't look at his code, so I'm just assuming this could be the problem).

By the way, keep up the good work. Looks awesome so far.


Phil Carlisle

April 13, 2001, 09:53 AM

Reminds me of that Codemasters game.. Operation Flashpoint.. had a very similar feel to it.

Nice shots.



April 13, 2001, 10:31 AM

Damn it, now that looks cool!

I too have a radeon, and I too have the texture bugs :(
My Setup:

Win98 First Edition
Radeon 32 DDR (newest drivers)
AMD Athlon 800
128 MB RAM


April 13, 2001, 11:25 AM

Very pretty! The water is especially nice. This is a true work of art.


April 13, 2001, 12:44 PM

Very impressive.

25-75fps on
384 Mb RAM
Riva TNT2 Ultra 32Mb
Windows Me

That's an extremely fast and good looking engine you got, very good performance ( bad mouse performance, though ). Looking forward to seeing this develop, should be able to create some nice games with this engine, Maybe a Ground Control type game?

Keep it up!

David Galeano

April 13, 2001, 01:36 PM

About the occlusion culling:

I’ve tried many different algorithms, but the only one I like is the “Image based occlusion culling”:
· Choose good occludes: in my engine the closest grounds.
· Render the occludes in white color to a black color surface.
· Project the bounding boxes of the rest of the ground patches over the surface.
· If any of the pixels inside the projected bounding boxes is black, the corresponding patch is visible, and other is not.

The problem with this algorithm is that you cannot lock the surface immediately after the render, because you will force a hardware stall. For example, I render the map and the impostors before locking the surface.

In my demo you can see the occlusion map if you set to 1 the option “Show Oclussion Map” in the “render.ini” file.

David Galeano

April 13, 2001, 01:43 PM

The terrain is just a grayscale image, you can find it in the directory “Data”, and it’s the file “OUT.PGM”. A friend, Alberto Gordillo, did it for me, just by hand.

My computer is a Pentium III 667 with a GeForce 2 GTS.


This thread contains 53 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.