Realtime Editor Lighting

When I fix the problem with WP uploading GIFs, I can post this sort of thing directly. In the meantime, here’s the room editor which now updates light sources and obstruction in realtime as the room structure changes:

This week is mostly earmarked for editor work, so I should have some editor features to show pretty soon.

Atmosphere

Most of today was spent doing fixes for the editor to handle the updated room definition and pattern format. But that doesn’t make for an interesting screenshot (yet), so here’s a test level with some light sources:

atmosphereIt’s starting to look a bit cooler. Need a few more light sources and better shadow behavior.

Lighting

Though Soulcaster 3 has been using the Escape Goat 2 rendering code for a while, today was the first day for me to enable the lighting features. It uses pretty much the same techniques as before, though we’ll need to account for the different surface facing directions given this new camera angle. With EG2, it was easy because you could only ever see one face of a cube, from the side. In SC3, with its early Final Fantasy camera perspective, you can always see the top and one side of a cube. We’ll figure out a solution to lighting objects at some point (maybe with some tasteful normal maps). In the meantime it actually looks pretty cool:

lighting1Everything is set pretty extreme to start. The light cast by the summoner will likely not cause shadowing on the floor, because as cool as this looks in motion, it actually makes me kind of motion sick to have it constantly casting rays around. And Randy would kill me if I tried using red #F00 as a light hue.

The fake ambient occlusion is back as well, which involves stamping a blurred rectangle or circle subtractively to the light map at obstacle positions. This will be cleaned up to be a lot more subtle for stuff like the pillars.

lighting2Because we composite the scene with two basic layers, each with its own lightmap, we can have elevated objects cast light on the walls below them. Here we have the molotov cocktail casting some light down on the wall, but the light coming from the summoner doesn’t affect the tops of the walls. This goes a long way to making the scene look 3D.