Spellcaster Studios

Make it happen…

Tweaking

Today I didn’t have much time to work on the game, so I basically just tweaked the ambient occlusion parameters and saw where they went…

First experiment was to see if better filtering would help the algorithm… Of course, the filtering improves the effect, but visually it doesn’t add anything, so I’ll keep the low-cost 4×4 box filter for now, instead of the 49 taps gaussian I experimented with…

Second experiment, I increased the sampling radius to ridiculous levels (1.5 meters, instead of the 0.5 I was using)…

The results were frankly better for this cartoonish, lo-fi visuals I have (before/after):

screen406

screen407

You can really tell on the shadow below the console near the player, so I’m keeping this change…

Also played around with using a “curve” to modify the AO, trying to make the darker areas to show up better (more dramatically, even if less realistic). I played around with a sigma curve, but I ended up using a square curve (x=x^2) instead, since the difference was almost negligible and the cost is way lower:

screen408

screen409

screen410

Much more dramatic shadow, which helps flesh out the scene…

Finally, I decided to use the ambient occlusion term to modulate the direct lighting… This is silly from a realism perspective, since ambient occlusion simulates how the ambient light, the lose photons in the world interact with surfaces, and direct light is all about the direct photons…

The end result ended up being much better than I expected… Not realistic, but a bit more impactful and more suitable to the game’s aesthetic:

screen411

I’ve even removed the “blob-shadow” from the sprites, and it doesn’t look bad with just the shadow from the ambient occlusion term…

In a planet, with the normal render and without the blob shadow:

screen412

Everything flat and you the player character even seems to be floating…

Now, with ambient occlusion with the current parameters:

screen413

Much better, everything seems more fleshed out… The player still doesn’t feel in the ground, I think, but still it looks much better, things just seem to have more volume…

So, even thought yesterday was disapointed with the ambient occlusion, today I’m much happier… It was a good option all in all… Now I need to implement this in OpenGL (should be just a matter of porting the shaders), and think if direct lighting shadows is a good use of my development time, or if I should just move on the other things, like decals or glows, the dozens of small bugs or the new UI work…

Now listening to “Lindsey Stirling” by “Lindsey Stirling”

Comment