hardware support for non-photorealistic rendering: a summary paper last updated by ramesh raskar...
TRANSCRIPT
Hardware Support for Non-photorealistic Rendering: A summary
Paper last updated by Ramesh Raskar February 2002
Presented by Rachel Probert
Traditional Approach to Feature Rendering
High memory requirements
CPU based computations
Raskar’s ApproachAdds a Primitive Shader stage to graphics pipeline.
Employs a secondary Z-buffer
Uniform line creation
Color buffer updated
Vertex and Primitive Assembly
Primitive Shader
Polygon Setup
Pixel Shader
Vertex Shader
Silhouettes
Enlarge all back-facing polygons at degree
Silhouettes Continued
For each polygonif /*front facing*/
color polygon whiteElse If /*back facing*/
enlarge color blackflip normal
Vertex and Primitive Assembly
Primitive Shader
Polygon Setup
Pixel Shader
Vertex Shader
Ridges
All front-facing polygons are modified
Ridges And SilhouettesFor each polygon
if front-facingcolor whitefor each edge
attach new quad at angle if back-facing
Enlarge according to viewColor blackflip normal
Vertex and Primitive Assembly
Primitive Shader
Polygon Setup
Pixel Shader
Vertex Shader
ValleysUses a secondary buffer to “trap” quads to be rendered.
New quads are added to every edge at angle .
z1 z2z1 z2
Valleys Continued
For each front-facing polygonrender the polygon
if(less-than-test(z1))Update color bufferUpdate z1 and z2 buffer
for each edge of polygonrender new black quad at angle if (between-test(z1,z2))
Update color buffer
Pixel Shader
Vertex and Primitive Assembly
Primitive Shader
Polygon Setup
Vertex Shader
IntersectionsUsually created by imprecise conversions or processing
Only rendered if they belong to front-facing polygon
Rendered
Intersections ContinuedFor each front-facing polygon
render the polygon
if(less-than-test(z1))
update color buffer
else If (between-test(z1,z2))
update color buffer
Pixel Shader
Vertex and Primitive Assembly
Primitive Shader
Polygon Setup
Vertex Shader
Issues
When rendering ridges and valleys:
If the dihedral angle between any two adjacent visible front-facing polygons is close to the ‘z-fighting’ becomes noticeable as new extensions and existing polygons are almost on the same plane
Issues
When special features are wide, small gaps can occur. This rarely occurs unless lines are wider than 20 pixels
When a ridge is also a silhouette, and is greater than or equal to 180˚, artifacts can appear unless both features are rendered in the same color.
Performance
Additional z buffer is necessary
New extensions must be tagged
In-between test
Vertex transformations increase by a factor of 2-5
New polygons generated on-chip
Possible extensions of Primitive Shader stage
New extensions can be rendered with different effects for Non-photorealistic rendering.The silhouette can be made to appear smooth by rendering all back-facing polygons with curved PN trianglesThe superior polygonal approximation will produce higher quality rendering