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

Submitted by Jared Go, posted on August 08, 2000

Image Description, by Jared Go

These pictures show the features of my new terrain rendering engine, approximately one week into its creation (after many sleepless nights!). The engine uses the ROAM algorithm, which makes for a huge difference in quality over my earlier continuous-LOD quadtree engine.

Essentially, this game is intended to be a kind of "MMORPG" engine, as I designed the architecture to be all patch based, with each 128m x 128m patch of land about 5kb uncompressed at a 4m x 4m heightfield resolution. Essentially, this height data is the basis for procedural generation of all other terrain textures and details. For example, unique textures are synthesized during game time for each patch. A normal map is also generated from the height data, and thus this game makes heavy use of the D3DTOP_DOTPRODUCT3 operation for real time lighting over the entire terrain. The skydome is essentially the classic "interpolated colors" from horizon to zenith, with some additional tweakable parameters.

The water is done through the use of a stencil buffer, and the edges are smoothened through the use of another in-game generated texture - a simple alpha map which determines opacity. I think I will be adding some ripples for added realism too :). For some concrete numbers, the engine runs around 60-80 fps on a P3-500, Geforce2 GTS, 128MB memory.

Other than that, the engine is still missing trees and decorative items, and I am putting in detail textures just as I am writing this e-mail. For now, it is kind of difficult to judge the scale, but the mountain in the distance is about 600m away or so..

That's all for now, any comments/questions welcome....

Jared Go
Lead Programmer (of a 1 man team :) )

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.

August 08, 2000, 06:37 PM

Oh my god. After seeing those shots...I'm going to go rewrite my whole landscape engine. I'm not joking either.

Daniel Thoroughgood

August 08, 2000, 06:39 PM

I can understand your defence of RAOM Jared. I haven't put in any big hours on my ROAM engine yet and the engine design is modular so I could easily just put something else in instead, however I have spent a LOT of time researching various different approaches and would like to think ROAM is the best for my need, which seem very similar to yours.
However Phil definately has a point about features such as roads, flats etc. Also in my implentation it looks a little rough on extremely steep slopes, but I think I can solve that problem by tesselating more finely, I've only put a week or so into coding and thats only using my spare time about working a 40 hour week, so I'm hoping to solve my problems.
It's good to see so many people implementing the ROAM algorithm though, maybe we can work out all the pitfalls and how to solve them all between us.


August 08, 2000, 07:12 PM

Looking beautiful, GO THE ONE MAN TEAM!!!

One man teams rock!

"Blessed are the cheese makers..." - Life of Brian


August 08, 2000, 07:21 PM

>> P.S. anyone know a good program to capture avi/mpeg/mov of
>> the screen? I wanted to make a movie showing day/night
>> transition and was wondering which prog to use...
>> -Jared

Can't you just save each frame as a TGA and use one of the bazillion TGA2MPG or TGA2AVI utilities out there?

They're prob on simtel or winfiles.

Jared G.

August 08, 2000, 07:40 PM

Okay thanks, I'll check it out. :)


August 08, 2000, 07:55 PM

Nice looking indeed.

I take it the per-pixel lightning is specific to the GForce hardware?
Is the "D3DTOP_DOTPRODUCT3" something related/similar to Phong in any way?

Kallen McInerney

August 08, 2000, 08:27 PM

Jared what are you thoughts on the complexity of the ROAM alg vs say Quadtrees. Are the benefits in quality worth the extra complexitydev time? Also ROAM was written originally for flight simulation how well would it adapt to FPS? My thoughts are that its not suited to FPS since the quick rotations of the camera would be inefficient on the triangle caching (i.e. maintaining the merge queue).

I have a complete* ROAM implementation with geomorphs (split-only), incremental tri-stripping, dual-queue, true ROAM priority calc, incremental frustum clipping and deferred priority recomputation (I'm in the middle of this piece right now therefore the asterisk above). I've been working on it for about a year (It's a hobby and I get 6 figures working at my real job that's why so long) and I have to say it wasn't easy. I guess that's why the split-only ver on gamasutra is so popular.

So to open up the conversation:
1. Should a beginner start with ROAM?
2. For ROAM to be efficient should it be bound to a birds-eye viewmovement?
3. You say you're getting better quality. I assume this is because your using the true ROAM priority calc?
4. The procedural work you do on each patch is this done as it
crosses a distance threshold? Would this not freeze your app at times? As it's very expensive computing variance, normals, synthesizing textures etc in real time

Onceif I get the deferred pri re-comp working I'll post screenies.



August 08, 2000, 08:31 PM

First of all, Fabulous work! If 36 comments is not taken as "a job well done" by fellow programming peers, then let us just say it right now, Job Well Done!

I checked out your webpage. You've certainly worked on a variety of game-related technologies. Your space combat sim, and other terrain rendering (quadtree) programs were rather impressive. You probably have already had people ask if you plan to make any of your code available, but if not, are you? I fully understand probably not your latest baby, but perhaps some of your other demos.

Also, I am pleased to see you have done some work with the VB bindings for DirectX. In fact, I think you are the first person I have yet seen who has created anything substantive with those two.

Finally, I'm really curious to know more about you and your background. I did not find any links to such in your webpages. I bet I'm not the only one who is curious.

Great Work



August 08, 2000, 09:29 PM

P.S. anyone know a good program to capture avi/mpeg/mov of
>> the screen? I wanted to make a movie showing day/night
>> transition and was wondering which prog to use...

Use HyperSnap DX (,is the best program to capture everything ;-)

Jared G.

August 09, 2000, 09:26 AM

Thanks again everyone!
Your feedback is much appreciated.

DOT3 has nothing to do with phong (as far as I can tell?) and just calculates lighting the same way vertex lighting is calculated.

I myself prefer the split-only version, which I am using now because in a true fps dynamic camera rotation is essential, and quick "turns" from left to right will be less efficient with priority queues...

I am thinking of setting rebuild tolerances to handle these situations, i.e. if enough needs swapping, rebuild the tree properly from the top down....

I think ROAM if better in that it preserves the landscape features more accurately than continuous LOD, even when doing CLOD with geomorphing.... as it is already, without geomorphing, the pops are usually fairly small and hardly noticeable...

I don't know if I will end up making everything available but I'll keep you posted :)


Leigh McRae

August 09, 2000, 11:30 AM

What is the footprint? How much memory per vertex is spent. If your going to have a good view distance then IMHO the memory footprint is the prime worry. I use Rottgers quadtree as I think its as slim as it gets. I use 4bytes per vertex plus 32k for a triangulation matrix. Also with a regular grid I can use texture coord generation for yet more memory savings.

Also what is the computer your running this on and what is the view distance?

Leigh McRae

P.S. Not hacking just asking. I wouldn't ask if the engine didn't look so good...

Jared G.

August 10, 2000, 10:36 AM

See above in the original message for the computer specs...

View distance is about 1km only right now :) I haven't tested anything bigger yet so I don't know how it scales with view distance...


August 10, 2000, 01:12 PM

I must say, I've been interested into getting into graphics and game development most of my life. At this point, I have no clue where to even start what you just pulled off, let alone in one week. All I can say is... DAMN that's good.

P.S. Anyone know where I can find some GREAT DirectX/GL programming resources? Anything I've written is REALLY REALLY slow when it comes to rendering really simple things.

Hard work pays off later. Lazyness pays off now.


August 13, 2000, 01:46 AM

Transition between WATER and TERRAIN is done very well!!!

Vasile Marita

August 17, 2000, 06:22 AM

Very nice terrain,

I belive you can use Windows Media Encoder 7 to capture the screen in WMV format, you can download it from microsoft site, but the encoder use very powerful your CPU I don't know if there will remain power to render the scene in real mode. You can play WMV with Windows Media Player 7 of course.

Succes... :)


August 21, 2000, 09:18 AM

Night_Wulfe, check out

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