Ray Tracing: Presented By: Mugdha Chhaparwal Roll No. 22
Ray Tracing: Presented By: Mugdha Chhaparwal Roll No. 22
PRESENTED BY:
MUGDHA CHHAPARWAL
ROLL NO. 22
IF NOT Ray
Ray Tracing
Tracing??
If we consider the line of In Ray tracing, instead of
sight from a pixel identifying for visible
position on the view surface for each pixel, we
plane through a scene, continue to bounce the
we can determine which ray around the picture.
objects in the scene
intersect this line. When ray bounces, it
contributes to intensity
From the intersection for that surface.
points with different
object, we can identify This technique is useful
the visible surface as the for obtaining global
one whose intersection reflection and
point is closest to the transmission effects.
pixel.
General
Ray tracing
Pixel positions are
designated in x-y plane.
Projections reference point
lie on z axis.
With is coordinate system,
the contributions to a pixel
is determined by tracing a
light path BACKWARD from
the pixel to the picture.
For each pixel ray, each
surface is tested, which
arises following cases:
Ray Tracing
If surface is intersected:
(i) Smallest distance between pixel to surface
intersection point identifies the visible surface for
that pixel.
(ii) Once visible surface identified, ray is reflected off
the visible surface along a specular path where ∠i
=∠r.
u = Ppixel – Pprp
| Ppixel – Pprp |
S = u. P +-
√(u. P)2 - | P|2+r2
ANTIALIASED RAY TRACING
Aliasing is used to define
jagged edges i.e.
boundaries are not that
sharp, reflections are not
that perfect and things
can be in and out of
focus.
Three techniques are
used to perform
Antialiased ray tracing.
In these, pixel is treated
Adaptive Sampling:
◦ Compute the intensity
variation between the four
corners with the average
◦ Shoot more rays through
corners with higher intensity
variation
◦ Compute final color as a
weighted average rather than
the regular average
Distributed Ray tracing
/ Stochastic sampling:
• Is based on randomly
distributed rays over the pixel
area used to reduce aliasing
effect.
• Multiple samples are taken and
averaged together.
• Random distribution of a
number of a number of rays
over the pixel surface is
achieved by Jittering.
• Initially pixel area is divided
into 16 subareas. Then random
positions are obtained by
jittering the center coordinates
of each sub pixel area by small
amounts( ∂x and ∂y)
ADVANTAGES OF RAY TRACING