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

Submitted by Rui Ferreira, posted on July 24, 2000

Image Description, by Rui Ferreira

This is a screenshot showing my terrain rendering system's output.

Its core feature right now is level of detail. This makes the engine very scalable. It also brings its own set of problems, but primarily I'm following the LOD way because I wanted to have full dynamic terrain on the scene. I think it real adds to the whole environment when you have something like this going on. Its just not static boulders anymore, its level of detail from your viewpoint all the way to the horizon. Yes, I hate clipping fog. :]

What looks less good is the lack of detail closer to the viewer, but I hope to improve my dynamic texturing system, so it will look a lot better. If not, then this is nothing a simple detail texture can't handle too.

One funny thing though, is that this wonderful screenshot was taken on a top of the line Matrox G200 system. Of course that higher LOD levels are just too much for this good old card, but the results sure look promising.

-Rui Ferreira

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.
Oscar Rydberg

July 24, 2000, 04:09 AM

Hey, You don't have a website, or somewhere where we could see a wireframe model of Your scene?

Or please post it via mail, my e-mail is

Final words: Looks VERY nice! - and would look very neat with a sky system too!


July 24, 2000, 04:11 AM

what about using bezier patch to render the ground?? it's realy fast,
and using light-map it's great! and sorting them in a bsp allows
fast clipping...
tell me your opinion, I am seaching for a good algo to render the ground.



Rui Ferreira

July 24, 2000, 12:31 PM

I probably will have a site up in the near future, on a place not far far away.

As for using Bezier Patchs to render the ground; Yes, it seems a good concept and I could see a good implementation that gives nice results, but Bezier Patchs are a parametric representation of geometry, which is effective if you want things like rolling hills and smooth terrain variations. But anymore than that and the problems start to hit you.

For example, look at my far hill in the screenshot, that nice hillside represents a couple of points on a height grid map, something you can do almost easily in photoshop, or gimp.

Now try to imagine the total number of bezier control points needed to model such a structure... To imagine you don't need to try hard... but I'm sure your artist will.

Curves gives you smoothness, not exactly detail. And where did you saw a perfect curve in nature ? I would like to take a look at that!

Everyone is going crazy with parametrics for everything, like if it was the new wave or something, when you have sampling just around the corner. Hell. I'm still waiting for the "Chair Parametric Function" thingy to happen any day now! :]


ps: Oscar: What ? You don't like my nice glClear() blue ? :]


July 24, 2000, 02:01 PM

just one more thing about curved surface and elevation map : don't you think it's possible to mix them ?? that's to say using elevation map to add "noise" to the surface perfect curve... it will also allow to creat sharp such as the hill that can be seen in your screen shot.
I think it's a realy good idea, tell me your opinion about it.

thx for your attention


Mike Taylor

July 24, 2000, 02:21 PM

Actually the mixing is a very feasible thing to do. I use a Perlin noise displacement on top of the bezier curves to simulate bumpiness. This actually works quite well, and only fail s for isolated peaks and the such, which are rare in nature. I just use static objects which are not part of the geometry for those tough cases, since there are so few of them. The noising works well because rather than calculate a displacement map and store thousands of them, I just use an offset reference into a premade table of noise values, so I just make a big lump of noise and everyone shares. The noisy bumping is truned down or off the lower the LOD, so the overhead is minimized. I believe Alex Champandard did a very similar engine project recently.

Oh yeah, and the screen shot looks great. I would recommend just using noise for detail textures in the high LODs to raise the local quality. And I love that you aren't trying to hide a far clip plane. Real men render everything and let the LOD sort them out.

-Mike Taylor

Rui Ferreira

July 24, 2000, 02:30 PM


Heh. If you're reading my mind, you read it backwards :]

Actually I think its possible to do EXACTLY the opposite!

What I'm going to do is this:

Use the height map on a larger scale, I mean really larger, like what you see on the shot but with a full level size scale, and then when tessellating, just interpolate between the elevation points... And you can get smarter here, by using bicubic lerp and others, hell, use parametrics if you like. Also, and this is the magic touch; Add a noise function, this is the crucial part.

Then just let LOD level adjust to your machine.

Do you have a G200, well ok, accept the loss.

Do you have a GeForce.. ? Great! There you go. 60k polygons on screen!

What you gain with this is infinite detail on a balanced human designed level. Not just some crafted numbers you have thrown into the mix and then decided to call it "hills".

Do not underestimate what a good level designer can do with paint :]


Marco Al

July 24, 2000, 04:40 PM

Since you plan on having levels of a much larger scale than in the shot I am curious, how do you handle occlussion culling?

Richard Draxson

July 24, 2000, 07:40 PM

Since you dont use fog and do use LOD how do you eliminate the popping effect usually related to LOD terrain implementations?


July 24, 2000, 09:48 PM

"Since you dont use fog and do use LOD how do you eliminate the popping effect usually related to LOD terrain implementations?"

One traditional way is to use geo-morphing, interpolating the vertices between their positions in neighboring levels-of-detail.


Rui Ferreira

July 25, 2000, 06:59 AM

"Since you dont use fog and do use LOD how do you eliminate the popping effect usually related to LOD terrain implementations?"

Correct Max, Geo-Morphing is the only way you can get smooth transitions between non-continuous LOD levels.

Its not a difficult to grasp concept... but the implementation I leave as an exercise for the reader :]

"Since you plan on having levels of a much larger scale(...)"

In my case the "far clip plane" is in the point where the polygons near the horizon are so close to one unit or sub-pixel coordinates that it is in essence "The Horizon" and so you can't see beyond that -- note that you can't see that in my screnshot yet, yes, thats actually the end of the level :]

"(...)how do you handle occlussion culling?"

Well, that was the easy part, I just called Paul Nettle and he kindly gave me his source code, so I just dumped all the polys in and got the result back... :]

How DO you handle occlusion culling ? There is no magic involved here... you get a quadtree, but it can be any hierarchical space partition scheme (read TREE), and then you do a In/Out/Intersect test per node against the view frustum planes. This is it.

Also, if using the LOD approach I don't believe you can do it any other way, because if you have to do the tree descent to do the split pass, then you better go and use it to cull the nodes anyway. Why use a parallel structure to do this ?

Its the divide and conquer syndrome. Trees are arguably the most versatile data structures ever. And until you get some fundamental computing process redone, like I don't know, associative memory or something, then its likely you will end up with one in any major algorithm you need.


Marco Al

July 25, 2000, 10:36 AM

Unless you assume a very large curvature of the ground (giving you a very near horizon) aren't you going to get a lot of overdraw from hill's being behind eachother with low viewpoints?

Or is this meant for a RTS where you are always looking at the ground, and never along the horizon?


Rui Ferreira

July 25, 2000, 11:29 AM

"Or is this meant for a RTS where you are always looking at the ground, and never along the horizon?"




July 25, 2000, 11:43 AM

I have a good occlusion technique for landscape. I might have to write it up soon.

This thread contains 13 messages.
Hosting by Solid Eight Studios, maker of PhotoTangler Collage Maker.