Presentation is loading. Please wait.

Presentation is loading. Please wait.

Cel shading By jared brock.

Similar presentations


Presentation on theme: "Cel shading By jared brock."— Presentation transcript:

1 Cel shading By jared brock

2 Overview Project Description What I must implement
What I would like to implement Technique: Cel-Shading What is cel-shading? Requirements for Cel-shading Generate Lighting Map Calculate Light intensity Draw the outline Demo Questions References

3 Project Description Render a model in 3D
Implement multiple material shaders Use the shaders on the different pieces of the model Include cel-shading

4 Project description What I must do
Implement multiple material shaders (steel, wood, leather, and plastic) Implement cel-shading Be able to use shaders on specific pieces of the model Be able to switch between multiple shaders What I would like to do Include multiple models Add a GUI for switching between shaders

5 Cel Shading What is cel-shading? - A type of shading that is used to mimic the style of a comic book or a cartoon

6 Requirements for cel shading
Generate a Lighting Map Calculate Light Intensity Draw Outlines

7 Generating a Lighting Map
A lighting map is a 1d grayscale texture Basically a strip of 16 colors Can modify the values to create different effects Texture is used as a lookup table

8 Calculating Light intensity
N dot L Value is used as an index into the lookup table This works because N dot L returns the cosine of the angle between them Negative values are mapped to 0

9 Drawing the outline A cel shaded model is not truly cel shaded if the outline is not drawn

10 Drawing the outline Here are two possible methods for drawing the outline Use 2D Image Processing Render scene to screen sized color texture Render depth and world space surface normal to textures Apply an edge-detection filter to depth and normal textures to generate edge texture Combine edge texture with color texture Use Built-in OpenGL functions Render in wireframe mode Only draw back facing polygons Change the line width Render again normally

11 Demo

12 Questions?

13 references [1] S. Hamlaoui, “Cel-Shading,” and-theory/cel-shading-r1438 (current Jul ) [2] K.  Khanyants, “Cel-Shading Explained Visually,” (current 2002) [3] J. Mahsman, “Fragment Shaders: Toon Shading,” Pictures came from


Download ppt "Cel shading By jared brock."

Similar presentations


Ads by Google