Shaders : The dark side of lighting

IMHO, well crafted shaders address both how light reacts to the surface (diffuse and specular), as well as how the surface behaves absent of lighting (ambient).  Generally what happens when the ambient aspect is neglected, is that lighting flattens out to black.  

This can certainly be used as a great artistic effect, but more often than not it's unintentional.  As a result the spatial aspect of play spaces/environment becomes greatly diminished.  Players have to work harder to discern the play space, leading to visual fatigue.

WebGL Scratchpad : TriForce

Been checking out WebGL as part of my more recent Saturday Morning Project.  And as far as I can surmise, WebGL seems to be an interface that exposes GPU hardware buffers to the browser. And javascript in this context, is basically utilized to push floating-point values to vertex buffers, and shuttling them through the C(?) foreign-function interface into the GL library.

Here's the current code state of my fiddling  with a simple, bare bones WebGL context:

https://github.com/miketon/webGL

Here's a mindmap of my current understanding OpenGL functions and hardware registers:

http://www.mindomo.com/view.htm?m=fe720acc4ba34b7bb49c8524b427c768

There's a lot to love about the how graphics development on the web is trending.  It feels like a reset/re-invention of the industry ~10 years ago.

Unreal : Shader Development

Collaborating with the principle players from art and tech to deliver solutions are my favorite project highlights.  Here's a slice from my time working on Unreal Shader Development for an older Sony Online Project:

  • Initial Standard : The project's character clothing used the standard normal, specular, diffuse uber shader.  There was an interesting tweak to the specular to 'pop' more detail with front facing normals.  And that worked great on surfaces such as leather and velvet.  But not so much on on cloth and materials where specular was minimal.
  • Hue Shift Pivot : Adding a complementary hue shift to the tangent facing normals of the material colors on the character's cloth pumped up the palette.  I utilized calculations already being processed to add minimal perf cost to the process.
  • Art Direction : The art director liked the expanded palette, but felt my shaders defaults were too heavy handed with color usage.  I worked with him to dial down many of the settings(it's easier to rein a shader artist back to push him for more:).  The Lead Tech Artist also exposed a custom sample of the dominant scene light.  Changing the shader to sample the complementary color from scene lighting as opposed to local material colors.  The final look something more along the lines of the palette brilliantly achieved in Unchartered 2. 

Photoshop Tool : layersToStrip.jsx

I do a healthy amount of graphic debugging and profiling.  This includes taking screenshots, making A/B comparisons, and laying them out into a report format.  This script automates the layer->strip(or stack) aspect of that.  

Code is available at: https://github.com/miketon/Photoshop_Scripts/tree/master/source

Next up is updating this with a UI interface and generalizing it into a much friendlier tool.  Currently things like space offset between stacks are hardcoded.