Ray tracing

Post on 17-Feb-2017

16 views 0 download

transcript

RAY TRACINGPresented By

Muhammad Azam SohuFarhana Shaikh

RAY TRACING• Ray Tracing is an advanced technique for

adding realism to an image by including refraction, reflection, color intensity, and shadows that would be produced by having one or more light sources.

• This means you can create pictures full of mirrors, transparent surfaces, and object shadows, with stunning results.

Ibn al-Haytham - The Nature of Light and Vision

Ibn al-Haytham was the first to explain that we see objects because the rays of light can reflected from objects into our eyes. Two interesting remarks can be made based on his observations: * Firstly, without light we cannot see anything and * Secondly, without objects in our environment, we cannot see light.

Compared to the total number of rays reflected by an object, only a select few of them will ever reach the surface of our eye.

Nature of light and Ray Traced Image

Backward Ray Tracing

A ray tracing program mathematically identifies and reproduces the path that each light ray follows in reverse direction from the eye back to its point of origin.

Shadow in Ray TracingIn the figure we see two rays: a and b, which intersect the purple sphere. To determine the color of a, we follow the new ray a' directly towards the light source. The color of a will then depend on several factors. b will be shadowed because the ray b' towards the light source is blocked by the sphere itself.

Reflection And Refraction in Ray Tracing

To handle reflection we also consider multiple bounces from objects, and to handle refraction we consider what happens when

a ray passes through a partially- or fully-transparent object.

Basic Ray Tracing AlgorithmFor every pixel { Cast a ray from the eye for every object in the scene Find intersections with the rayKeep it if closest } Compute color at the intersection point

Advantages Of Ray Tracing* It provides a realistic simulation of lighting.* Effects such as reflections and shadows are a natural result of the ray tracing algorithm.

Disadvantages Of Ray Tracing* A serious disadvantage of ray tracing is performance because it treats each eye ray separately.* Advanced lighting effects such as caustics are difficult to render usin ray tracing.

If any question ?U may ask..