Wednesday, November 17, 2010

Skylight shadow and stuff.

Been working on the ambient/sky shadowing. Since the sky shadowing is block based, I had to blur it to avoid artefacts (currently a simple averaging filter). It is quite fuzzy, but better than anticipated. Also by adding another filter tap directly above a block, this provided a nice and simple way to simulate light "bleeding" into columns of blocks that lie in shadow, so the shadows are softened in the downward direction (provided that they neighbor some bright ones). I think I'm approaching a look that I like... still lots of tweaking remains.

For OpenGL 3 capable cards, I added support for EXT_texture_arrays. This helps to solve the texture atlas issue, so now there is full mipmapping and anisotropic filtering in there with zero tiling problems. Just wish it was available on older hw too.

1) Using a favorite 32x32 mid-res texture pack (John Smith Textures v4), this shot shows some light patterns on the floor projected by the ceiling window. This is before the blurring was added, so if you walked up close you'd be annoyed by the vertex interpolation.

2) Same set of textures, and still point filtered in this one.

3) My coplayers modified the train station while I was coding, as this new TCP dump shows, ithas even more corners, ledges and interesting light patterns to test with now. This also shows the skylight bleeding in from the cross shaped "window", and some of the new 128 x 128 texture set. Torches are missing, that's why it's quite dark.


Next up either torch lighting or some player controls. I want to jump around in there, and not have to use the official client to connect me anymore.
Eventually I will port over my sky system from the old game. That'll be quite dramatic.

1 comment: