toon

NPR Final Touches

It’s wrapping up, I’ve added all the bells and whistles – Ambient Occlusion, Depth fading, Image Adjustment, etc. Highlights can now be dialated or eroded. Support for separate outlines of normals. Presets and clean menus. I think this shader is about done.

The shader allows for a pretty broad array of looks, from architectural sketches to classic toon shading. Below is an example of a more painterly rendering.

Here are some presets:

NPR Shading Continued

I’m continuing to refine the NonPhotoRealistic (NPR) sketch post-process in Unreal. This is using completely different methods now, I’ve changed the method of convolution edge detection for outlines, and am using world-aligned sketch texturing in the shadow and highlight regions.

The background is also given a custom color and texture. The light source is defined through any number of unreal lights.

There is now support for sketchy highlights and varying line colors, and much better response to light. Ideally the post process would support variation in outline width, although I don’t have a good method for that yet.

There are options to use procedural line, dot and crosshatching for a more comic/newsprint look.

The results are very solid and smooth in motion, with no temporal swimming or distractions. I see this shader being ideal for architectural stylization and general NPR usage. 

To get a more chalk-like effect with ink outlines I take this post process and combine it with an NPR painterly process which applies brushstrokes on the image in world space. Here’s the result:

XSI toon shader

Did some more work on a basic realtime toon shader for XSI (and maya, it’s CGFX.) Here’s a sample…

Me. Me me me. Me too.
It's Agent Smith(s), toon style.

Functionality is pretty basic at the moment: Ink threshold, 2 levels of paint and a hard spec hilight, overall color control, a single point light source. I still need to introduce diffusion and spec mapping, possibly some reflections and bump/normal. Remember, if you see an agent, run.

Playing with NPR

I’ve been playing around with a little app on my iPhone which creates NPR sketch effects from photos (I gather made by Bruce Gooch, who has done a lot to advance the state of the art in ‘painterly’ and ‘sketchy’ image manipulation.) ToonFX

Two of my dogs
Two of my Great Pyrenees dogs, Frankie and Hutch.

The app is simple but with a little effort and insight you can get some good results.