Saturday, June 28, 2014

Fun with Pixel Lighting!

So, I've already jumped right into development of my new game!  Now I am REALLY excited about it.  I have a lot in mind for the look and feel of the environment, as well as the aesthetic.  Today I finally got around to playing with SHADERS IN UNITY!  I don't know why I didn't look into them before.  I love shaders.  I'm so excited.  The possibilities are endless.

Without giving too much away as to the theme, here is a sample of what I've been working on today with an item you may be familiar with:

PillLighting

So it's not perfect - there's some weird lighting stuff going on, and I definitely have some work to do on the shaping of the object.  Using this tutorial as a starting point, I first did a bit of finagling to update the code and get it to run. I also had to do some research to find out why their sample was rendering sprite alpha 0 to black instead of transparency. Once I configured a bare-bones version of their script through the tutorial, I added back in some features they didn't talk about, such as making black in the diffuse image always render to black - keeping your 'outlines'!  (I will post my completed shader for this once I'm done!)

Here's a look at the Diffuse Color, Normal, and Bump image layers used to compute the lighting:
PillLighting
(I'd hapily welcome advice from my 3D friends on this... as I'm a little removed from 3D!)

I hope you are as excited as I am.  My next game may run terribly and play horribly, but at least it's gonna look great! :D

 - chahn

No comments :

Post a Comment