Upcoming Events
Unite 2010
11/10 - 11/12 @ Montréal, Canada

GDC China
12/5 - 12/7 @ Shanghai, China

Asia Game Show 2010
12/24 - 12/27  

GDC 2011
2/28 - 3/4 @ San Francisco, CA

More events...
Quick Stats
66 people currently visiting GDNet.
2406 articles in the reference section.

Help us fight cancer!
Join SETI Team GDNet!
Link to us Events 4 Gamers
Intel sponsors gamedev.net search:

Contents
 Introduction
 Advanced Topics
 Conclusion

 Printable version
 Discuss this article
 in the forums


Conclusion

That's all! The most extensive article on cel-shading, available only on GameDev.net (just advertising the site in case this article ever gets archived on another site). If you have any problems with the article, just post to the thread attached to this article, because after my last attempt at an article I was flooded with e-mails, and I want my inbox free of questions like "What's the dot product?" and "Can you send me some source code?".

I hope the information in this article has been beneficial.

Special Thanks:
Dave (MyopicRhino) for putting up this article.
ShiningKnightDX for proving my stupidity on several occasions ;-).
Kenshin (AKA Akura) for proof-reading this and pointing out some stupid errors.
Phoenix for pointing out more stupid errors (why do I feel a pattern forming here?).

Sami "MENTAL" Hamlaoui

Further Reading

I've gathered a couple of links that might be useful to you (i.e. they include source code). One of them is for DirectX 8 and uses Vertex Shaders, and the other is for OpenGL and uses the "proper" technique (the DX version tends to look a bit odd with certain objects). Please note that none of these include information about cel-shading textures (I had to figure that one out myself).

These are the two links that I found the most useful (the OpenGL being more useful than the other). There are probably more references out there (if there isn't then I am very surprised), but these two should help you out dramatically.

Appendix A Multiple Light Sources

For those of you who have way to many CPU cycles to spare, this is a good method of using them up :-). If you look back to when we calculate the Sharp Lighting value for the vertex, you will see that it has a minimum value of 0 and a maximum value of 1. Now, if we have another light lighting that vertex, you compare the existing lighting value with the newly created one. If the new light value is higher, then replace the existing one with that. If it's darker, then ignore it. That's just another stupidly simple trick that will make your scene look nicer (despite running at 1fps).

Edited by Kevin Hawkins (kevin@gamedev.net)