Selasa, 09 April 2013

Shaders and cutaway


I've been working on the function to cut off mountain tops to a specified level so the player can see their tunnels and rooms under the surface. For this I've written a shader to clip off level geometry above a certain point. The function works but will need some additions to look right.
Also in this shot: check out the roughness of the water in the sun, this is from the noisy surface and the lighting. It changes as the day goes on.
The black outlines around the cutaway are a happy byproduct of the edge detection
I'm considering generating a mesh to "cap" the tops of the cutaway so you will only see tunnels and rooms that intersect the cut, not everything below the point of the cut. It may make it easier to see the cut but seeing your network of underground tunnels and rooms at different levels would be fun.
templates-office.com Voxel Dwarf Game

Outlines

I've added some outlines to add borders to the edges of mountains which is an interesting effect.

Outlined mountain edges make it easier to make out the shape of the different mountains in the distance

When turned up the effect creates a cell shading effect outlining the corners of blocks which is a surprisingly useful effect to help see the edges of blocks. It does give the game a much more cartoony look though.
Fake cell shading
templates-office.com Voxel Dwarf Game