Presentation is loading. Please wait.

Presentation is loading. Please wait.

Raycasting (animated gif). Image Formation (Forward) Ray Tracing(Backward) Ray Tracing.

Similar presentations


Presentation on theme: "Raycasting (animated gif). Image Formation (Forward) Ray Tracing(Backward) Ray Tracing."— Presentation transcript:

1 Raycasting (animated gif)

2 Image Formation (Forward) Ray Tracing(Backward) Ray Tracing

3 Shadow Ray When the ray hits an object, a secondary ray, ("shadow" ray), is shot towards the light sources Determine if that point on the object is in a shadow. If this shadow ray hits another object before it hits a light source, then the first intersection point is in the shadow of the second object. Only apply the ambient term for that light source at the point of intersection

4 Reflected Ray When a ray hits an object, a reflected ray is generated and tested against all of the objects in the scene. If the reflected ray hits an object then a local illumination model is applied at the point of intersection and the result is carried back to the first intersection point.

5 Transmitted Ray If the intersected object is transparent, then a transmitted ray is generated and tested against all the objects in the scene. If the transmitted ray hits an object then a local illumination model is applied at the point of intersection and the result is carried back to the first intersection point.

6 Ray Tree The reflective and/or transmitted rays are continually generated until the ray leaves the scene without hitting any object or a preset recursion level has been reached. This then generates a ray tree. DEMO

7

8 Example

9 Ray Trace vs. Rasterization

10 AABB tree

11 How can AABB Tree Help Tracing

12 Fast Ray-AABB Overlap Tests with Plucker Coordinates Mahovsky and Wyvill [2003]2003

13 Standard Method Ray (O,D) y=y0 y=y1 Similarly,

14 0 t 0 t

15 Ray vs. Directed Line CW CCW Here, it is looking from the head of ray

16 Ray-Polygon Intersection with Plucker Coordinates

17 MMM Ray vs. AABB Represent a line this way … is the Plucker coordinate way (MMM: minus,minus,minus) x z

18 Hw: XXX Ray vs. AABB 想想若是 ray 來自其他方位,該如何測試 ?


Download ppt "Raycasting (animated gif). Image Formation (Forward) Ray Tracing(Backward) Ray Tracing."

Similar presentations


Ads by Google