From: Bernd Kreimeier <Bernd.Kreimeier@NeRo.Uni-Bonn.DE>
Date: Mon, 22 Apr 1996 21:08:07 +0200 (MET DST)
Message-Id: <199604221908.VAA06180@colossus.nero.uni-bonn.de>
To: quake-dev@gamers.org
Subject: Re: To seam or not to seam...
>> I confirm. Once again, the wording of the specs (lightnormalindex)
>> probably is just confusing. Someone has a better wording?
Index refering to a predefined vertex normal sounds about right. I
second that. Btw., the UQS should clearly state what is found in the
MDL, and what is found in the EXE.
>I new thing started to bug me. Michael Abrash said (on CGDC) that
> they use z-buffer for monsters.
You will have in the order of 10e1 polygons within view from the
static environment. There are some 10e2 triangles in an
MDL object. Each single object is more complex than an
entire DOOM level. A wall polygon occupies up to 10e3 average (up
to full view). Any triangle is likely to occupy a dozen pixels.
Quoting from the CGDC transparencies:
"Polygon models are meshes of 100-400 polygons, with a single
front/back skin stretched over them. We couldn't clip them to the
world BSP, because it would be too expensive, so we just drew each
triangle in the nearest leaf it had a vertex in, which caused
occasional errors. Errors sorting polygons within models. Errors
sorting between models in same leaf (and also with other BSP models
and sprites)."
Conclusion: trying several alternatives, they settled for a z-buffer.
Thus the rendering should look like this:
They use the BSP front-to-back order for all environment polygons.
Abrash says that, using an edge-sorted rasterizer, overdraw is
zero. Thus a simple z-fill (write-only during BSP traversal) is
not too expensive. Note that you calculate z for perspective correct
texture mapping anyway for each pixel. I read a claim of 15% costs
over the drawing.
In a second pass, all possibly visible objects are rendered using
the z-buffer (read-than-write), which is supposed to be less costly
than sorting. I do not know wether BSP objects are treated the same
like the MDL. I guess billboards (sprites) should better be.
Actually, it surprised me a lot the first time I heard about it.
Talk about preconceptions. The more you think about it, the more
advantages you see. The z-buffered stuff could be anything: separate
polygons, intersecting, even a depth map could be used. Triangles
could intersect the walls (remember the lava/water).
It will be interesting to see how this benefits from upcoming
hardware z-buffering, too.
In any case, I believe that Mike Abrash is right: it is the mixture
of sophisticated spatial subdivision (BSP) and simple, straight
processing of the visible triangles that works best.
b.