Title: Welcome to CSc 830 Advanced Computer Graphics
1Welcome toCSc 830 Advanced Computer Graphics
2What does this course cover...
- Computer Graphics is fun!!!!
- Think about all the movies with spectacular
computer graphics special effect. - But we are not artists. We are the ones who makes
artists dream and imaginations come true!!!! - So, you are not learning how to use tools like
AutoCAD, 3D studio MAX, Abobe Photoshop, Maya,
etc
3You will learn
- Concepts of 3D modeling Simulations
- Animation
- But most importantly RENDERING of 3D graphics
which is the fundamental for the others. - Topics (check the syllabus)
4Graphics Applications
Universal Jurassic Park
Pixar Geris Game
5Graphics Applications
id Quake II
Cyan Riven
6Graphics Applications
The Visible Human Project
MIT Image-Guided Surgery Project
7Graphics Applications
- Computer Aided Design (CAD)
8Graphics Applications
9Survey on your CG related background
- Basic Concept (Transformation, Camera,
Projection, Rendering, Shading) - Software Tools (3D Studio Max, Maya, Alias,
Director, VRML) - Library (OpenGL, Open Inventor, Renderman,
directX, Java3D) - Advanced Issues (Animation, Rendering
Acceleration, Geometry Compression, Global
Illumination, Simulation, IBR)
10My Current Research Topics
- Webs on the Web - 3D Visualization of
bioinformatics data through the WWW - The Virtual Tour Project - The virtual tour
through the WWW - Scientific Visualization - Remote rendering of
huge simulation data sets (LBL intern position) - 3D modeling tools for biologists
- Web-based hydrodynamics computing
- Automated Behavioral Phenotype Detection and
Analysis Using Color-Based Motion Tracking
11Modeling and Animation using Blender
- Why Blender?
- Use Gmax if you want
- Why using modeling and animation tools?
- Tlaloc.sfsu.edu/yoon/csc830/Assign0.html
12Basic Rendering Pipeline
ViewingTransformation (WS -gt CS)
Modeling Transformation (OS -gt WS)
Visibility Culling
Database of 3D models
13Geometric/Modeling Transformation
- Goal specify objects position and orientations
in a 3D world - Use Linear transformations that rotate and
translate objects vertices. - Apply these transformations in matrix form
14Modeling Transformation
Viewing Transformation (WS -gt CS)
Projection
Illumination
Rasterization Clipping Display
Visibility Culling
Modeling Transformation (OS -gt WS)
Database of 3D models
3D models defined in their own model space or
object space(OS) - Modeling of an object that
consists of multiple object parts use a
hierarchical structure of this modeling
transformations. Modeling transformations
orient models within a common coordinate system
called world space (WS) - multiple objects in a
space All objects, lights, and camera (viewer)
is in one world space
15Rigid-Body Transformation
- Euclidean transformation
- Preserve the shape of the objects that they act
on - Includes rotations and translations
rotation
translation
16Homogeneous Coordinate System
- Rotation multiplies and translation adds
- causes distingtion for every single calculation
- Homogeneous system treats translation and
rotation same by extending one dimension - Repeating usages, scale, skew are also fine
17Viewing
- Goal map the visible part of a 3D world to a 2 D
image - Use camera-like parameters to define a 3D view
volume - Project the view voulme onto a 2D image plane
- Map viewport on the image plane to the screen
18Viewing Transformation
ViewingTransformation (WS -gt CS)
Projection
Illumination
Rasterization Clipping Display
Visibility Culling
Modeling Transformation (OS -gt WS)
Another change of coordinate systems Maps
points from world space into eye (camera) space
Eye position becomes the origin and viewing
direction is oriented along some axis (z/-z)
eye
World space
19Viewing transformation
- Same with other transformation (rotation
translation) - Specially treated because camera position
viewing direction defines it.
eye
20Visibility Culling
ViewingTransformation (WS -gt CS)
Projection
Illumination
Rasterization Clipping Display
Visibility Culling
Modeling Transformation (OS -gt WS)
Database of 3D models
Viewing volume is defined. Objects outside
viewing volume is not visible. This process
can contribute substantial performance
improvement and there are many number of
techniques.
21Clipping
- Goal cut off the part of objects outside the
view volume to avoid rendering them
22Illumination
ViewingTransformation (WS -gt CS)
Projection
Illumination
Rasterization Clipping Display
Visibility Culling
Modeling Transformation (OS -gt WS)
Illumination needs to be done before projection
since Z value does matter for shading
calculation Shading usually refers local
illumination calculated based on surface
material, surface normal, view direction, and
light source Texture map can be added here
Global illumination adds interaction between
objects, reflection, refration, BRDF, etc
23Lighting, Shading
- Lighting and shading give objects shape
- Important effects
- shading
- shiny highlights
- reflections
- shadows
- Local techniques simplify these effects to
improve performance
24Shading
- A reflection (diffuse specular florescence)
model describes the interaction of light with a
surface, in terms of the properties of the
surface and the nature of the incident light. - Surface surface normal material (combination
of ka, kd, ks and n) - I Iaka Iikd(LN) ks (RV)n/(rk)
25Global illumination
- Global techniques provide more accuracy by
simulating light propagation among all surfaces
in a 3D world. - Local shading (Gauroud shading, Phong shading)
does not calculate global effect (shadow,
reflection, refraction, scattering, etc) - Technique
- ray tracing
- radiosity
26Projection
ViewingTransformation (WS -gt CS)
Projection
Illumination
Rasterization Clipping Display
Visibility Culling
Modeling Transformation (OS -gt WS)
Another transformation from camera space to
image space
27Projection
ViewingTransformation (WS -gt CS)
Projection
Illumination
Rasterization Clipping Display
Visibility Culling
Modeling Transformation (OS -gt WS)
Another transformation from camera space to
image space Z value is used to calculate
ratio of x y and then discarded (right after Z
buffer comparison)
28(Perspective) Projection
- The projection maps all of out 3D coordinates
onto our desired viewing plane, thus making 3D
world into an image
29Rasterization, Clipping, Display
ViewingTransformation (WS -gt CS)
Projection
Illumination
Rasterization Clipping Display
Visibility Culling
Modeling Transformation (OS -gt WS)
Final transformation from image space to
viewport coordinates Filling pixels Z buffer
(Closer objects over write farther objects)
Clipping cuts off objects outside of viewport
2D operation (filling a triangle properly)
30Scan Conversion
- Goal convert a project, clipped object into
pixels on raster lines. - Use efficient incremental methods
31Antialiasing
- Raster displays produce blocky aliasing artifacts
- Antialiasing techniques reduces the problem by
applying the theory of sampling and signal
processing
32Texture (map)
- Blinn, 1978
- Texture mapping is the process of transforming a
texture onto the surface of a three-dimensional
object. - Makes object realistic appearance, but increasing
the overall size of object (problem when
transmitted) - Bump mapping
33Other issues
- Rendering acceleration (rasterization, texture
map, spacial subdivision, collision detection,
progressive rendering, view dependent rendering,
image-based rendering,) - Anti-aliasing
- Physically based simulation
34Project 1
- What is OpenGL? Mostly recognized graphics
library - You are using OpenGL Glut only for displaying
purpose for project 1 project 4. - For term project, you may rewrite your project 1
4 using OpenGL and then add animations on top
of it.
35OpenGL
- OpenGL is strictly defined as a software
interface to graphics hardware. - It is a 3D graphics and modeling library
- variety purposes, CAD engineering, architectural
applications, computer-generated dianosaurs in
blockbuster movies - Developed by SGI
36OpenGL Library Organization
GLU
Frame Buffer
GL
OpenGL Application Program
Xlib,Xtk
GLUT
GLX
37Color
- Various color spaces provide ways to specify
colors in term of components - red, green, blue
- hue, saturation, value
- Different output devices display different
subsets of the perceptible colors
38RGB Color
- Conceptually, there are separate frame buffers
for red, green, and blue - Each pixel has separate red, green, and blue
components that corresponding to location in
memory - Typical system might be a 1028x1024 array of
pixels, each pixel might consist of 24 bits (3
bytes)
39RGB Color (cont)
- Example
- in a 24 bits example, there are 224 possible
colors which sometime refered to as 16M colors - How much frambuffer we need for a 1280x1024
pixels?
40Color in OpenGL
- glColor3f(1.0,0.0,0.0)
- this present a red color
- 3f use a RGB model, and the value of the
component is float in C.
41- Four-color(RGBA) system
- A is called alpha channel, stored in the frame
buffer as are the RGB value - The alpha value will be treated by OpenGL as an
opacity or transparency - glClearColor(1.0, 1.0, 1.0, 1.0)
- solid and white
42Indexed Color
- What happen if the size of frame buffer is not
enough,relatively to a spatial resolution given? - Many systems have frame buffers that are limited
in depth. - We can select colors by interpreting our
limited-depth pixels as indicies rather than as
color values
43Color-lookup Table
- Suppose frame buffer has k bits / pixel
- Each pixel value or index is an integer between 0
and 2k-1 - Suppose we can display colors with an accuracy of
m bits - ex k m 8, we can choose 256 colors out of 16M
44Color-lookup Table
- Input Red Green Blue
- 0 0 0 0
- 1 2m-1 0 0
- 2 0 2m-1 0
-
-
- 2k-1
m bits
m bits
m bits
45Indexed Color
Color Lookup Table
Red
A
A
Green
Color Lookup Table
Blue
Color Lookup Table
46For your inspiration.
- Electronic theater Siggraph 2001.