Toon Shading

Referrence:

Sobel Edge Detect:
http://homepages.inf.ed.ac.uk/rbf/HIPR2/sobel.htm
http://blog.csdn.net/tianhai110/article/details/5663756【Chinese】

Toon Shading:
1. http://zh.wikipedia.org/wiki/%E5%8D%A1%E9%80%9A%E6%B8%B2%E6%9F%93【Chinese】
2. http://www.tjgalda.com/EducationAndTrain/Free%20Tutorials/645629E6-14F7-4D19-B1F2-9B101E84364E.html
3. http://www-scf.usc.edu/~sanampud/Gz.htm
4. http://blogs.aerys.in/jeanmarc-leroux/2012/01/23/single-pass-cel-shading/【 The most important thing is in "The Outline" section】


Toon Shading  process:Toon color + Ink Line

Toon-color: 
Modify based on phong shading: remove ambient color and specular color, and change the NL value in diffuse equation (e.g.: NL = NL < 0.3 ? 0.3f : (NL < 0.7 ? 0.6f : 0.9f))

Whole process: (All for ink line except Toon())

I:【Based on Toon Shading 1】
1. Draw wire model with Z = ZMAX
2. Draw typical wire model for all triangle in the back side.
3. Toon()


II:【Own thought】
1. Draw wire model with black color for every triangle, and set the Z value a little larger than original value for all line. (e.g.: Z' = Z*1.0025)
2. Toon()



III:【based on Toon Shading 3】【Current Process】
1. Toon()
2. Sobel Edge detector 


IV:【based on Toon Shading 4】
1. When doing Toon(), detect whether the vertex from the original point of Cmaera Space to some vertex V is vertical with the normal of this vertex V . If it is then treat it as border, otherwise use original Toom() to add color


Challenge:
1.  Multiple lighting problem. Our Toon Shading generates better Cel Animation results with single light. However, within multiple light sources, there are more color modules in output result than our expectation.
2. Enhancement on border line detection, in Toon Shading output result III, it has not drawn all important bounding lines, like the border of eyebrow and collar.
 

0 件のコメント:

コメントを投稿