Saito, T. and Takahashi, T. Comprehensible Rendering of 3-D Shapes Proc. of SIGGRAPH '90

35
ito, T. and Takahashi, T. mprehensible Rendering of 3-D Shapes c. of SIGGRAPH '90 Genesis of Genesis of Image Space NPR Image Space NPR

description

Genesis of Image Space NPR. Saito, T. and Takahashi, T. Comprehensible Rendering of 3-D Shapes Proc. of SIGGRAPH '90. Image space algorithms. Saito, T. and Takahashi, T. Comprehensible Rendering of 3-D Shapes Proc. of SIGGRAPH '90. - PowerPoint PPT Presentation

Transcript of Saito, T. and Takahashi, T. Comprehensible Rendering of 3-D Shapes Proc. of SIGGRAPH '90

Page 1: Saito, T. and Takahashi, T. Comprehensible Rendering of 3-D Shapes Proc. of SIGGRAPH '90

Saito, T. and Takahashi, T.Comprehensible Rendering of 3-D ShapesProc. of SIGGRAPH '90

Genesis of Genesis of Image Space NPRImage Space NPR

Page 2: Saito, T. and Takahashi, T. Comprehensible Rendering of 3-D Shapes Proc. of SIGGRAPH '90

• Operations on G-buffers to extract certain properties various images

• Combine these images with rendered images

Image space algorithms Saito, T. and Takahashi, T.Comprehensible Rendering of 3-D ShapesProc. of SIGGRAPH '90

G-buffers ?

Page 3: Saito, T. and Takahashi, T. Comprehensible Rendering of 3-D Shapes Proc. of SIGGRAPH '90

Computer-Generated Images

Special kind of recording equipment yields special images

• x-ray images• thermal images• sonar images

Page 4: Saito, T. and Takahashi, T. Comprehensible Rendering of 3-D Shapes Proc. of SIGGRAPH '90

G-buffers

• Translate this approach to computer graphics

• Render algorithms to create images that show scene properties normally hidden to the

• viewer

• object ID

• distance to view plane

• surface normal

• patch coordinates (u,v) for spline surfaces

• …

• G-buffers (geometric buffers)

Page 5: Saito, T. and Takahashi, T. Comprehensible Rendering of 3-D Shapes Proc. of SIGGRAPH '90

• PixelPixel color now encodes 3D information color now encodes 3D information and not just illuminationand not just illumination

• RReveal information about the underlyingeveal information about the underlying geometrygeometry

• OOperations on G-buffersperations on G-buffers• combinationcombination• edge detectionedge detection• ……

G-buffers

Page 6: Saito, T. and Takahashi, T. Comprehensible Rendering of 3-D Shapes Proc. of SIGGRAPH '90

evealRGB-buffer

Page 7: Saito, T. and Takahashi, T. Comprehensible Rendering of 3-D Shapes Proc. of SIGGRAPH '90

evealObject ID-buffer

Page 8: Saito, T. and Takahashi, T. Comprehensible Rendering of 3-D Shapes Proc. of SIGGRAPH '90

evealDepth-buffer

Page 9: Saito, T. and Takahashi, T. Comprehensible Rendering of 3-D Shapes Proc. of SIGGRAPH '90

evealNormal-buffer

Page 10: Saito, T. and Takahashi, T. Comprehensible Rendering of 3-D Shapes Proc. of SIGGRAPH '90

evealRGB-buffer

Page 11: Saito, T. and Takahashi, T. Comprehensible Rendering of 3-D Shapes Proc. of SIGGRAPH '90

evealObject ID-buffer

Page 12: Saito, T. and Takahashi, T. Comprehensible Rendering of 3-D Shapes Proc. of SIGGRAPH '90

evealDepth-buffer

Page 13: Saito, T. and Takahashi, T. Comprehensible Rendering of 3-D Shapes Proc. of SIGGRAPH '90

evealNormal-buffer

Page 14: Saito, T. and Takahashi, T. Comprehensible Rendering of 3-D Shapes Proc. of SIGGRAPH '90

Process pixel (x,y)

Page 15: Saito, T. and Takahashi, T. Comprehensible Rendering of 3-D Shapes Proc. of SIGGRAPH '90

Saito, T. and Takahashi, T.Comprehensible Rendering of 3-D ShapesProc. of SIGGRAPH '90

Data structures + algorithms:

• Drawing discontinuities, edges, contour lines, curved hatching from the image buffer

Edge classification :

• Profile - - the border line of an object on the screen• Internal - - a line where two faces meet.

Images generated:

1. Depth2. First-order differential3. Second-order differential4. Profile5. Internal edge

Page 16: Saito, T. and Takahashi, T. Comprehensible Rendering of 3-D Shapes Proc. of SIGGRAPH '90

vs wz

dz

2

Depth Image

Distance: viewpoint to screen Depth of object(eye coordinate)

One pixel length(eye coordinate)

Grayscale image that maps [dmin, dmax] to [0, 255]

Shaded image

Depth image

OpenGL depth image content extracted by glReadPixels with GL_DEPTH_COMPONENT

Equalizes the gradient value of depth image with the slope of the surface.

Page 17: Saito, T. and Takahashi, T. Comprehensible Rendering of 3-D Shapes Proc. of SIGGRAPH '90

Depth ImageGrayscale image that maps [dmin, dmax] to [0, 255]

Page 18: Saito, T. and Takahashi, T. Comprehensible Rendering of 3-D Shapes Proc. of SIGGRAPH '90

HGF

EXD

CBA

8

22

22

RDAHEC

HGFCBA

Xg

