2 Tone Lighting in the Compositor


I’m working on an anime style animation. I want to be able to do all the shading in the compositor for a couple reasons. Firstly, It’ll be a lot easier to tweak once I’ve rendered out the animation so I can really dial in that drawn look. I also want to be able to re-animate the lighting so I can fix weird shading and make it more stylized. I’ve come up with this basic render setup, as shown in the image above. I use the normal pass to control a Color Ramp which controls the color of the surface. I can even isolate individual objects and materials and light them separately using the IndexOB and IndexMA values (notice the eyes are lit from the opposite direction from the body). This is all exactly what I want but I realize that as my scene gets more complex I’m going to run into some problems. Firstly, I can’t really control the shadows that objects cast on each other. If you look at the screenshot, the circle above should be casting a shadow. I was thinking about lighting the actual 3d scene with lights in the approximate location then use the shadow pass to combine it all together. But this would give me less control than I would hope for. Is there any way I can fake this in the compositor? Also Anti-Aliasing, when I remap the colors, I lose all my AA data. Any suggestions for that would also be greatly appreciated as well. Sorry for such a long question!