hardware support for non-photorealistic rendering: a summary paper last updated by ramesh raskar...

15
Hardware Support for Non- photorealistic Rendering: A summary Paper last updated by Ramesh Raskar February 2002 Presented by Rachel Probert

Upload: morgan-cannon

Post on 18-Dec-2015

212 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Hardware Support for Non-photorealistic Rendering: A summary Paper last updated by Ramesh Raskar February 2002 Presented by Rachel Probert

Hardware Support for Non-photorealistic Rendering: A summary

Paper last updated by Ramesh Raskar February 2002

Presented by Rachel Probert

Page 2: 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

Page 3: Hardware Support for Non-photorealistic Rendering: A summary Paper last updated by Ramesh Raskar February 2002 Presented by Rachel Probert

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

Page 4: Hardware Support for Non-photorealistic Rendering: A summary Paper last updated by Ramesh Raskar February 2002 Presented by Rachel Probert

Silhouettes

Enlarge all back-facing polygons at degree

Page 5: Hardware Support for Non-photorealistic Rendering: A summary Paper last updated by Ramesh Raskar February 2002 Presented by Rachel Probert

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

Page 6: Hardware Support for Non-photorealistic Rendering: A summary Paper last updated by Ramesh Raskar February 2002 Presented by Rachel Probert

Ridges

All front-facing polygons are modified

Page 7: Hardware Support for Non-photorealistic Rendering: A summary Paper last updated by Ramesh Raskar February 2002 Presented by Rachel Probert

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

Page 8: Hardware Support for Non-photorealistic Rendering: A summary Paper last updated by Ramesh Raskar February 2002 Presented by Rachel Probert

ValleysUses a secondary buffer to “trap” quads to be rendered.

New quads are added to every edge at angle .

z1 z2z1 z2

Page 9: Hardware Support for Non-photorealistic Rendering: A summary Paper last updated by Ramesh Raskar February 2002 Presented by Rachel Probert

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

Page 10: Hardware Support for Non-photorealistic Rendering: A summary Paper last updated by Ramesh Raskar February 2002 Presented by Rachel Probert

IntersectionsUsually created by imprecise conversions or processing

Only rendered if they belong to front-facing polygon

Rendered

Page 11: Hardware Support for Non-photorealistic Rendering: A summary Paper last updated by Ramesh Raskar February 2002 Presented by Rachel Probert

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

Page 12: Hardware Support for Non-photorealistic Rendering: A summary Paper last updated by Ramesh Raskar February 2002 Presented by Rachel Probert

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

Page 13: Hardware Support for Non-photorealistic Rendering: A summary Paper last updated by Ramesh Raskar February 2002 Presented by Rachel Probert

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.

Page 14: Hardware Support for Non-photorealistic Rendering: A summary Paper last updated by Ramesh Raskar February 2002 Presented by Rachel Probert

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

Page 15: Hardware Support for Non-photorealistic Rendering: A summary Paper last updated by Ramesh Raskar February 2002 Presented by Rachel Probert

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