The Difference Engine "r95" renderer

Description

In 1995, Michael Schöne and I started working on a DOOM-style renderer, loosely based on Chris Laurel's "wt", or, more precisely, his final "libwt" release in 1994. This was a spare time project, and had been abandoned in autumn 1995, on the reasoning that it made no sense to continue working on a renderer with DOOM-style restrictions on scene geometry.

Preview

There's an outdated preview as well, simply a few screenshots.

Technical Details

The main difference to the various "wt" instantiations and its offspring was that we decided to support DOOM WAD files, most notably its BSP lookup. In addition, we decided to implement the renderer and all associated routines as a set of C++ libraries.

In a nutshell, the project had the following features:

Internally, we used different data structures that matched the WAD lookups as well as our own attempted generalizations. The differences to "wt" included

The scanline renderer was based on "wt", but optimized, i.e. the list handling was reworked a lot, and transparent textures were drawn in a separate back-to-front pass using a stack structure, not on a per column basis which might be beneficial in terms of second level cache hits. The BSP renderer used bounding boxes to clip subtrees entirely out or inside the field of view.

We never got around to a production release, and tried a couple of variations. Most notably we did not suceed in incorporating textured floors and ceilings. There is a simple workaround: vertical slices drawn as flat surfaces, optionally using z-dependend depth cueing. This has been used in Chris Laurel's final "wt" version published in Learning Windows Programming Using Virtual Reality by Christopher Watkins and Russell J. Berube.

Another workaround is used by IBM's WebView3D: floors and ceilings are texture mapped along vertical slices. This slows down the renderer, as no constant z depth loop is possible, but simplifies the rendering loop a lot. I tried a stack-like approach with the spanning scnaline renderer but did not suceed. We finally figured out how to map floors and ceilings in horizontal slices using a BSP, but never implemented it.

Another problem is the handling of multi-patch textures in the rendering loop, which creates a lot of overhead in terms of setup code, and redraw of pixels. This could have changed trivially (instantiating single patch textures from multi patch textures applying a copy constructor), but we never actually did.

In summary, while the r95 worked pretty well at times, it showed all weaknesses of a beginner's attempt. The sources do not compile with gcc-2.7.2 and optimization, and the current revision lacks a few features (for example, sky texturing is broken). I will rework the library as a reference library and finally finish the generalized resource file specification and support prior to release.

Documents

I removed nearly all of the stuff that had been available in 1995. Right now there's only a small README. The other documents will be replaced by more current versions sooner or later.

Binaries

Some outdated binaries for Linux486 and SUN Solaris 2.4 are available. This is more than a year old. More recent versions had limited looking down, used BSP lookups, but lacked support for sky texturing, and we never finished a working demo with floor/ceiling texturing.
The Linux486 demo has been compiled using GNU GCC 2.6.2, XFree86 3.1 X11R6 including MIT SHM extension. I haven't checked how it behaves in different environments.
Due to some problems with our Solaris 2.4 installation at that time, the Sun Solaris demo has been compiled using GNU GCC 2.6.3, X11R5 without MIT SHM extension.

Sources

There are no sources available at the moment, but this will change as soon as I did some cleaning up. Be patient, though, a public release will not happen until end of april.. may.. june.. sigh.


home qdev qdev dread rsc qdev doom license web
home dEr95 r3D dread netrsc quake doom legal web
Author: B., email to bk@gamers.org, with public PGP key
Copyright (©) 1995-1998 by author. All rights reserved.
Source: $Id: index.html,v 1.4 1996/05/16 22:30:14 b1 Exp $