More Lighting

Read More
stone-shire-vertex-lighting-3

Improved the lighting model so that the ambient occlusion spreads to all blocks, giving the scene nice depth. Eventually, when I code in daylight/ night changing, you can see the difference it will make when changing the ambient color and lighting. The Nintendo Wii U should make the effects look nicer if I code this correctly. One day, I may even be able to add better shader effects, such as bloom and depth of field and not have it bog down my fps! Then I can truly make it look better than Minecraft.

Vertex Color Lighting

Read More
stone-shire-vertex-lighting-1

stone-shire-vertex-lighting-2
In the current build of Stone Shire that will be released for the Wii U, the world is lit by a directional light in Unity. However, today I present you a less expensive alternative, very similar to the one used in Minecraft and other voxel games. Instead of making use of dynamic lighting to create expensive shadows, instead what I am doing here is using vertex color lighting. The way this works is that the light data in the world is kept in a data structure. During vertex creation, vertex color is assigned based on the light of adjacent blocks. What this allows us is to imply shadow and light by baking it into the vertices. In addition, this technique also gives us fake ambient occlusion. These implementations so far has given the game a great performance boost. Of course, there’s more refinement needing to be done, such as propagating light outward and giving ambient occlusion to even blocks that are fully lit.