CS 655 Advanced Computer Graphics - PowerPoint PPT Presentation

1 / 21
About This Presentation
Title:

CS 655 Advanced Computer Graphics

Description:

CS 655 Advanced Computer Graphics. Introduction ... Fractals. L-systems. Particle systems. Volumetric modeling and rendering. Texture and other mapping ... – PowerPoint PPT presentation

Number of Views:37
Avg rating:3.0/5.0
Slides: 22
Provided by: cs6
Category:

less

Transcript and Presenter's Notes

Title: CS 655 Advanced Computer Graphics


1
CS 655 Advanced Computer Graphics
  • Introduction

2
Intent of the Course
  • Look at the entire graphics pipeline
  • Basic modeling
  • Solid modeling
  • Modeling natural phenomena
  • Fractals
  • L-systems
  • Particle systems
  • Volumetric modeling and rendering
  • Texture and other mapping
  • Ray tracing
  • Radiosity
  • Global illumination
  • Animation

3
Assumptions
  • You have had CS 455 and understand
  • Basic scan conversion
  • Geometric transformations
  • Viewing transformations
  • Illumination models
  • Lighting
  • Shading algorithms
  • Flat shading
  • Gouraud shading
  • Phong shading
  • Ray-tracing (basic)
  • Curves and surfaces (basic)
  • Linear algebra
  • Various spaces and coordinate systems
    (modeling,world, view reference)

4
Object Representations
  • Non-parametric or implicit
  • 2D curve f(x, y) 0 or y y(x)
  • 3D curve f1(x, y, z) 0, f2(x, y, z) 0, or
  • y y(x), z z(x)
  • Surface f(x, y, z) 0 or z z(x, y)
  • Solid specify with inequalities (also need
    boundary conditions)
  • e.g.
  • y mx b straight line
  • x2 y2 r2 circle
  • Ax By Cz D 0 plane
  • x2 y2 z2 - r2 0 spherical surface
  • x2 y2 z2 r2 sphere
  • Useful for scan conversion algorithms,
    determining object boundaries

5
Object Representations
  • Parametric
  • Curve x x(u), y y(u), z z(u) or
  • P(u) (x(u), y(u), z(u))
  • typically with 0 u 1
  • Surface P(u, v) (x(u,v), y(u,v), z(u,v))
  • typically with 0 u, v 1
  • Solid P(u, v, w) (x(u,v,w), y(u,v,w),
    z(u,v,w))
  • typically with 0 u, v, w 1

6
Object Representations
  • Advantages of Parametric Representation
  • provide more degrees of freedom than implicit
  • coordinate independent representation
  • easier to deal with for some applications
  • object bounds specified by limits on u, v, w
    instead of on coordinate
  • Easily expressed in vector or matrix form
  • simplifies object descriptions
  • Transformations can be applied directly to the
    parametric equation
  • Easy to extend to higher dimensions

7
Geometric Transformations
  • Homogeneous coordinate form
  • Translation Matrix
  • Scale Matrix
  • Scaled by (Sx, Sy, Sz)
  • about the fixed point
  • (xF, yF, zF)

8
Geometric Transformations
  • Rotations
  • Right handed coordinate system
  • Positive rotations are counter-
  • clockwise looking down the
  • positive axis towards the origin

9
Rotation about Arbitrary Axis
  • Basic Idea
  • Move a point on the line to the origin
  • Rotate about some axis to put l into a coordinate
    plane
  • Rotate about another axis to align l with a
    coordinate axis
  • Rotate about that axis by q
  • Reverse rotation about the coordinate axis in
    step 3
  • Reverse rotation about the coordinate axis in
    step 2
  • Reverse translation from step 1

10
Rotation about Arbitrary Axis
y
y
l
b
a
T(-p)
x
x
Rz(a)
z
z
l
y
y
l
q
Ry(b)
Ry(-b)
Rx(Q)
x
z
l
-b
x
z
y
-a
Rz(-a)
T(p)
x
z
l
11
Viewing
  • Setting up an Arbitrary View, given
  • Look from Point
  • Look at point
  • The up direction
  • From these, compute VRC

12
Viewing
  • To display the scene, you need
  • View plane
  • Usually perpendicular to the view direction
  • Window in the view plane
  • Only object that project to the window will be
    mapped to the viewport
  • View Volume
  • Front clipping plane
  • Back clipping plane
  • Projection type
  • Parallel
  • Perspective

13
Parallel Projection
View Reference Point
Front Clipping Plane
Back Clipping Plane
Window
-zv
View Volume
xv
Window
14
Perspective Projection
Center of Projection
Front Clipping Plane
Back Clipping Plane
Window
-zv
View Volume
xv
d
(xcp, ycp, zcp)
15
Lighting
  • For realistic lighting effects, the following are
    generally included
  • Ambient illumination
  • background lighting, no light source, just simply
    there
  • Diffuse reflection
  • light reflects equally in all directions
  • Specular reflection
  • light seen depends on the view direction
  • Refracted (transmitted) light
  • for transparent objects

16
Illumination Model
  • One illumination model, that works well, and is
    not too computationally expensive is

17
Shading
  • Define the objects in the scene, then shade the
    surfaces of the objects
  • Typically want the intensity to vary across the
    polygon
  • i.e., a blue polygon should be dark blue in one
    corner then gradually change to light blue in the
    other corner
  • Used to give the appearance of curvature to an
    object that has been defined as a polygonal set.
  • Different types of shading have the quality vs.
    time tradeoff

18
Shading
  • Constant Shading
  • A single intensity is used to shade an entire
    polygon
  • Not too bad if
  • Light source is at infinity (i.e., (N L) is
    constant across the polygon)
  • Viewer is at infinity (i.e., (N V) is constant
    across the polygon)
  • The polygon represents the actual surface, rather
    than an approximation to a curved surface
  • Gouraud Shading
  • Compute illumination model at each vertex
  • Interpolate intensities between vertices
  • Phong Shading
  • Compute normals at each vertex
  • Interpolate normals between vertices
  • Computer illumination model at each point

19
Shading
  • Gouraud Shading
  • Interpolate intensities over each polygon surface
  • Compute illumination model at each vertex
  • Interpolate intensities between vertices
  • Compute intensities for points 1, 2, and 3
  • Interpolate intensity between points 1 and 2 to
    get intensity for point 4
  • Interpolate intensity between points 3 and 1 to
    get intensity for point 5
  • Interpolate intensity between points 4 and 5 to
    get intensity for point 6

2
3
6
4
5
1
20
Shading
  • Phong Shading
  • Interpolate intensities over each polygon surface
  • Compute normals at each vertex
  • Interpolate normals between vertices
  • Compute illumination model at each point
  • Compute normals for points 1, 2, and 3
  • Interpolate between normals at 1 and 2 to get
    normal for point 4
  • Interpolate between normals at 3 and 1 to get
    normal for point 5
  • Interpolate between normals at 4 and 5 to get
    normal for point 6

2
3
6
4
5
1
21
Linear Interpolation
  • The equation to interpolate a value i between
    two other values a and b is

dist(a,i)
(
)

-
-
V
V
V
V
i
a
a
b
dist(b,a)
Write a Comment
User Comments (0)
About PowerShow.com