1 / 30

Ray Tracing

Learn the basics of ray tracing, a technique for rendering complex light interactions, including reflections, refractions, and shadows, with impressive results. Understand the concept of shading and explore different types of ray tracing methods. Discover the challenges and solutions in ray-object intersections and the importance of color, shading, and texture mapping. Gain insights into rendering effects and learn about the precision and aliasing issues in ray tracing.

threatt
Download Presentation

Ray Tracing

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Ray Tracing Lecture 4 375-CS

  2. Ray Tracing • ay tracing is a technique for rendering three-dimensional graphics with very complex light interactions. This means you can create pictures full of mirrors, transparent surfaces, and shadows, with stunning results. We discuss ray tracing in this introductory graphics article because it is a very simple method to both understand and implement. It is based on the idea that you can model reflection and refraction by recursively following the path that light takes as it bounces through an environment 

  3. What is Shading? • Shading is the process in rendering that consists of computing the color of objects in the 3D scene. In rendering we are interested in reproducing the shape, the visibility and the appearance of objects as seen from a given viewpoint. The visibility part of the rendering process deals with shape and the visibility problem.

  4. Introduction to Ray- Tracing • Basic Setup

  5. Introduction to Ray-tracing Modeling Rendering

  6. Properties of Light Rays • Light Travels in Straight Lines. • Two Light rays do not interfere with each other if they cross. • Light rays travel from light source to the eye, but physics for path reversal is same.

  7. Light Object Intersection • Reflection and Refraction • Just as shadows are easily handled, so are reflection and refraction. In the above example, we only considered a single bounce from the eye to the light source. 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. 

  8. Light Object Intersection • Specular v/s Diffusion A specular reflection is what you get from a polished surface, or mirror. It is clear, and you can see "through" the mirror.A diffuse reflection is what you get from a white wall. The light is bounced of it, but in random directions so you cannot see the light source in the reflection.

  9. Types of Ray Tracing • Forward Ray Tracing Forward ray tracing follows the light particles (photons) from the light source to the object. 

  10. Types of Ray Tracing • Backward Ray Tracing o make ray tracing more efficient, the method of backward ray tracing is introduced. 

  11. Types of Ray Tracing • Hybrid ray tracing Since both forward ray tracing and backward ray tracing have their drawbacks, recent research tries to develop hybrid solutions that will compromise speed and accuracy. 

  12. Types of Ray Tracing • Hybrid ray tracing. • Heckbert (1990). backward ray tracing + forward ray tracing + storage on surface. • Veach (1995). backward ray tracing + forward ray tracing + connecting lines.

  13. Intersections • One of the basic routine needed by the ray tracer is an intersection routine for each type of object in the scene: one for spheres, one for cubes , one for cones, one for polygons and so forth. • If ray-object intersections occur, objects intersection routine returns the distance of intersection point from the origin of the ray, the normal vector at the point of intersection and if texture mapping is used , a coordinate mapping between the intersection point and textured image. • Distance is used to choose the closest intersection point. • Normal vector is used to determine the shade at the point, since it describes which direction the surface is faced and therefore how much light the point receives, called cosine shading.

  14. Color and Shading and Texture Mapping • Flat Shading. • Cook-Torrance method. • Lambertian Shading / Cosine Shading. computes the angle between the intersection point and the normal vector of the surface, to determine the shading of the surface at that point. Ambient Coefficient, Diffuse Coefficient their importance. • Assigning an entire image to an object instead of a single color is Texture mapping.

  15. Ray tracing • Ray tracing is a method for calculating the path of waves or particles through a system. The method is practiced in two distinct forms: • Ray tracing (physics), which is used for analyzing optical and other systems • Ray tracing (graphics), which is used for 3D image generation

  16. Rendering Effects Created by Ray Tracing Shadowing Shading is the process in rendering that consists of computing the color of objects in the 3D scene

  17. Rendering Effects Created by Ray Tracing Rendering or image synthesis is the process of generating an image from a 2D or 3D model (or models in what collectively could be called a scene file) by means of computer programs.

  18. Rendering Effects Created by Ray Tracing Transparency

  19. Rendering Effects Created by Ray Tracing Refraction

  20. Precision Problem-the Self Shadowing Problem Passing a flag to the recursive routine to tell a point is on the surface or not. Assuming that all rays start with a tolerance(say 0.000001 inches) of the surface of the primitive shape.

  21. Aliasing • What is Aliasing. • Types of Aliasing. Temporal Aliasing. Due to limitations of eye. Spatial Aliasing. Missing of object falling between two rays. • Anti Aliasing.

  22. Types of Anti-Aliasing Techniques • Super Sampling • Adaptive Super Sampling / Monte-Carlo Sampling • Stochastic Ray Tracing/ Distributed Ray Tracing • Statistical Super sampling

  23. Optimization • Need for Optimization Ray Tracing is computationally intensive process. Eg: The film ToyStory with 110,000 frames, took 46 days to render on 117 Sun Sparc 20’s. • Time taken for Ray tracing Number of Objects x number of rays.

  24. Accelerating Ray Tracing • Use faster machines. • Use specialized hardware, especially parallel processors. • Reduce the total number of rays that need to intersect with the world. • Reduce the number of Ray-Object intersections.

  25. Image Synthesis Image synthesis is the process of creating images. This processing prepares the environment for rendering through such things as the propagation of energy throughout the environment or optimizations for display.

  26. Sampling techniques • What is sampling? A shortcut method for investigating a whole population Data is gathered on a small part of the whole parent population or sampling frame, and used to inform what the whole picture is like • Why sample? In reality there is simply not enough; time, energy, money, labour/man power, equipment, access to suitable sites to measure every single item or site within the parent population or whole sampling frame. Therefore an appropriate sampling strategy is adopted to obtain a representative, and statistically valid sample of the whole.

  27. Sampling techniques Three main types of sampling strategy: • Random • Systematic • Stratified Within these types, you may then decide on a; point, line, area method.

  28. Antialiasing • Antialiasing is the smoothing of the image or sound roughness caused by aliasing . With images, approaches include adjusting pixel positions or setting pixel intensities so that there is a more gradual transition between the color of a line and the background color. 

  29. Aliasing • If we sample at too low a rate, the high frequencies in the image appear as lower frequencies. • How do we fix it? • Increase sampling • Remove high frequencies

  30. Antialiasing Antialiasing is the smoothing of the image or sound roughness caused by aliasing . With images, approaches include adjusting pixel positions or setting pixel intensities so that there is a more gradual transition between the color of a line and the background color. 

More Related