Jump to content
  • Advertisement
Sign in to follow this  
SuperSaiyan3

What's the simplest method to implement "toon-style shading"?

This topic is 1410 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Sometimes it feels great to use toon-style shading. Some people prefer 2D cartoons to 3D animation animation films, but creating 2D games might sometimes be even more laborious than making 3D games. So this cartoon-style shading provides a wonderful balance.

 

But what are the specific steps to achieving toon-style shading effects? Or perhaps more accurately, since there are quite a number of difference techniques available, what is the simplest, yet visually-acceptable method? The shading style like in the game Spider-man: Shattered Dimensions, or The Walking Dead seires?

Share this post


Link to post
Share on other sites
Advertisement

Step 1: quantize the N dot L lighting term. Simple as: ndotl = ndotl > 0.5 ? 0.2 : 0.7; And just toy with the threshold and result values there. You can do more clever stuff - try smoothstep rather than a hard transition. You can also quantize to more colors, say 4, but I never liked  how it looks.

Step 2: Outlined edges. Take the dot product of the normal and the view vector, and if it exceeds a threshold, set the output color to black and exit.

Edited by Promit

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!