non-photorealistic rendering pablo picasso - the bird cage no electrons were harmed during the...

23
Non-photorealistic Rendering Pablo Picasso - The Bird Cage No electrons were harmed during the production of this presentation.

Upload: pearl-willis

Post on 23-Dec-2015

215 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Non-photorealistic Rendering Pablo Picasso - The Bird Cage No electrons were harmed during the production of this presentation

Non-photorealistic Rendering

Pablo Picasso - The Bird CageNo electrons were harmed during the production of this presentation.

Page 2: Non-photorealistic Rendering Pablo Picasso - The Bird Cage No electrons were harmed during the production of this presentation

Non-photorealistic Rendering

• Interactive Technical Illustration– Bruce Gooch, Peter-Pike J.Sloan, Amy Gooch,

Peter Shirley, Richard Riesenfeld(CS Dept, University of Utah)

• Image Precision Silhouette Edges– Ramesh Raskar (UNC @ Chapel Hill)– Michael Cohen (Microsoft Research)

Page 3: Non-photorealistic Rendering Pablo Picasso - The Bird Cage No electrons were harmed during the production of this presentation

Interactive Technical Illustration

Using NPR techniques to clarify an illustration.

http://www.cs.utah.edu/~bgooch/ITI

Page 4: Non-photorealistic Rendering Pablo Picasso - The Bird Cage No electrons were harmed during the production of this presentation

Interactive Technical Illustration

• Technical documentation illustrations are typically 2D, static and hand-drawn.

• Uses abstraction to convey information on shape, structure and material composition.

• How can technical illustration techniques be applied to an interactive 3D display ?

Page 5: Non-photorealistic Rendering Pablo Picasso - The Bird Cage No electrons were harmed during the production of this presentation

2D Principles Applied

Use line weight to suggest structure :– single line weight.– heavy edges, thin inner lines.– vary weight to improve perspective.

Page 6: Non-photorealistic Rendering Pablo Picasso - The Bird Cage No electrons were harmed during the production of this presentation

Three common shading models :– diffuse

• interpolate from cool to warm color

– metallic– banded

• ( a |cos t| + (1-a) ) ^ p

• produces a “back-splash” of light.

Model’s inner lines can be used as highlights.

2D Principles Applied

Page 7: Non-photorealistic Rendering Pablo Picasso - The Bird Cage No electrons were harmed during the production of this presentation

2D Principles Applied

Shadowing can hint at 3D structure.– Used only when doesn’t mask details.– Will use cast shadow on ground plane.– High accuracy is not really important.

Page 8: Non-photorealistic Rendering Pablo Picasso - The Bird Cage No electrons were harmed during the production of this presentation

Interactive Principles Applied

The object moves, not the viewer:– Moving highlights convey more information.– Each object is lit independently.

• Multiple highlights would be confusing.

Page 9: Non-photorealistic Rendering Pablo Picasso - The Bird Cage No electrons were harmed during the production of this presentation

Implementation

• Silhouettes and important edges– Hardware vs. software– Line style.

• Shading– Metal shading

• Shadowing– Soft vs. hard shadows.

Page 10: Non-photorealistic Rendering Pablo Picasso - The Bird Cage No electrons were harmed during the production of this presentation

Silhouettes & Important Edges

“A silhouette is an edge that is connected to both a front-facing and a back-facing polygon.”

• Hardware Method• GL & the stencil buffer.

Draw shaded front faces

Draw front faces in line mode in stencil buffer

Draw back faces in line mode Setting color if stencil buffer was set,decrementing stencil buffer if drawn.

• Environment map.

Page 11: Non-photorealistic Rendering Pablo Picasso - The Bird Cage No electrons were harmed during the production of this presentation

Silhouettes & Important Edges

• Software Method - Math and bottlenecks :– Equation to determine silhouette edges.– Tested faster using a hierarchical Gauss map.– Parallelizable.

Not a silhouette edge. A silhouette edge.

Page 12: Non-photorealistic Rendering Pablo Picasso - The Bird Cage No electrons were harmed during the production of this presentation

Silhouettes & Important Edges

• Line weight and creases:– Use shading or texture mapping to vary weight.– Extract creases and draw as white highlights.

• Can be covered by silhouette or shading.

• Doesn’t state HOW the creases are extracted.

Page 13: Non-photorealistic Rendering Pablo Picasso - The Bird Cage No electrons were harmed during the production of this presentation

Silhouettes & Important Edges

• Line weight and creases:– Use shading or texture mapping to vary weight.– Extract creases and draw as white highlights.– Draw thick boundary lines.

• Draw only over the object (stencil buffer).

– Draw boundary silhouettes.• Software edge list limits redrawing.

– Fill gaps with large points at edge ends.

Page 14: Non-photorealistic Rendering Pablo Picasso - The Bird Cage No electrons were harmed during the production of this presentation

Shading

• Hardware environment mapping is used for its flexibility.

• Metal shading– Create a metal texture.– Add Phong highlights.– Sufficient to convey material

information.

Page 15: Non-photorealistic Rendering Pablo Picasso - The Bird Cage No electrons were harmed during the production of this presentation

Shadowing

• Cast only shadows on the ground plane.

• Soft shadows :– Project shadow on a stack of slightly offset

planes and accumulate them.– Assumes the silhouette

remains the same.– Not exact, but faster.

Page 16: Non-photorealistic Rendering Pablo Picasso - The Bird Cage No electrons were harmed during the production of this presentation

Image Precision Silhouette Edges

A hack that does the job quickly.

http://www.cs.unc.edu/~raskar/Sil/

Page 17: Non-photorealistic Rendering Pablo Picasso - The Bird Cage No electrons were harmed during the production of this presentation

Image Precision Silhouette Edges

The problem:– Find all silhouette edges.– Render only those which are not occluded.

Page 18: Non-photorealistic Rendering Pablo Picasso - The Bird Cage No electrons were harmed during the production of this presentation

Image Precision Silhouette Edges

The problem:– Find all silhouette edges.– Render only those which are not occluded.

• Gooch’s answer :– Find them all.– Render them all. Several times if needs be.

Page 19: Non-photorealistic Rendering Pablo Picasso - The Bird Cage No electrons were harmed during the production of this presentation

Image Precision Silhouette Edges

The problem:– Find all silhouette edges.– Render only those which are not occluded.

• Raskar’s answer :– Cheat.

Page 20: Non-photorealistic Rendering Pablo Picasso - The Bird Cage No electrons were harmed during the production of this presentation

The method

• First render the front-facing polygons.

• Render the back-facing polygons in black.– If needed, BF polygons can be found by

reading back the frame buffer.

Problem:This produces silhouettes at most 1 pixel wide.

We need some preprocessing to be done.

Page 21: Non-photorealistic Rendering Pablo Picasso - The Bird Cage No electrons were harmed during the production of this presentation

How to render the BF polygons

• Render them as thick wireframe.– Easy and fast.– May leave gaps when lines get too thick.

• Translate the back-facing polygons.– e.g. using glPolygonOffset().– May not give uniform outlines.

• Use view dependent modifications.– Can have ‘artistic’ results.

Page 22: Non-photorealistic Rendering Pablo Picasso - The Bird Cage No electrons were harmed during the production of this presentation

Results

Wireframe Translation Fattening

40 fps 50 fps 11.5 fps

Original Venus model : 5672 triangles, 66 fps

Page 23: Non-photorealistic Rendering Pablo Picasso - The Bird Cage No electrons were harmed during the production of this presentation

Conclusion...