AuthorTopic: Another Cel-Shad(ish) Shader For Pixel Art  (Read 2074 times)

Offline 0xDB

  • 0011
  • **
  • Posts: 873
  • Karma: +0/-0
  • Dennis inter-is.
    • dennisbusch_de
    • 0xdb
    • View Profile
    • 0xDB

Another Cel-Shad(ish) Shader For Pixel Art

on: April 05, 2016, 02:46:39 pm
Another Cel-Shad(ish) Shader For Pixel Art(...or as a general drawing aid to get light/shadow right)

Inspired by this talk about the Cel-Shaded look in GuiltyGearXrd(have not played it) which Beast shared in Slack, I dabbled in Blender a bit, aiming to reproduce some of it in completely free software but with Pixel Art in mind where the light/shadow isn't usually just on and off as in the cel shaded style, using a custom ramp of distinct colors to get a "smooth" transition between lit and unlit.

It is still based on the principle as described in that video which is to use a custom light source per object and determining the color for any point on a surface based on the angle between the surface normal and the angle of the light hitting it.

For the outlines, I also reproduced the "backface-culled-hull-normals flipped"-approach they mention in the video (not actually sure I'm doing that exactly as they do it but that's what the lower branch of the shader nodes is all about where the normals get rotated by 180 degrees). Also, I disabled the scaling of the hull as it seemed to produce artifacts and I didn't adjust that Monkey-Face model(comes with Blender) at all for this test except for applying some subdivision modifier to make it more curvy.

screenshots first (all info you need to reproduce the result in one shot):

the one unconnected node is for creating the lines from the hull (actually inside the objects own space and not around it):

animated 8 directions rotations

without outline, reduced to 64 colors

with outline, reduced to 64 colors

without the Gaussian Blur prior to downscaling in the post-processing options (so no AA), reduced to 12 colors:

While I believe this is still a few steps aways from producing results that look like that mysterious Pixel Art aesthetic we all love, I think this workflow can be a good and useful start for a first shading step, even if just to have a good light/shadow reference made from simplified models of the stuff one tries to pixel (for me anyway since cast shadows have always been 80% guesswork for me, so this will help getting light/shadow down with much increased accuracy).