Hacker News new | past | comments | ask | show | jobs | submit login
3D Software Rendering Technology of 1998's Thief: The Dark Project (2011) (nothings.org)
126 points by wooosh on April 10, 2022 | hide | past | favorite | 36 comments



>This result could be less tight; for example, if you had a long corridor with many side rooms, and that long corridor was a single cell, then in Quake it would always try to render all the side rooms, whereas Thief would only try to render the entry cell to each of the side rooms (since those cells would always be adjacent to the corridor and visible), but Thief could cull the rooms themselves if they weren't currently visible.

Big if. You had screwed up if you left such a setup as one long vis chunk. Level designers would place vis boundaries strategically along a corridor to control this behavior. It was a bit of an art form but not exactly hidden knowledge, even the levels that shipped with quake SW had this kind of tuning built in.

Weird that at no point in this article is the engine overall referred to as what I and presumably most level/mod designers referred to it as - 'The Dark Engine'. Still, she's a classic. Tuned beautifully for the sneak/rpg gameplay of Thief and System Shock. Not at all suitable for the high speed multiplayer FPS gameplay of Quake. A comparison between the two is always interesting to see.


That's quite interesting. I wonder why visual culling on PC appears to have been much more primitive than culling on, say, the Nintendo 64. Some games there seem to dynamically cull every single polygon not in sight. For example, Banjo Kazooie: https://m.youtube.com/watch?v=se6y5we3p2I


That's just backface and/or frustum culling, likely being done by the N64's equivalent of the hardware transform unit or the rasterizer. Completely separate matter from visibility culling which is usually done at a very coarse level - objects, rooms, etc. Not individual triangles. It's true that game consoles typically had better culling capability of this sort built in, since without it games wouldn't have acceptable performance.

When a scene contains a truckload of triangles, culling them all one at a time like that does not win you as much performance as you might think. You always needed to do additional things on top of it.


The Quake engine BSP format precompiled visibility and lighting elements into the level file data. So at runtime you had a precomputed 'potentially visible set' (PVS) for any position a player could be within the playable area, and rendering was then performed based on that set only. Walking that tree was stunningly fast compared to runtime occlusion culling techniques. Likewise lighting info was pre-baked into the level as a layer of texture, and computed based on point-in-space light objects raycast against the PVS calculated in the previous step. All of this meant you were processing on less textures and polygons for any given position during the game, and that provided a speed edge at a time when absolute reduction in overdraw was key to performance.

This let you do stuff like (and I'm working from memory here) have a 15k triangle budget from which you could easily develop a 300k triangle environment, as long as you were VIS-ing well enough that a player never saw more than 5% of the environment from any common position. Non-visible areas were essentially completely free, because they weren't even considered at runtime. This was a significant edge over culling approaches such as the one you mentioned, at a time when that kind of edge mattered a lot.

That said, IMO this approach was tuned for extracting maximum performance from the hardware available at the time (~Mid 1996- late 98). It showed it's age heavily from Quake 3 onward and was quickly overtaken by engines adopting somewhat different approaches (e.g. Unreal) quite quickly.


because you cut out relevant lighting from off-screen / occluded sources, it only works with prebaked lighting.


I don't think Banjo Kazooie is a good comparison because the camera is entirely on a track by intention so that they could fully pre-process visibility.


What? You can rotate the camera freely in Banjo-Kazooie.


Ya i think OP may be mixing up crash bandicoot and banjo kazooie


Sorry, that is my mistake.


My wife and I were just telling my 13 year old about this game. It was incredibly immersive for the time, running on my Voodoo graphics card and soundblaster 3D audio card :) I would be sneaking around and my wife would try to talk to me (in real life) and I would shush her because I didn't want to be heard :) She also played the game, and both of us would commonly bonk our head on the monitor (old CRT style) as we were trying to look around a corner in the game :D

Good times - great game!


This was exactly me and my girlfriend at the time (still good friends today). We were obsessed with the game, we both beat it several times then explored the world of custom missions. I think our mutual favorite was "Hush Hush, Sweet Harlot".

Years after we broke up we remained friends, and one day she called me asking for help getting it to run on her then-new Windows Vista PC. I never could get it to work correctly so I cobbled together a working PIII era machine for her with Windows 2000 installed, and period correct GPU, and she was in sneaking heaven!

These days the GOG version plays perfectly well on modern hardware and OSes, no need for hacks or period hardware anymore.


The trick he mentions he used where he issues a floating-point divide for perspective correction followed by integer instructions allegedly killed Cyrix. Carmack figured out for Quake that the original Intel Pentium could execute a floating point divide in parallel with integer instructions and exploited it. Without that trick Quake produced a disappointing frame rate. The Cyrix 686 CPU was generally faster than the Pentium but the FPU didn't work like that which meant it couldn't play Quake very well.


I would love for there to be a good Thief sequel. Dishonored is great but it isn't Thief.


Try The Dark Mod.


Agreed, it even runs on OpenBSD! It's as close as we'll ever get to a spiritual successor to the original two games. Deadly Shadows (the third game) was terrible compared to the first two, and we don't speak of the 2014 reboot.


There may be indie projects upcoming on Steam that will fill this quota. I'd be surprised if it doesn't happen eventually.


The 90s were the decade of "you have GOT to see this" graphics. Thief was the first game I recall having "you have GOT to hear this" sound.


Thief is one one of my all-time-favs. Surprised to hear it being notable for its tech; for me, it was all about the sneaking and creatively avoiding full-on confrontation.

About ten years or so ago, Drake: Uncharted (plus its sequels) on the kid's PS3 was recommended to me as a worthy game to play. But I found it boring, having to face a fistfight and primitive shooting only after 5 mins into the game, so I didn't bother.


This was genuinely immersive and terrifying as a 13-14 year old. I think this game seeded my interest in graphics technology. Delightful to read about it now.


Garret’s buddies at HandmadeCon gathered a group of devs from different games who all wrote some of the first software rasterization 3D games. The general theme was “We had no idea what we were doing. There were no references!”

https://youtube.com/watch?v=xn76r0JxqNM


The visuals were excellent, but the gameplay and game design were imo what made the game special.

I played it new. I really felt the sense of tension and attention to detail of being stealthy, and the corresponding consequences of failing to be stealthy.


Thief was a brilliant game for the era. The rendering of shadows etc was very well done and so also I believe it used 3D positional audio better than the contemporary games


We're the shadows actually rendered in real time or were they prerendered and baked into the textures along with the environment lighting? Genuinely curious.

I could be wrong but, AFAIK, Doom 3 was the first game with real time shadows and dinamic lighting and every game before that employed various tricks that simulated those instead.


Doom 3 wasn’t necessarily the first game with fully-dynamic lighting/shadowing, but it was among the first to use what Carmack referred to as “fully-unified lighting”, in that no pre-baked lighting was used. There were some projection light hacks here and there, but generally speaking all lighting in Doom 3 was dynamic.

The original Quake used a mix of pre-baked lightmaps and dynamic lights, just like the original Thief; Quake 2 (the OpenGL renderer, anyway) added character shadows that’d react to dynamic lights, so in some cases Quake 2 actually got pretty close to the goalpost.


First in shadow volume rendering, maybe? Did anything else make use of this technique at the time?


There were several other games that used volumetric shadows before Doom 3, AFAIK Neverwinter Nights and Morrowind are two. Even id's own Quake 3 (enabled by a console command) used it though it was a bit buggy.


Blade AKA Severance AKA Blade of Darkness was the first engine I ever saw doing "real" realtime lighting and shadows (they started in 1995 and by 1996 they had pretty strong level geometry dynamic shadows). The game itself came out in early 2001. There's even a re-release from late last year!


The article doesn't make it completely clear but it infers the shadows were not dynamic because it affected the gameplay in that the player needed some certainty about where stealth was effective, and the level designs hinged on that.

Great game. Thief and Descent were pretty challenging compared to quake.


>Thief and Descent were pretty challenging compared to quake.

Well, after John Romero left id software in an disgruntled way during the development of Quake, id became creatively bankrupt, and their games were just tech demos for John Carmack's latest cutting edge 3D engine, wrapped in a half-baked "whatever, this is gonna sell" storyline and gameplay.


Quake actually got really hard in the last chapters. Those annoying purple blobs were murder


https://nothings.org/gamedev/thief_rendering.html#lighting

"The core technique for rendering texture mapped polygons with decent precomputed shadows is very similar (identical?) to Quake. Thief used light mapping and a surface cache to store the lit surfaces. I refer you to Mike Abrash's articles."

Mike Abrash is a cool guy, not as well known as Carmack but had as big, if not bigger, impact on the gaming world. Got to sit in a panel with him and Carmack once at GDC to talk about networking stuff (I wasn't in the actual panel, but it was a tiny room with about 20 people plus the panelist)


Thief 3's lighting and shadows were mostly dynamic, but I don't think that was true for 1 & 2. The lighting tech in Thief 3 was fairly similar to what Doom 3 did - per pixel lighting with stencil shadows, etc.


First game to use ECS (or an ECS-like system), too, if I recall correctly. DromEd is one of the strangest programs I've used.


Screenshots don't hold a candle to actually using something, but I'm honestly not too dissuaded to disagree with you: https://thief.fandom.com/wiki/DromEd?file=Dromed.png

Seems to be downloadable at https://www.ttlg.com/forums/showthread.php?t=141708 (and have a bit of a niche following)

Googling the name also turns up a comprehensive 4-part YouTube video series from 2012-2013 showcasing the UI and how to build a level: https://youtu.be/C0dHgEaUCEQ (20:02), https://youtu.be/A1wm0RZXlh0 (41:50), https://youtu.be/UlVJHCcaUAo (27:45), https://youtu.be/yyq5Z2ioM-0 (11:31)


The story goes that the editor wasn't initially made public because they thought it would be too difficult to use. After some persistent requests, they let a few people have the editor as a trial. Even without any documentation they were able to make new maps from scratch, which convinced Looking Glass. The tools were then included with every release of the games afterwards.


The Dark Engine source has been leaked and can be found in couple of GH repositories. The code really is an amalgamation of all kinds of past projects and architectures, without a really strong architectural design, I’m not surprised it would result in “strange” programs.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: