The Dreaded Cel Shading Dilemma

Blitz3D Forums/Blitz3D Programming/The Dreaded Cel Shading Dilemma

Ryudin(Posted 2010) [#1]
Yup. The title says it all.

I'm working on a project in which I want to cel shade stuff. After searching the forums, I decided to use sphere mapping for the pretty posterized effect. As my light source is simply at the camera no matter what, I'm using a pyramidal linear gradient with the brightest color at the center. It looks good until...



It looks like the UV isn't clamped but I'm definitely loading the texture that way. Any suggestions on why it's doing this?


Ross C(Posted 2010) [#2]
Well, sphere mapping works on the normals of the mesh, so i'd reckon your mesh has some slightly dodgy normals. Have you tried running your mesh through sswift's calculate normals function?

http://www.blitzbasic.com/codearcs/codearcs.php?code=975


Ryudin(Posted 2010) [#3]
Yup, that did it! Thanks a bunch.