Monday, 8 April 2013

Toon shading Part 1- Cell shading

 Overview

When I say the words "Toon shading, what comes to mind?"
A cartoon / anime series? A game based off this series? If you though of the images below you are correct!


Toon shading is a 2 step process which involves 2 thing Cell shading, and Edge detection

This week I'll focus on how to do Cell Shading, the 1st part.

Cel shading vs normal shading

Normally with "shading" on the object in the scene, the dark shadow on the object will linearly(gradually) increase as the object. As shown below in the graph, as the object's distance from the light decreases on the object.



However with cell shading we want this type of graph.


This will give us "blocks" of shading on the objects due to the fact its broken up or a "piece wise function. To help with this process we would sample from the picture below to give the cel shading its effect.


And- voila, we are done our with our shader, getting the effect to the image below.

For a continuation of toon shading and edge detection, click here. Sorry I couldn't get any deeper into the code, however time is currently of the essence, hopefully you still get the gist of it.

No comments:

Post a Comment