Hacker News new | ask | show | jobs
by robert_tweed 970 days ago
Alone in the Dark was notable at the time for using Gouraud shading [1]. You can see the effect on some of the polygons here:

https://www.youtube.com/watch?v=zsGaVrMr9N8&t=480s

The reason I remember this is that it inspired me to spend ages implementing Gouraud shading in my own graphics library (written in assembly language), only to discover that flat polygons look better most of the time.

[1] https://en.wikipedia.org/wiki/Gouraud_shading

2 comments

Unless you mean pre-rendered backgrounds, there was no Gouraud shading in that game. It does seem to have a little texturing on some parts of the model, most likely ramp lighting and pretty expensive as they could not texture the whole character. E.g. here you can see each triangle in the model in whole untextured flat-shaded glory :) https://www.mobygames.com/game/325/alone-in-the-dark/screens... except the textured collar lit by recomputing the palette colors.
Some items in the inventory, such as the knife, and the book appear to have some kind of "metal shading", which was typically implemented as a modified Gouraud shader. It could all be texture mapping of course, but somehow I doubt that.

And what about these fancy ballroom dresses? https://www.mobygames.com/game/325/alone-in-the-dark/screens...

We can only do two things now: contact the original author, or reverse engineer the binaries! Does anyone know if there is a DOS emulator that allows you to visualize and override RAM access easily?

Yeah, it had different algorithm to render inventory and also could add/remove some objects to the background (those figures in dresses do not move if I recall, only toggle in and out). The inventory was not free camera with only controls to zoom, so you could do a lot of tricks with pre-computed shading. The general purpose rendering of the animated character and items they held was flat shading though.
Could it be that Little Big Adventure had this shading? I remember it looking rather “plastic” just like the examples you shared.
Note that both Little Big Adventure (also called Twinsen's Adventure) and Alone in the Dark were created by the same person, Frédérick Raynal!

There is a very nice presentation [1] in which Raynal shows some of the old tools that were used to create Alone in the Dark. I'm still not entirely sure what kind of rendering is being used, but the editor sure looks nice (in 640x350 EGA). Perhaps there is some more background information on LBA out there as well?

[1] https://www.youtube.com/watch?v=c2lgEyNaop4

> Perhaps there is some more background information on LBA out there as well?

Better than that. LBA 1 and 2 engine has been opensourced some time ago.

https://github.com/2point21/lba1-classic

And indeed in the glorious mess of an ASM renderer with ASCII art for section headers, there's a reference to gouraud shading: https://github.com/2point21/lba1-classic/blob/f73f457317f0b7...