Home Technical Talk

Cartoon shading via normal map?

CheapAlert
polycounter lvl 18
Offline / Send Message
CheapAlert polycounter lvl 18
How could it be done? Could just simply reducing the colors in the normal map to like 32 would work?

Replies

  • CrazyButcher
    Options
    Offline / Send Message
    CrazyButcher polycounter lvl 18
    for tangent maps then you would more or less get regular vertex shading along with some banding artifacts

    to get really better cartoonish cel shading you need a pixel shader
  • KDR_11k
    Options
    Offline / Send Message
    KDR_11k polycounter lvl 18
    You need to modify the normalmap shader (it's always a shader) to round the light values to certain steps (up to you where you place them). Another method would be to use the light-to-normal vector to determine the texture coordinate on an envmap that defines the light "falloff". A third option I thought about was to have a palletted image and a separate full color image that's the height of the pallette and has the different colors the pixel will have in all 256 (or if you're daring, up to 2048) light levels, the shader would use the color index of the texture pixel as the vertical position and the light level/angle as the horizontal one to look up the color of the pixel.
Sign In or Register to comment.