150 likes | 294 Views
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. Vertex and Primitive Assembly. Primitive Shader.
E N D
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
Vertex and Primitive Assembly Primitive Shader Pixel Shader Vertex Shader Polygon Setup Raskar’s Approach • Adds a Primitive Shader stage to graphics pipeline. • Employs a secondary Z-buffer Uniform line creation Color buffer updated
Silhouettes Enlarge all back-facing polygons at degree
Vertex and Primitive Assembly Primitive Shader Pixel Shader Vertex Shader Polygon Setup Silhouettes Continued For each polygon if /*front facing*/ color polygon white Else If /*back facing*/ enlarge color black flip normal
Ridges All front-facing polygons are modified
Vertex and Primitive Assembly Primitive Shader Pixel Shader Vertex Shader Polygon Setup Ridges And Silhouettes For each polygon if front-facing color white for each edge attach new quad at angle if back-facing Enlarge according to view Color black flip normal
z1 z2 Valleys • Uses a secondary buffer to “trap” quads to be rendered. • New quads are added to every edge at angle . z1 z2
Vertex and Primitive Assembly Primitive Shader Pixel Shader Vertex Shader Polygon Setup Valleys Continued For each front-facing polygon render the polygon if(less-than-test(z1)) Update color buffer Update z1 and z2 buffer for each edge of polygon render new black quad at angle if (between-test(z1,z2)) Update color buffer
Intersections • Usually created by imprecise conversions or processing • Only rendered if they belong to front-facing polygon Rendered
Vertex and Primitive Assembly Primitive Shader Pixel Shader Vertex Shader Polygon Setup Intersections Continued For each front-facing polygon render the polygon if(less-than-test(z1)) update color buffer else If (between-test(z1,z2)) update color buffer
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 triangles • The superior polygonal approximation will produce higher quality rendering