0% found this document useful (0 votes)
51 views15 pages

Ray Tracing: Presented By: Mugdha Chhaparwal Roll No. 22

Ray tracing is a technique for generating an image by tracing the path of light through pixels in an image plane and simulating the effects of its encounters with virtual objects. It works by tracing the path of imaginary rays emitted from the viewpoint or camera, through each pixel in the viewport, and into the scene. The color and brightness of each pixel is determined by where the ray intersects scene objects. Ray tracing can produce realistic images with effects like reflections, refractions, and shadows. It is useful for obtaining global illumination effects.
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
51 views15 pages

Ray Tracing: Presented By: Mugdha Chhaparwal Roll No. 22

Ray tracing is a technique for generating an image by tracing the path of light through pixels in an image plane and simulating the effects of its encounters with virtual objects. It works by tracing the path of imaginary rays emitted from the viewpoint or camera, through each pixel in the viewport, and into the scene. The color and brightness of each pixel is determined by where the ray intersects scene objects. Ray tracing can produce realistic images with effects like reflections, refractions, and shadows. It is useful for obtaining global illumination effects.
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 15

RAY TRACING

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.

 Secondary ray: The ray reflected from the visible


surface or passed through the transparent surface in
refraction direction.

 The ray after reflection/refraction strikes another


visible surface recursively producing Ray Tracing
Tree.
Binary Ray Tracing Tree
 Recursion depth is
determined by the
amount of storage
available or by the
user.
 Ray path is terminated
when predetermined
depth is reached or the
ray strikes a light
source.
 The surface intensities
of all the nodes are
added traversing the
tree from bottom to
top to determine pixel
intensity.
Unit vectors for Reflected light intensity
calculations
 Path along L is called
Shadow Ray.
 Specular reflection:
R= u – (2u.N)N
 In transparent material,
intensity contribution
ni
T   cos r  n   u   cos i  n 
nr
ni n 
 u   i  cos i  n   cos r  n 
nr  nr 
ni  n 
 u   cos r  i cos i n
nr  nr 
Ray Surface Intersection Calculations
Ray equation:
P = Po + s.u
Ray equation gives the
coordinates of any point P
along the ray path at a
distance s from Po.

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

as finite square area


instead of single point.
 Super Sampling:
• Instead of shooting one ray
per pixel, shoot four rays
through the corners of a
pixel.
• Color at the pixel is the average
of the colors at each corners.

 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

You might also like