3

8 HGFEDCBAXXl

Depth image

First-order differential

Sobel’s filter

Second-order differential

Page 19: Saito, T. and Takahashi, T. Comprehensible Rendering of 3-D Shapes Proc. of SIGGRAPH '90

p

gk

gg

gg

gg

min

minmax

min gkggif minmax

gkggif minmax

e

lkg

l

l

2max

lkggif minmax

lkgif max

Profile image

Internal edge image

Normalization of images

g

2lk

10gk

l

Distinguishes discontinuities from continuous changes

Limit of the gradient for the elimination of 0th order discontinuities

Page 20: Saito, T. and Takahashi, T. Comprehensible Rendering of 3-D Shapes Proc. of SIGGRAPH '90
Page 21: Saito, T. and Takahashi, T. Comprehensible Rendering of 3-D Shapes Proc. of SIGGRAPH '90

OID (Object ID) Image

Page 22: Saito, T. and Takahashi, T. Comprehensible Rendering of 3-D Shapes Proc. of SIGGRAPH '90
Page 23: Saito, T. and Takahashi, T. Comprehensible Rendering of 3-D Shapes Proc. of SIGGRAPH '90

Operations on G-buffers (so far…) Edge detection

• RGB-buffer discontinuities in brightness (illumination), i.e., shadows, material, objects

• z-buffer discontinuities in depth, i.e. Object boundaries, also boundaries within one object (creases)

• OID-buffer discontinuities in “objects”, i.e., object silhouettes

Page 24: Saito, T. and Takahashi, T. Comprehensible Rendering of 3-D Shapes Proc. of SIGGRAPH '90

Schofield, S..Non-photorealistic Rendering: A critical examination and proposed systemPhD thesis, School of Art and Design, Middlesex University, May 1994

http://www.microgds.com/index.shtml

Page 25: Saito, T. and Takahashi, T. Comprehensible Rendering of 3-D Shapes Proc. of SIGGRAPH '90
Page 26: Saito, T. and Takahashi, T. Comprehensible Rendering of 3-D Shapes Proc. of SIGGRAPH '90
Page 27: Saito, T. and Takahashi, T. Comprehensible Rendering of 3-D Shapes Proc. of SIGGRAPH '90
Page 28: Saito, T. and Takahashi, T. Comprehensible Rendering of 3-D Shapes Proc. of SIGGRAPH '90
Page 29: Saito, T. and Takahashi, T. Comprehensible Rendering of 3-D Shapes Proc. of SIGGRAPH '90
Page 30: Saito, T. and Takahashi, T. Comprehensible Rendering of 3-D Shapes Proc. of SIGGRAPH '90

We can augment the silhouette edgescomputed with the depth map by usingsurface normals as well.

We will do this by using a normal map,which is an image that represents the surface normal at each point on anobject.

The values in each of the (R; G;B) colorcomponents of a point on thenormal map correspond to the (x; y; z)surface normal at that point.

Depth map

Normal map

Decaudin, P.Cartoon-looking rendering of 3d-scenes.Research Report #2919, INRIA Rocquencourt 1996.

Using Normal Maps to Find Creases and Boundaries

Page 31: Saito, T. and Takahashi, T. Comprehensible Rendering of 3-D Shapes Proc. of SIGGRAPH '90

To compute the normal map for an object with a graphics package:

• First, we set the object color to white, and the material property to diffuse reflection.

• We then place a red light on the X axis, a green light on the Y axis, and a blue light on the Z axis, all facing the object. Additionally, we put lights with negative intensity on the opposite side of each axis.

• We then render the scene to produce the normal map. Each light will illuminate a point on the object in proportion to the dot product of the surface normal with the

light’s axis. An example is shown in Figure (c,d).

• We can then detect edges in the normal map. These edges detect changes in surface orientation, and can be combined with the edges of the depth map to produce a reasonably good silhouette image (Figure (e)).

Page 32: Saito, T. and Takahashi, T. Comprehensible Rendering of 3-D Shapes Proc. of SIGGRAPH '90

Outline drawing with image processing. (a) Depth map. (b) Edges of the depth map. (c)Normal map. (d) Edges of the normal map. (e) The combined edge images.

Page 33: Saito, T. and Takahashi, T. Comprehensible Rendering of 3-D Shapes Proc. of SIGGRAPH '90

Outline detection of a more complex model. (a) Depth map. (b) Depth map edges. (c)Normal map. (d) Normal map edges. (e) Combined depth and normal map edges.

Page 34: Saito, T. and Takahashi, T. Comprehensible Rendering of 3-D Shapes Proc. of SIGGRAPH '90

• Creates visible silhouette edges with constant thickness at the same depth value as the corresponding polygon edge

• Works well when dihedral angle between the adjacent front- and back-facing is not large

• As the line width increase, gaps may occur between silhouette edges

Rossignac, J. and van Emmerik, M.Hidden contours on a frame-bufferProc. of the 7th Eurographics Workshop on Computer Graphics Hardware, 1992.

Page 35: Saito, T. and Takahashi, T. Comprehensible Rendering of 3-D Shapes Proc. of SIGGRAPH '90

1. Fill background with white

2. Enable back-face culling, set depth function to “Less Than””

3. Render front-face polygons in white

4. Enable front-face culling, set depth function to “Less Than or Equal To”

5. In black, draw back-facing polygons in wire-frame mode.

6. Repeat for a new viewpoint

Rossignac, J. and van Emmerik, M.Hidden contours on a frame-bufferProc. of the 7th Eurographics Workshop on Computer Graphics Hardware, 1992.