Download presentation
Presentation is loading. Please wait.
Published byAngel Ramsey Modified over 9 years ago
1
Graphics Graphics Lab @ Korea University cgvr.korea.ac.kr 1 Surface Rendering Methods 고려대학교 컴퓨터 그래픽스 연구실
2
CGVR Graphics Lab @ Korea University cgvr.korea.ac.kr 2 Surface Rendering: Shading Determine a Color for Each Filled Pixel How to Choose a Color for Each Filled Pixel Each illumination calculation for a ray from the eyepoint through the view plane provides a radiance sample
3
CGVR Graphics Lab @ Korea University cgvr.korea.ac.kr 3 Shading Methods Ray Casting Polygon Shading Ray Tracing Radiosity
4
CGVR Graphics Lab @ Korea University cgvr.korea.ac.kr 4 Ray Casting Simplest Shading Approach Perform independent lighting calculation for every pixel
5
CGVR Graphics Lab @ Korea University cgvr.korea.ac.kr 5 Polygon Shading Can Take Advantage of Spatial Coherence Illumination calculations for pixels covered by same primitive are related to each other
6
CGVR Graphics Lab @ Korea University cgvr.korea.ac.kr 6 Polygon Shading Algorithms Flat Shading Gouraud Shading Phong Shading
7
CGVR Graphics Lab @ Korea University cgvr.korea.ac.kr 7 Polygon Shading Algorithms Flat Shading Gouraud Shading Phong Shading
8
CGVR Graphics Lab @ Korea University cgvr.korea.ac.kr 8 Flat Shading Illuminated only by directional light sources Diffuse or viewed from infinitely far away
9
CGVR Graphics Lab @ Korea University cgvr.korea.ac.kr 9 Flat Shading One Illumination Calculation per Polygon Assign all pixels inside each polygon the same color
10
CGVR Graphics Lab @ Korea University cgvr.korea.ac.kr 10 Flat Shading Objects Look Like They are Composed of Polygons OK for polyhedral objects Not so good for ones with smooth surfaces
11
CGVR Graphics Lab @ Korea University cgvr.korea.ac.kr 11 Polygon Shading Algorithms Flat Shading Gouraud Shading Phong Shading
12
CGVR Graphics Lab @ Korea University cgvr.korea.ac.kr 12 Gouraud Shading Smooth Surface Represented by polygonal mesh with a normal at each vertex
13
CGVR Graphics Lab @ Korea University cgvr.korea.ac.kr 13 Gouraud Shading One Lighting Calculation per Vertex Assign pixels inside polygon by interpolating colors computed at vertices ViewerLight N1N1 N3N3 N2N2 V1V1 L1L1 Polygon
14
CGVR Graphics Lab @ Korea University cgvr.korea.ac.kr 14 Gouraud Shading Bilinearly Interpolate Colors at Vertices Down and Across Scan Lines I1I1 I2I2 I3I3
15
CGVR Graphics Lab @ Korea University cgvr.korea.ac.kr 15 Gouraud Shading Smooth Shading over Adjacent Polygons Curved surfaces Illumination highlights Soft shadows Mesh with shared normals at vertices
16
CGVR Graphics Lab @ Korea University cgvr.korea.ac.kr 16 Gouraud Shading Produces Smoothly Shaded Polygonal Mesh Piecewise linear approximation Need fine mesh to capture subtle lighting effects Flat ShadingGouraud Shading
17
CGVR Graphics Lab @ Korea University cgvr.korea.ac.kr 17 Polygon Shading Algorithms Flat Shading Gouraud Shading Phong Shading
18
CGVR Graphics Lab @ Korea University cgvr.korea.ac.kr 18 Phong Shading What if Polygonal Mesh is too Coarse to Capture Illumination Effects in Polygon Interiors? ViewerLight N1N1 N3N3 N2N2 V1V1 L1L1 Polygon
19
CGVR Graphics Lab @ Korea University cgvr.korea.ac.kr 19 Phong Shading One Lighting Calculation per Pixel Approximate surface normals for points inside polygons by bilinear interpolation of normals from vertices ViewerLight N1N1 N3N3 N2N2 VL Polygon N
20
CGVR Graphics Lab @ Korea University cgvr.korea.ac.kr 20 Phong Shading Bilinearly Interpolate Normals at Vertices Down and Across Scan Lines αβ γ N1N1 N2N2 N3N3
21
CGVR Graphics Lab @ Korea University cgvr.korea.ac.kr 21 Phong Shading Gouraud Wireframe Phong Flat
22
CGVR Graphics Lab @ Korea University cgvr.korea.ac.kr 22 Shading & Subdivision GouraudPhongFlat Loop Subdivision Level 1 Level 2 Control Mesh
23
CGVR Graphics Lab @ Korea University cgvr.korea.ac.kr 23 Shading Methods Ray Casting Polygon Shading Ray Tracing Radiosity
24
CGVR Graphics Lab @ Korea University cgvr.korea.ac.kr 24 Ray Tracing Extension of Ray Casting Look for the visible surface for each pixel Continue to bounce the ray around the scene
25
CGVR Graphics Lab @ Korea University cgvr.korea.ac.kr 25 Ray Tracing Global Illumination Shadows Refractions Inter-object reflections Highly Realistic vs. Computation Time Transparency Reflectance Shadow
26
CGVR Graphics Lab @ Korea University cgvr.korea.ac.kr 26 Basic Ray Tracing Algorithm For Each Pixel Ray Primary ray Test each surface if it is intersected Intersected: Secondary ray Reflection ray Transparent – Refraction ray
27
CGVR Graphics Lab @ Korea University cgvr.korea.ac.kr 27 Basic Ray Tracing Algorithm For Each Pixel Ray Primary ray Test each surface if it is intersected Intersected: Secondary ray Reflection ray Transparent – Refraction ray
28
CGVR Graphics Lab @ Korea University cgvr.korea.ac.kr 28 Ray Tracing Tree Ray tree represents illumination computation One branch reflection The other branch transmission Terminated reach the preset maximum or strike a light source SceneRay Tree
29
CGVR Graphics Lab @ Korea University cgvr.korea.ac.kr 29 Ray Tracing Tree Pixel intensity Sum of intensities at root node Start at terminal node If no surfaces are intersected, the intensity of background SceneRay Tree I back I pixel
30
CGVR Graphics Lab @ Korea University cgvr.korea.ac.kr 30 Shading Methods Ray Casting Polygon Shading Ray Tracing Radiosity
31
CGVR Graphics Lab @ Korea University cgvr.korea.ac.kr 31 Radiosity Goal Simulate diffuse inter-object reflections and shadows
32
CGVR Graphics Lab @ Korea University cgvr.korea.ac.kr 32 Radiosity Basic Idea Treat every polygon as light source
33
CGVR Graphics Lab @ Korea University cgvr.korea.ac.kr 33 Radiosity Advantages Physically models shadows and indirect diffuse illumination Independent of any viewpoint Equation B i = Radiosity of patch i E i = Emission of patch i ρ i = Reflectivity of patch i F i = Form-factor between patches i and j
34
CGVR Graphics Lab @ Korea University cgvr.korea.ac.kr 34 Form Factors Definition Fraction of energy leaving patch j that arrives at patch i Computation Project onto unit hemisphere Project onto unit circle base Divide by area of circle Project scene onto hemi-cube Project onto unit hemisphere Project onto Hemi-cube
35
CGVR Graphics Lab @ Korea University cgvr.korea.ac.kr 35 Matrix Solution Methods Matrix Formulation Progressive Refinement Iterate shoot radiosity from patches O(n 2 ) computation, but get pretty good solutions more quickly
36
CGVR Graphics Lab @ Korea University cgvr.korea.ac.kr 36 Matrix Solution Methods 24 iterations 1 iteration 100 iterations 2 iterations
37
CGVR Graphics Lab @ Korea University cgvr.korea.ac.kr 37 Hierarchical Radiosity Multiresolution Computation Substructure patches into quad-tree Transfer energy using lower resolution mesh elements if can do so within error tolerance O(n) computation
38
CGVR Graphics Lab @ Korea University cgvr.korea.ac.kr 38 Ray Tracing & Radiosity Dilemma: Radiosity is good at diffuse inter-object reflection Ray tracing is good at specular inter-object reflection Combine them Example: compute diffuse inter-object reflections in a ray tracer Monte Carlo methods
39
CGVR Graphics Lab @ Korea University cgvr.korea.ac.kr 39 Summary Ray Casting Flat Gouraud Phong Ray Tracing Radiosity Less Expensive More Accurate
40
CGVR Graphics Lab @ Korea University cgvr.korea.ac.kr 40 Visible-Line Determination
41
CGVR Graphics Lab @ Korea University cgvr.korea.ac.kr 41 Visible-Surface Determination with Ambient Illumination only
42
CGVR Graphics Lab @ Korea University cgvr.korea.ac.kr 42 Individually Shaded Polygons with Diffuse Reflection
43
CGVR Graphics Lab @ Korea University cgvr.korea.ac.kr 43 Gouraud Shaded Polygons with Diffuse Reflection
44
CGVR Graphics Lab @ Korea University cgvr.korea.ac.kr 44 Gouraud Shaded Polygons with Specular Reflection
45
CGVR Graphics Lab @ Korea University cgvr.korea.ac.kr 45 Phong Shaded Polygons with Specular Reflection
46
CGVR Graphics Lab @ Korea University cgvr.korea.ac.kr 46 Curved Surfaces with Specular Reflection
47
CGVR Graphics Lab @ Korea University cgvr.korea.ac.kr 47 Improved Illumination Model and Multiple Lights
48
CGVR Graphics Lab @ Korea University cgvr.korea.ac.kr 48 Texture Mapping
49
CGVR Graphics Lab @ Korea University cgvr.korea.ac.kr 49 Displacement Mapping
50
CGVR Graphics Lab @ Korea University cgvr.korea.ac.kr 50 Reflection Mapping
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.