Docsity

Graphics Pipeline - Computer Graphics - Lecture Slides, Slides of Computer Science

Partial preview of the text

Download Graphics Pipeline - Computer Graphics - Lecture Slides and more Slides Computer Science in PDF only on Docsity!

The Graphics Pipeline:

Projective Transformations

Today • Review & Schedule • Ray Casting / Tracing vs. Scan Conversion • The Graphics Pipeline • Projective Transformations

Today • Review & Schedule • Ray Casting / Tracing vs. Scan Conversion • The Graphics Pipeline • Projective Transformations

What have we done so far? • Ray Casting / Tracing

– ray/primitive intersections– transformations– local shading (diffuse,

ambient,

BRDFs)

– global effects

(shadows,transparency,caustics, ... )

Ray Casting / Tracing • Advantages?

– Smooth variation of normal, silhouettes – Generality: can render anything that can be

intersected with a ray

– Atomic operation, allows recursion

• Disadvantages?

– Time complexity (N objects, R pixels) – Usually too slow for interactive applications – Hard to implement in hardware (lacks computation

coherence, must fit entire scene in memory)

Can we render things interactively? • Of course! games, 3D modeling packages,

architectural walkthroughs, assignment 5, etc.

Scan Conversion – Graphics Pipeline • Primitives are processed one at a time • Early stages involve analytic processing • Sampling occurs late in the pipeline • Minimal state required

glBegin(GL_TRIANGLES) glNormal3f(...) glVertex3f(...) glVertex3f(...) glVertex3f(...) glEnd();

Scan Conversion – Graphics Pipeline^ for

every

object

in

the

scene

shade

the

vertices

scan

convert

the

object

to

the

framebuffer

interpolate

the

color

computed

for

each

vertex

remember

the

closest

value

per

pixel

glBegin(GL_TRIANGLES) glNormal3f(...) glVertex3f(...) glVertex3f(...) glVertex3f(...) glEnd();

Limitations of Scan Conversion • Restricted to scan-convertible primitives

  • Object polygonization

• Faceting, shading artifacts • Effective resolution is

hardware dependent

• No handling of shadows,

reflection, transparency

• Problem of overdraw

(high depth complexity)

• What if there are more triangles than pixels?

Questions?

The Graphics Pipeline

Modeling Transformations

Illumination(Shading)

Viewing Transformation (Perspective / Orthographic)

Clipping Projection (to Screen Space)^ Scan Conversion(Rasterization) Visibility / Display

The Graphics Pipeline

• Primitives are processed in a series

of stages

• Each stage forwards its result on to

the next stage

• The pipeline can be drawn and

implemented in different ways

• Some stages may be in hardware,

others in software

• Optimizations & additional

programmability are available atsome stages

Modeling Transformations

Illumination(Shading)

Viewing Transformation (Perspective / Orthographic)

Clipping Projection (to Screen Space)^ Scan Conversion(Rasterization) Visibility / Display

Illumination (Shading) (Lighting)

• Vertices lit (shaded) according to

material properties, surfaceproperties (normal) and light sources

• Local lighting model

(Diffuse, Ambient, Phong, etc.)

Modeling Transformations

Illumination(Shading)

Viewing Transformation (Perspective / Orthographic)

Clipping Projection (to Screen Space)^ Scan Conversion(Rasterization) Visibility / Display

Viewing Transformation

Modeling Transformations

•^

M

aps world space to eye space

-^

Vi

ewing positi

on

s^ is

transform

ed to orig

inal &

dir

ecti

on is

ori

ented along s

ome axis (usually

z )

Illumination(Shading)

Viewing Transformation (Perspective / Orthographic)

Clipping Projection (to Screen Space)^ Scan Conversion

(Rasterization) Visibility / Display

P NEAR

v u

-n

o

FAR

z

y

x

o

EYE

Seth Teller

Image adapted from:

WORLD SPACE

Docsity.com