Presentation is loading. Please wait.

Presentation is loading. Please wait.

Distributed Ray Tracing

Similar presentations


Presentation on theme: "Distributed Ray Tracing"— Presentation transcript:

1 Distributed Ray Tracing
CS 655 Distributed Ray Tracing

2 Distributed Ray Tracing
What is distributed ray tracing? Distributed ray tracing is not ray tracing on a distributed system. Distributed ray tracing is a ray tracing method based on randomly distributed oversampling to reduce aliasing artifacts in rendered images. Also called “distribution ray tracing” or “stochastic ray tracing” (The images in this presentation are from Andrew G. Zaferakis, Aneesh Naman, Allen Martin, Daqing Xue, Henrik Wann Jensen, and Jinho Lee)

3 Distributed Ray Tracing
Idea: Introduce noise into the ray tracer to minimize visual artifacts such as aliasing, perfect reflections, etc. Stocastically distribute rays over: Space – antialiases the image Reflection angle – produces glossy reflections Transmission angle – produces translucency Shadow ray – produces soft shadows (penumbra) Lens area – produces depth of field Time – produces motion blur

4 Antialiasing The human eye samples using a Poisson disk distribution:
A finite number of photoreceptors Cones in the eye are distributed stochastically, but such that no two cones are closer than a certain distance

5 Antialiasing We can apply this approach to ray tracing
Send out rays stochastically, but such that they maintain a Poisson disk distribution This reduces aliasing, but is expensive to compute However, we can approximate a Poisson disk distribution fairly quickly Idea: begin with a regular grid Jitter the ray locations slightly within the grid

6 Uniform Sampling Prone to aliasing in the image

7 Jittered Sampling Antialiases the image

8 Jittered Sampling Approximates a Poisson disk distribution
Not exact, but much cheaper Removes high frequencies Introduces noise in place of high frequencies Can still have problems May leave large areas uncovered by samples May have some areas with more samples than necessary

9 Improved Jittered Sampling
To improve the image further, send out multiple jittered rays per pixel Make the number of sub-pixels easily changeable – start small then increase as you are confident your ray-tracer works. Similarly for all other pixels

10 Standard Ray Tracing No antialiasing

11 Distributed Ray Tracing
With antialiasing

12 Standard Ray Tracing - detail
No antialiasing

13 Distributed Ray Tracing - detail
With antialiasing

14 Glossy Reflections We can use the concept of ray jittering to produce glossiness (blurred reflections) Tracing a ray based on perfect reflection angle produces sharp reflections N I R

15 Glossy Reflections We can create a blurred reflection by sending out jittered rays about the reflection ray N R I Bound of jittered reflection rays

16 Glossy Reflections This has the effect of “blurring” the reflection
The exact reflection vector is computed, then slightly jittered from the original direction The jittered ray may hit an entirely different object than the one hit by the true reflection ray This gives a smoothly blurred reflection

17 Reflections – Standard Ray Tracer
Perfect reflection

18 Reflections – Distributed Ray Tracer
10 distributed rays

19 Reflections – Distributed Ray Tracer
20 distributed rays

20 Reflections – Distributed Ray Tracer
50 distributed rays

21 Standard Ray Tracing Perfect reflections

22 Glossy reflections 4 rays

23 Glossy reflections 16 rays

24 Glossy reflections 64 rays

25 Translucency We can also apply the concept of ray jittering to produce translucency (blurred transmissions) Tracing a ray based on perfect transmission angle produces sharp transparencies N I T

26 Translucency N I Jittering the rays about the actual transmission angle produces a blurred effect T Bound of jittered reflection rays

27 Transmissions – Standard Ray Tracer
Perfect transmission

28 Transmissions – Distributed Ray Tracer
10 transmission rays

29 Transmissions – Distributed Ray Tracer
20 transmission rays

30 From Jia, Sun, and Xu

31 Soft Shadows We have been simulating lights with point light sources
This produces hard shadows Point light source -hard shadow

32 Soft Shadows Lights in the real world are not point light sources, thus the shadows are not sharp Area light source umbra penumbra Area light source -soft shadow

33 Soft Shadows The penumbra is the portion of the shadow resulting from partially obscured lights To simulate penumbra: Send out multiple shadow rays from the intersection point to the area light source Jitter the rays according to the area light source The intensity of the surface point depends on the number of jittered rays that reach the light source Area light source Bounds of jittered shadow rays Occluding object Intersection point

34 Hard Shadows

35 Soft Shadows

36 Standard Ray Tracing Hard shadows

37 Ray Tracing with an Area Light Source
Visible penumbra and umbra, but too distinct

38 Distributed Ray Tracing
10 rays per pixel

39 Distributed Ray Tracing
20 rays per pixel

40 Distributed Ray Tracing
50 rays per pixel

41 Depth of Field Idea: the camera (or eye) should have a fixed focal length Objects at that distance should be in focus Objects closer or further away should not be in focus Lens Image Plane Focal Plane

42 Lens Properties D VD r Vp P PD Pf C F/n Object in Scene Lens Image
Plane Focal Plane

43 Lens Properties F: Focal length n: aperture number F/n: lens diameter
Pf: the focal point P: distance from lens to focal point Vp: distance from lens to image plane PD: a point not on the focal plane D: distance from lens to PD r: radius of cone for object at distance D C: circle of confusion Image Plane Lens Focal P D Vp VD C F/n r Object in Scene PD Pf

44 Simulating a lens Approach 1:
For an object located at PD, send out a group of jittered rays that lie within a cone of radius r How do we compute r? This simulates a lens without actually having one, but isn’t very accurate

45 Simulating a lens Approach 2: Find the focal point
Send a ray from the center of the lens (eye point) through the screen and follow it a distance P Choose a jittered point on the lens Trace a ray from that jittered point through the focal point Return intensity information based on what that ray hits

46 Simulating a lens Step 1 – determine the focal point by tracing a ray from the lens center through the pixel a distance P

47 Simulating a lens Step 2 – Choose a jittered point on the lens
New point

48 Simulating a lens Step 3 – Trace the ray from the new point through the focal point

49 Simulating a lens Step 4 – Return the intensity information

50 Depth of Field Example

51 Depth of Field Example From Alan Watt, “3D Computer Graphics”

52

53 Motion Blur Distribute rays over time How:
Static objects will not change Moving objects will be blurred, depending on their velocity How: Jitter the rays with respect to time Determine object positions at each of the jittered time values Send each ray with the objects positioned appropriately Combine the rays back into one to get the motion blurred object

54 Motion Blur Example (from Cook et. al.)

55

56 Summary of Distributed Ray Tracing
For each ray do: Jitter the spatial screen location of the ray Select a time for the ray and move the objects to that time Perform depth of field calculation: Determine the focal point by sending a ray from the eye point (center of the lens) through the pixel, a distance P Determine a lens location by jittering the origin of the ray to a position on the lens Compute the intersection by sending the primary ray from the jittered location through the focal point Trace jittered reflection rays Trace jittered trasmission rays Trace jittered shadow rays

57 Summary of Distributed Ray Tracing
Shadow Ray Reflected Ray Transmitted Ray

58 Distributed Ray Tracing (Cook et.al.)


Download ppt "Distributed Ray Tracing"

Similar presentations


Ads by Google