Friday, January 29, 2010

Screenshots 1-29





Friday, January 8, 2010

Nearly Free Shadows





Click the image for animation. Might not display correctly in Chrome.

Click the image for animation. Might not display correctly in Chrome.

I've been wanting levels shadows ever since I started adding blob shadows to all the objects, but didn't think of this solution until just now. This method uses vertex colors and vertex alpha so there's no texture used. I simply take the floor and cut out all the squares that are not touching any walls, and then reduce vertices. After that I select all the edge vertices and then just give them a 0% opacity and make them all gray in vertex color. In the editor I just apply a Mulitply material that all my other shadows use so they will all batch together requiring no extra draw calls.

This method probably wouldn't work so well if you weren't using grid built geometry but a lot of games do.