Saturday, December 18, 2010

Different lighting model

Looking at the screenshots from the previous post, I decided I don't like how light and shadows curl around edges. I'm going to switch from calculating the light map per voxel to one that does it per face. This is going to make it six times bigger, but so be it.

There are some advantages that will make it worth it. I can add Lambert's cosine law, which will improve realism in general, but especially things such as sunlight coming through a window will be much prettier. And it's going to speed up the radiosity pass (because oblique faces can be ignored, something you can't do with per-voxel light).

Small drawback: can't write it back to a Minecraft world anymore, or at least not without a little extra work and losing some detail. Oh well.

No comments:

Post a Comment