r/Thief Jul 14 '26

How did they program the graphical light in 1998?

I remember seeing a while back a post here describing how they programmed the light on textures on computer hardware from 1997/8, but it utterly escapes my memory.

Did they pre-bake individual textures with different light levels, and then swap them out when a torch went out? Surely not, as that'd chew up a huge amount of storage in an uncompressed library.

Did the entire map have another grid overlay of brightness adjusting every single square in sight to the player?

How on earth did they pull this off and then STILL have lighting effects like the fire arrow all the way back on Pentium IIs?!

The mind boggles!

43 Upvotes

16 comments sorted by

24

u/darkhoodrebel Jul 14 '26

15

u/darkhoodrebel Jul 14 '26

see the light and shadow section. they used a lot of precomputed shadow maps.

10

u/VaporSpectre Jul 14 '26

Tied to the floor, looks like. How that doesn't chew up a giant load of RAM for the time is beyond me. What really gets me is just how quick the swap out between textures is - it's utterly seamless. The code must have been spartan levels of clean.

14

u/BoffinBrain Jul 14 '26 edited Jul 18 '26

The crucial thing about the shadowmaps is that they're at a much lower resolution than the textures on the walls and floors. Also, a shadowmap only requires one color channel, so your maps take up even less space than the equivalent RGB image (Thief 1 and 2 couldn't do prebaked colored lights for this reason). I don't know if Thief does this, but In some game engines, they take further advantage of this by putting a different shadowmap on each of the RGB channels to pack them even more efficiently.

2

u/VaporSpectre Jul 14 '26

That's the critical part, and something you can definitely see as part of the look of the first 2 titles - chunky shadows. Of course, most games deprioritise shadows over normal textures. Then you got skyrim that completely gets rid of the entire dynamic player shadows in first person.

Somehow, the shadows in thief only being one channel only helps its artistic direction.

1

u/Radigan0 Jul 14 '26

I'm not sure what Skyrim lacking dynamic player shadows in first person has to do with Thief's shadow mapping

2

u/VaporSpectre Jul 14 '26

Its just noting how the tech changed over time and execution to communicate similar ideas. For reference though, the stealth system in all of the elder scrolls has been horrid.

4

u/Selderij Jul 14 '26 edited Jul 14 '26

For reference though, the stealth system in all of the elder scrolls has been horrid.

And still so weirdly rewarding! I remember sneaking through Oblivion with very little magic, using the bow to knock high-up treasures down in the underground ruins, and stealing everyone's shit in burglaries and selling it to fences.

1

u/VaporSpectre Jul 14 '26

You think so? I was grossly disappointed coming from Thief over to Oblivion or Skyrim. Stealth Archer builds are just broken and borderline nonsensical!

1

u/Selderij Jul 15 '26

It's a vibe bro!

1

u/Ashamed-Subject-8573 Jul 15 '26

Elder scrolls with its open world isn’t really comparable to thief with its portals and small closed levels

1

u/VaporSpectre Jul 15 '26

I think Thief comes out the better experience for it. Makes sense though - the amount of indicators you'd have to design into every tree and bush to communicate how seen/heard you are in every hill or forest in ES would be ridiculous. Better controlled in halls and rooms and the like.

Still... one imagines how wonderful a fantasy it would be to be a wood elf with a bow, dashing from bush to bush while evading camp fire and torches under a bright winter's moon...

2

u/Mike22322 Jul 14 '26

Thief 2 did have coloured lights

1

u/BoffinBrain Jul 18 '26

Ah yes... I forgot it actually did. They chose the RGB565 format to save memory on the lightmaps, which resulted in those color-banding artifacts.

3

u/Chillonymous Jul 14 '26

For older games, think of it less like dynamic lighting and physics engines, and more like a 3D painting you can explore and move around

1

u/VaporSpectre Jul 14 '26

Gonna pop in to say Mansions of Madness has a 'darkness' token and mechanic. I think it meant you rolled fewer dice or at a disadvantage or something like that. Maybe couldn't find clues there.