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

Submitted by Joel Duggan, posted on June 28, 2001

Image Description, by Joel Duggan

I just wanted to show off some of the stuff I've been working on lately. All these programs use The Tycho Engine that I made. It's mostly a terrain engine, but you can use it for anything. It's features are :
  • Uses DirecttX8 for graphics and input
  • Quadtree LOD Terrain using Rottger's algorithm
  • Terrain texture is based on slope, has baked in lighting and soft shadows, and a detail texture
  • Loads .3ds models
  • Supports water and trees
  • And other standard stuffl like particles and fonts
  • The upper left shot shows off the terrain renderer. The heightmap is 1024x1024. You can see the shadows and detail textures in it. Pretty simple The upper right shot shows a Quake 2 .bsp renderer I just made. It uses the visiblity data to do full PVS culling. I can't quite get it as fast as I'd like though. If anyone has written one that has a good speed then please email me. The bottom left shot is a quick little demo I made. As you can see it's an alien reflecting the room around it. Pretty funky. The bottom right shot is a wierd program that splits the channels of an image and shows you it in 3d. For each pixel it creates 3 boxes, one red, one green, and one blue, all on top of each other. Their alpha values are equal to the amount of that color in the pixel. Then if you look at it from above, the 3 boxes combine to form the correct color. But if you look at it from a different angle, it doesn't look like anything. The image is halfway between being able to see it clearly. Guess what image that is.

    I plan on getting a website up soon, so people can download this crap. Plus if anyone is interested in making a game, I'm looking for a big project right now. Please I would like any feedback your have for me. Thanks.

    Joel Duggan, Triality

    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.
    henry ludemann

    June 28, 2001, 11:20 AM

    Nice pictures... How did you generate the landscape in the top left? I see there is a overhang so it isn't a heightmap...


    June 28, 2001, 11:25 AM

    Damn that looks sweet! And it's not just a terrain engine. On that upper left one is that spike thing sticking out of the ground leaning over another piece of terrain?! Did you just throw a model in there or what?

    Keep up the good work!


    June 28, 2001, 11:40 AM

    Tout ca c'est très jolie mais tu as une démo ou du source code !!!!!

    Have you got demo or source code !!!


    June 28, 2001, 11:45 AM

    Hi ... my bet for the image is the 'radioctive texture' that came with the DirectX SDK :)

    I really like the terrain and would also like to know how you did that 'spiky' thing (can't be in the quadtree).

    Like your shots, since they show some diversity,


    Jason Colman

    June 28, 2001, 11:58 AM

    After scrunching my eyes up to the point of near-blindness, I guess it's that yellow Pokemon thing.. :-)


    June 28, 2001, 12:14 PM

    i really like the image-cube-thingy, and i guess it's the windows logo ...

    anyway, i'm also amazed by your spiky thing in the terrain ... :)


    June 28, 2001, 12:31 PM

    I think the bottom-right is a radioactive thing, maybe the wall texture in the alien image?

    nice terrain!


    June 28, 2001, 12:50 PM

    Since everyone seems so impressed with the spiky thing, may I just offer the explanation that perhaps the mesh generated using the heightmap is slightly tweaked after generation? Or that it's just distortion due to a high FOV?


    Still, nice pics Joel!


    June 28, 2001, 12:54 PM

    Look at the sky, it's bending in the same direction as the spikey thingie :-)

    I'll go for the FOV-distortion :)


    June 28, 2001, 01:02 PM

    I am impressed by the reflective alien...what method did you use to do that?


    June 28, 2001, 01:03 PM

    OK, I have to agree ... it probably *is* the FOV. But, if it weren't the case, then that would be one cool "spikey thing".

    - MK42


    June 28, 2001, 01:14 PM

    My first guess for the reflective alien was cubic envymapping, but now I guess it's just a normal envymap.

    I assume the alien is located in a square room, which means the camera is in the opposite corner as the alien.
    In the reflection though, it seems as if the camera is located in front of a single wall instead of in a corner.


    June 28, 2001, 01:15 PM

    I don't know about you guys, but that color box thingie looks like a happy face to me. :)

    Jeff Quesnelle

    June 28, 2001, 01:17 PM

    Pretty nice stuff. What kind of FPS are you getting with the terrain render?


    June 28, 2001, 01:21 PM

    I am very anxious to try out all of these demos...if you e-mail me the files, I can host them for you.

    Mike Henry


    June 28, 2001, 01:23 PM

    It *still* is a cool spikey thing.

    Derek Simkowiak

    June 28, 2001, 01:31 PM

    Re: Speeding up the Quake2 BSP rendering:

    1. Only decompress the RLE PVS data if you've entered a new leaf.

    2. Cull nodes on their bounding boxes (node->mins and node->maxs generate the aabb for that node. Do 3D frustum culling on that bounding box as a test whether or not to recurse. This is the only node test I know of other than checking the PVS--anyone else know of other node tests?)

    3. If you have entities working, use the visibility of "Areas" (separated by portals) to also determine whether or not to render a particular leaf. If the 'areaportal' for a particular leaf is not visible from the current leaf, then don't render that leaf. The reason you need entities working is because the 'door' entities are what set the visibility state for a particular areaportal.

    4. Also use the aabb frustum cull test on leaves.

    5. The last thing is the PVS algorithm I found in the QuakeWorld source: As you decompress the PVS data for leafs, set a "is_visible"-type flag on that leaf's parent nodes, recursively going up the tree until you hit the root. The genius part: if the node you're processing is already set to "is_visible", then early out of that because you know that it (and hence, all its parents) are already flagged as visible. Since visible leafs tend to be clustered near one-another in the tree, you'll be able to use this early-out most of the time. And, you'll now have the "is_visible" flag for nodes (based on the PVS data) that give you yet another early out as you recurse down the nodes. (Tip: I like to use the dnode_t struct exactly as it appears in qbsp.h, so I have a separate array for holding my "is_visible" flags. I use the node index as the index to the is_visible array.)

    These are the tests I'm using. I'm just putting in physics and profiling so I don't have any numbers yet.... sorry. But it "seems" fast :)

    --Derek Simkowiak

    The Wolf

    June 28, 2001, 01:32 PM

    Keepin busy much ??
    Nice work!! quick question, do you have a link to the Rottger Algorithm that you're using in your LOD terrain?


    June 28, 2001, 02:32 PM

    Even better, check out this site. It has Rottger algorithm and every thing else you might want on lod.


    June 28, 2001, 02:38 PM

    Uhhh, I forgot to post the link.



    The Wolf

    June 28, 2001, 03:20 PM

    Thanks a lot!



    June 28, 2001, 04:06 PM

    Thanks for all your replies. Just to clear up, that spike is not bent, its just fov distortion. I just use a heightmap for the terrain. The image is the radioactive texture. The alien is just simply sphere mapped with a picture of one side of the room. I get an average of 30 fps with the terrain renderer, but it varies a lot with the size of the terrain and other factors. You can download the Rottger paper here, I will try to get the demos up as soon as possible on


    June 28, 2001, 07:01 PM

    Just i can say, try to apply radiosity to your baking.
    ( I don't understand what it gets if you show quake 2 level on your game engine. Why don't you try your own?)


    June 28, 2001, 07:27 PM

    He probably used Q2 maps because:

    -Quake2 levels are available all over the place
    -Quake2 levels are well documented
    -Using them allows you to focus less on tools and the content path (which really only tools biznitches enjoy :))

    Navreet Gill

    June 28, 2001, 09:02 PM


    how do you do the shadows in the terrain renderer?

    Can someone help me on the terrain texturing question?? I've had it since few months, just can't get over this point:

    After you figure out how much rock/snow/grass influence on a vertex, where do you go from there?


    June 28, 2001, 09:31 PM

    just draw a basetexture and alphablend the rest over it.
    ie. if you want 50% grass, 50% sand, draw a 100%grass-poly and draw (using either multipass or multitexture) sandover it with an alphablendfactor of 0.5


    June 29, 2001, 12:27 AM

    Definitely nice shots. I have been looking into doing terrain rendering, purely to get away from using QuakeII stuff, and I don't have to be good at 3D design to make the data. :-) As for the Quake II stuff, in my opinion, decompress all the PVS data first, then you don't have to worry about it during. It might take up a little more memory, but considering that it's still not too much, and most newer systems have a little memory to spare, so you have to decide speed over memory. I like your picture seperator too, unique idea. :-)

    Hiro Protagonist

    June 29, 2001, 01:47 PM

    I am pretty sure that the overhang is not really an overhang, but a fisheye warping that is taking place because his FOV is too high. (greater than 120 degrees probably).

    Nick Van Tassell

    June 29, 2001, 01:58 PM

    Quad tree are great but check out the ROAM based system at:

    Very awesome discussion as well as sample code.

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