Best Approach to Cell Shading Outline
by Jess Bermudes · in Torque Game Engine Advanced · 09/17/2008 (8:57 pm) · 2 replies
Greetings,
I've been experimenting with adding a Cell Shading style to my game, and have gotten the initial cell shade look of quantized lighting thanks to the folks over at the shaders subforum. My question is, regarding having a black outline around my models, would the best way to do that be via another shader, or is there some engine mod that I should do to the rendering pipeline?
From the wikipedia article on Cell Shading:
Would any of those ways be possible under TGEA? Anyone have any experience doing this kind of stuff? Any tips or hints would be appreciated.
Thanks!
I've been experimenting with adding a Cell Shading style to my game, and have gotten the initial cell shade look of quantized lighting thanks to the folks over at the shaders subforum. My question is, regarding having a black outline around my models, would the best way to do that be via another shader, or is there some engine mod that I should do to the rendering pipeline?
From the wikipedia article on Cell Shading:
Quote:
Black "ink" outlines and contour lines can be created using a variety of methods. One popular method is to first render a black silhouette, slightly larger than the object itself. Backface culling is inverted and the back-facing triangles are drawn in black. To dilate the silhouette, these back-faces may be drawn in wireframe multiple times with slight changes in translation. Alternately, back-faces may be rendered solid-filled, with their vertices translated along their vertex normals in a vertex shader. After drawing the silhouette, back-face culling is set back to normal to draw the shading and optional textures of the object. Finally, the image is composited via Z-buffering, as the back-faces always lie deeper in the scene than the front-faces.
Would any of those ways be possible under TGEA? Anyone have any experience doing this kind of stuff? Any tips or hints would be appreciated.
Thanks!
About the author
#2
10/01/2008 (12:20 am)
You know i found when experimenting with Screen Space Ambient Occlusion techniques that it can be used to draw outlines as well. In particular i tried Unsharp Masking (check out the video).
Torque Owner Jess Bermudes