Working with Light

Ambient Occlusion

One of the basic improvements we’ve been adding to our map designs is a lighting technique called ambient occlusion that shades surfaces based on how exposed they are to ambient light. Of course, we aren’t calculating actual ambient occlusion in the way it’s applied in 3D computer graphics, just approximating and faking it in our hand-drawn artwork. (The only ray-tracing in World’s End is used in determining where ranged attacks can target. I can go deeper into how this works if anyone is interested.)

We’d previously applied some darkening on walls near ceilings and floors in a more primitive emulation of ambient occlusion, but now we’re putting more effort into shading in general, and the effect greatly enhances the sense of space in our maps.

Here is the mostly completed version of the thieves’ warehouse, inner chamber with and without ambient occlusion applied:

(If anyone is interested in learning more about lighting, I recommend The Physics of Light and Rendering by John Carmack. He explains ambient occlusion at 1:07.)

Blend Modes

Another feature I’ve added to the new engine to improve the illusion of lighting involves the color math used when artwork overlaps called blend modes.

Using the “add” blend mode on light sources causes them to brighten the artwork they overlap, and I figured it would be an easy feature to add to the game since it’s just a single setting. All I would have to do was move the flames and glowing portions out of our lamps into their own layers and apply the blend mode.

But what about lamp obstacles? Now I’d made real work for myself because obstacles weren’t implemented with the ability to have more than one layer of artwork. This is an example of how changes can snowball into more work than anticipated, and the reason why I (mostly) cut myself off from making any more improvements until the rest of the necessary features of the engine are complete.

Here’s Ivan holding a normal blend mode lamp, and one with “add” mode applied:

Neither of us are trained artists, so this might have been an underwhelming update for the more artistically inclined among you.

Thanks again, everyone, and welcome to our new and returning patrons!

— Crack

World's End Development Blog

2020.Oct.16

New posts are available early to subscribers on Patreon.
Thank you for your support!