Docsity

Real Time Rendering and Graphics Hardware - Slides | ECE 595, Exams of Electrical and Electronics Engineering

Toggle sidebar
bg1
1
Real-time Rendering & Graphics Hardware
PradeepSen Class 11 –February 26, 2007
ECE 595 / CS 491 / CS 591
Real-Time Rendering &
Graphics Hardware
Pradeep Sen
Advanced Graphics Lab
Class 11
February 26, 2007 Real-time Rendering & Graphics Hardware
PradeepSen Class 11 –February 26, 2007
Announcements
New homework available today (due next
Monday)
Midterm exam next Wednesday (March 7 in
class). Will cover up to and including next
Monday’s lecture on hard shadows.
Office hours tomorrow start at 3:15
Real-time Rendering & Graphics Hardware
PradeepSen Class 11 –February 26, 2007
Last time
Joe talked to you about Cg, high-level
shading for NPR
Real-time Rendering & Graphics Hardware
PradeepSen Class 11 –February 26, 2007
Today
Introduction to the texture mapping pipeline
Sampling artifacts
Silhouette maps
Real-time Rendering & Graphics Hardware
PradeepSen Class 11 –February 26, 2007
Introduction to texture mapping
– Developed by Catmull (’74) as way to improve realism
without increasing geometric complexity
– Define parameterizat ion (u,v) over surface
– Function f(u,v) can now modify appearance of surface
– Function f(u,v) can be stored as an array of pixels called a
texture
geometry u,v parameterization f(u,v)
(u0,v0)
v
u
v
u
(u0,v0)
Real-time Rendering & Graphics Hardware
PradeepSen Class 11 –February 26, 2007
Introduction to texture mapping
geometry
texture
texture-mapped
u
v
Real-time Rendering & Graphics Hardware
PradeepSen Class 11 –February 26, 2007
A little sampling theory
Real-time Rendering & Graphics Hardware
PradeepSen Class 11 –February 26, 2007
Ideal texture mapping pipeline in 1D
1D
u
2D
v
s
t
u
v
screen space texture space
Real-time Rendering & Graphics Hardware
PradeepSen Class 11 –February 26, 2007
Representing Theoretical Texture Signal
Explicitly, with a mathematical equation
u
v
u
v
There are several possible ways to represent the
theoretical texture signal:
e.g. f(u,v) = sin(10πu v)
Unfortunately, it is difficult to generalize this
approach…
What is the equation for this?
pf3

Partial preview of the text

Download Real Time Rendering and Graphics Hardware - Slides | ECE 595 and more Exams Electrical and Electronics Engineering in PDF only on Docsity!

Real-time Rendering & Graphics Hardware Pradeep Sen

Class 11 – February 26, 2007

ECE 595 / CS 491 / CS 591

Real-Time Rendering &

Graphics Hardware

Pradeep SenAdvanced Graphics LabClass 11February 26, 2007

Real-time Rendering & Graphics Hardware Pradeep Sen

Class 11 – February 26, 2007

Announcements ƒ^ New homework available today (due nextMonday) ƒ^ Midterm exam next Wednesday (March 7 inclass). Will cover up to and including nextMonday’s lecture on hard shadows. ƒ^ Office hours tomorrow start at 3:

Real-time Rendering & Graphics Hardware Pradeep Sen

Class 11 – February 26, 2007

Last time ƒ^ Joe talked to you about Cg, high-levelshading for NPR

Real-time Rendering & Graphics Hardware Pradeep Sen

Class 11 – February 26, 2007

Today ƒ^ Introduction to the texture mapping pipeline ƒ^ Sampling artifacts ƒ^ Silhouette maps

Real-time Rendering & Graphics Hardware Pradeep Sen

Class 11 – February 26, 2007

Introduction to texture mapping^ – Developed by Catmull (’74) as way to improve realism

without increasing geometric complexity– Define parameterization (u,v) over surface– Function f(u,v) can now modify appearance of surface– Function f(u,v) can be stored as an array of pixels called a texture^ geometry

u,v parameterization

f(u,v)

v^ (u,v)^0

u

v

u

(u,v)^0

Real-time Rendering & Graphics Hardware Pradeep Sen

Class 11 – February 26, 2007

Introduction to texture mapping

geometry

texture

texture-mapped

u

v

Real-time Rendering & Graphics Hardware Pradeep Sen

Class 11 – February 26, 2007

A little sampling theory

Real-time Rendering & Graphics Hardware Pradeep Sen

