Download presentation
Presentation is loading. Please wait.
Published byRachel Logan Modified over 8 years ago
1
CSE 681 Introduction to Ray Tracing
2
CSE 681 Ray Tracing Shoot a ray through each pixel; Find first object intersected by ray. Image plane Eye Compute ray. (More linear algebra.) Compute ray-object intersection.
3
CSE 681 Ray Tracing For each pixel –Form ray from eye through pixel –For each object Intersection ray with object If intersection is closer than any other so far, save it –Color pixel with shade of object at point of intersection
4
CSE 681 Example
5
CSE 681 Shade of Object at Point Ambient Diffuse Specular Shadows Material properties Texture Reflections Transparency (refraction)
6
CSE 681 Diffuse Reflection Light that gets absorbed into the objects surface Gets reflected equally in all directions Need to calculate angle of incoming light to surface
7
CSE 681 Diffuse Reflection Calculate amount/color of light shining on an object. Depends on angle between light ray and surface normal.
8
CSE 681 Example: Diffuse reflection
9
CSE 681 Specular Reflection Calculate light bouncing off object to your eye; Angle of incidence = angle of reflection. Most intense at angle of reflection; falls off from there Eye Angle of incidence Angle of reflection
10
CSE 681 Example: Specular Reflection
11
CSE 681 What’s wrong with this picture?
12
CSE 681 Shadows Determine when light ray is blocked from reaching object. Ray-object intersection calculation For each pixel for each object for each light source for each object
13
CSE 681 Reflection Eye Image plane
14
CSE 681 Transparency
15
CSE 681 Transparency & Refraction Ray changes direction in transition between materials Material properties give ratio of in/out angles
16
CSE 681 Transparency & Refraction
17
CSE 681 Recursive Ray Tracing Eye Image plane
18
CSE 681 Polyhedral Models
19
CSE 681 Texture Mapping
20
CSE 681 Sampling and Aliasing Problem: Representing pixel by a single ray.
21
CSE 681 Anti-Aliasing Solution: Use multiple rays; Average values calculated by rays. Eye Image plane
22
CSE 681 Sampling and Aliasing Problem: Sampling frequency may match image frequency. Image plane Eye Viewport
23
CSE 681 Random/Stochastic Sampling Randomly sample rays through pixel. Image plane Eye Viewport
24
CSE 681 Efficiency 1280 x 1024 = 1,310,720 10 6 pixels. 10 6 initial rays. 10 6 reflection rays. Potentially 10 6 refraction rays. 3 x 10 6 shadow rays (3 lights.) Next level: Potentially 4 x 10 6 refraction/reflection rays. 1,000,000 polygons. 10 7 x 10 6 = 10 13 ray-polygon intersection calculations.
25
CSE 681 Intersection Data Structures 1.Coarse test to see if ray could *possibly* intersection object 2.Divide space up - sort objects into spatial buckets – trace ray from bucket to bucket
26
CSE 681 Bounding Boxes
27
CSE 681 Spatial Subdivision
28
CSE 681 Theory: sampling the environment 1.Rendering as sampling problem 2.Expected value & variance 3.Techniques to efficiently reduce variance
29
CSE 681 Major Course Topics Object & coordinate transformations. Ray-object intersections. Diffuse & specular reflection. Shadows. Opacity & refraction. Shadows. Recursive ray tracing. Polyhedral models. Texture mapping. Anti-aliasing and sampling. Bounding boxes and spatial subdivision. Sampling theory.
Similar presentations
© 2024 SlidePlayer.com Inc.
All rights reserved.