Roll your own Toon Effect...

I’m playing around with trying to make a painterly style similar to Okami. In Okami they seem to create outlines around objects by duplicating all the geometry, scaling it up a bit, and flipping the normals (then coloring the outlining geometry black). This seems to be the way Unity’s Toon Shader works too for the outlines. The problem I find with Unity’s Toon lines is that the duplicated/scaled/flipped geometry has gaps in it at sharper angles because the outline geometry’s faces/vertices aren’t welded.

So I can create the toon outline effect in Maya by using the “duplicate faces” tool and extruding them out a bit while keeping faces connected and it looks better than Unity’s toon lines because its all one connected mesh.

My question is how effecient this technique is. It obviously doubles your polygon count. Is it more effecient to use Unity’s Toon Shader or is my technique doing about the same performance hit? I’m still keeping the entire effect contained within a single mesh by combining them so object count does not double.

Any suggestions or insights greatly appreciated,
Ethan

I don’t think Unity’s toon effect scales the geometry for the outline. I think it zooms the camera for the outline. This would explain why it doesn’t work with an orthographic camera.

Look at the Scene View… it duplicates the geometry/faces and extrudes it along the face normals. I’m almost positive that it doesn’t involve any Camera effects.

Create a cube and apply the toon… increase the “Outline width”… look how the faces are disconnected. That’s the look I’m trying to avoid.

No mention of an orthographic camera either.

Sorry, I was just going from my experience trying to use it with an orthographic camera. I figured that if the geometry were enlarged, it would look the same regardless of the projection.

Oops, sorry, I misunderstood what you were saying before. Yeah, it looks like the width of the line in the toon shader is determined by the projection of the camera which explains why an orthographic projection produces an almost nonexistent thin line. Were you trying to make a 2D game with the toon shader using an orthographic camera?

I was actually using all three dimensions, but just using an orthographic camera to view it. I was hoping to be able to use the toon shader to give the game the feel I wanted.