Class 11 – February 26, 2007

Ideal texture mapping pipeline in 1D^ 1D

u

2D

v^ s t

u v screen space

texture space

Real-time Rendering & Graphics Hardware Pradeep Sen

Class 11 – February 26, 2007

Representing Theoretical Texture Signal^ ƒ^ Explicitly, with a mathematical equation

u v

u v

There are several possible ways to represent thetheoretical texture signal:e.g.

f(u,v) =

sin

(10π

u v )

Unfortunately, it is difficult to generalize thisapproach…What is the equation for this?

Real-time Rendering & Graphics Hardware Pradeep Sen

Class 11 – February 26, 2007

Representing Theoretical Texture Signal There are several possible ways to represent thetheoretical texture signal:^ ƒ^ Explicitly, with a mathematical equation^ ƒ^ Implicitly, with a functional program that can computef(u,v) everywhere on the domaine.g. procedural textures^ Shader checkboard(float4 uv) {uv = floor(uv * 8);return ((uv.x % 2) == (uv.y % 2));} These have the same problem as the explicitrepresentations – not all textures can be represented!

Real-time Rendering & Graphics Hardware Pradeep Sen

Class 11 – February 26, 2007

Representing Theoretical Texture Signal There are several possible ways to represent thetheoretical texture signal:^ ƒ^ Explicitly, with a mathematical equation^ ƒ^ Implicitly, with a functional program that can computef(u,v) everywhere on the domain^ ƒ^ Implicitly, with a composition of geometrical shapeswith well-defined mathematical representations.e.g. vector graphicsThese can be expensive to compute in real-time.Similar to the general rendering problem!

circles^

lines^

Bézier curves

Real-time Rendering & Graphics Hardware Pradeep Sen

Class 11 – February 26, 2007

Representing Theoretical Texture Signal There are several possible ways to represent thetheoretical texture signal:^ ƒ^ Explicitly, with a mathematical equation^ ƒ^ Implicitly, with a functional program that can computef(u,v) everywhere on the domain^ ƒ^ Implicitly, with a composition of geometrical shapeswith well-defined mathematical representations.^ ƒ^ Approximately, using a discrete representation

u v

u v

theoretical texture signal

discrete representation

“texture”

Real-time Rendering & Graphics Hardware Pradeep Sen

Class 11 – February 26, 2007

Standard Texture Mapping Pipeline in 1D

Vector graphics editor creates theoretical texture signalRasterize the theoretical signal into a discreterepresentation and downsample to the desired size

CPU^

GPU

performed once

60 Hz

“Texture Authoring”

Real-time Rendering & Graphics Hardware Pradeep Sen

Class 11 – February 26, 2007

Standard Texture Mapping Pipeline in 1D

CPU^

GPU

performed once

60 Hz

spatialdomain frequencydomain

Real-time Rendering & Graphics Hardware Pradeep Sen

Class 11 – February 26, 2007

Standard Texture Mapping Pipeline in 1D^ OpenGL provides two reconstruction filter modes:

GL_NEAREST

GL_LINEAR

spatialdomain

CPU^

GPU

performed once

60 Hz

Real-time Rendering & Graphics Hardware Pradeep Sen

Class 11 – February 26, 2007

Standard Texture Mapping Pipeline in 1D OpenGL provides two reconstruction filter modes:

GL_NEAREST

GL_LINEAR

spatialdomain

CPU^

GPU

performed once

60 Hz

Real-time Rendering & Graphics Hardware Pradeep Sen

Class 11 – February 26, 2007

Standard Texture Mapping Pipeline in 1D

CPU^

GPU

performed once

60 Hz

„^ The SSF must adapt the filter width to local sampling density. „^ This might seem difficult to do in real-time, but graphics hardware usesan approximation that works reasonably: mipmaps! „^ A mipmap is a pyramid of signals filtered with progressively larger filtersizes. „^ Depending on the local sampling density (

d ), samples from the

appropriate mip level are selected and blended.

Real-time Rendering & Graphics Hardware Pradeep Sen

Class 11 – February 26, 2007

Standard Texture Mapping Pipeline in 1D

CPU^

GPU

performed once

60 Hz

„^ The sampling process that transforms a spatially-continuous signal into a spatially-discrete representationintroduces artifacts. „^ These artifacts are not aliasing. In fact, they can beconsidered the effects of antialiasing. „^ The silhouette map structure presented in thisdissertation targets these artifacts.