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

Submitted by Lee Mazurek, posted on January 29, 2001

Image Description, by Lee Mazurek

Here is a picture of an old project I was working on. Its nothing spectacular today, but it was pretty good at the time. I decided that I should show it to the outside world even though it was obsolete before completion (finished about 97).

I was developing a technique to display heightmapped quads without a z-buffer. If optimized correctly, I could have made it just as fast as my ordinary textured polygon renderer.

The procedure goes something like this -

I divide the cube along its quadrants (sections sliced perpendicular to x and y axis). There are four different quadrants that parts of the cube could be in. This is important for the drawing order. The top left is draw from left to right top to down, etc.

I computed how often to sample the texture and heightmap based on the number of pixels for each side. It is sampled in a regular rectangular array( not scanlines, I tried those and it causes visual anomalies) This is a step that can save time. The polygon can be sampled every five pixels, and each of the resulting points can be connected. These can be filled with a single color. In this way, heightmap complexity can be traded for texture complexity using a consistent amount of time.

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.
Saad Faisal

January 29, 2001, 07:55 AM

Forgive my lack of knowledge but why do you want to have these quads without z-buffer. Anybody else put some light on this????

Hannu K.

January 29, 2001, 08:12 AM

z-buffer is slow


January 29, 2001, 08:40 AM

We're talking way back in '97 here, looking at it and the explanation it's probably meant as demo-code -> Software rendering -> Z-buffer == slower than no z-buffer.

Emmanuel ICART

January 29, 2001, 09:49 AM

I really like this idea of using heightfields as textures, this really reminds me the
displacement mapping of Lightwave, but in realtime !

One question though: is your algorithm limited to vertical or horizontal quads, or
can it also be applied onto a quad viewed from any angle ?



January 29, 2001, 12:07 PM

I spent quite a while thinking about that around that time, and your technique just makes sense.

Great work - and who say's it's obsolete? plenty of scope to use that even now.

good work.


January 29, 2001, 04:25 PM

Hello, thanks for the positive comments on my first IOTD. I saw the queue was empty and thats a sin...

>> ... why do you want to have these quads without z-buffer

As the other people mentioned, they used to be slow and the early hardware didn't have zbuffers. Another reason for the whole scheme is that with a heightmap, just one quad can have lots of detail. I thought height textures would be much better than bumpmaps.

>> One question though: is your algorithm limited to vertical or horizontal quads, or can it also be applied onto a quad viewed from any angle ?

I'm not sure if this is a question about dividing the cube into quadrants or viewing the cube. Yes, the cube can be viewed from any angle, although some sorting is needed to ensure correct drawing order in special cases. The cube is split into vertical and horizontal quads so the sections always overlap in the same direction, see picture

>> Great work - and who say's it's obsolete? plenty of scope to use that even now.
Yeah, but now its easy to use a brute force method on most systems. Still, at least mine is easy to edit in real time because its just a picture and the vertices for each point don't really exist.

Pierre Terdiman

January 29, 2001, 06:07 PM


Realtime displacement mapping can be done "easily" with displaced subdivision surfaces. Check the SIGGRAPH2000 paper by Hugues Hoppe, and Tom Forsyth's slides:

A poor example (mainly due to the lack of appropriate authoring tools) :

This is a simple sphere with a noise-map, subdivised and displaced each frame. Tom's demo from the GDC2000 was a lot more convincing (since it involved a real-world character model) but I don't think he released it to the public.

Anyway, the point is: it's there, it's now, and it's realtime. :)



January 30, 2001, 02:06 AM

You forget, this is software rendered democode from '97 - When 3d accelerators weren't as much a requirement of fun :) Using tesselated triangle maps at the time would've been signing your CPU to the devil at any decent sampling rate :)

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