1 / 24

Ray Tracing POV

Ray Tracing POV. Oz Levy Yulia Shnaider 06.01.2014. What is Ray Tracing?. A method of creating visual art in which a description of an object or scene is mathematically converted into a picture

chaka
Download Presentation

Ray Tracing POV

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 POV Oz Levy YuliaShnaider 06.01.2014

  2. What is Ray Tracing? • A method of creating visual art in which a description of an object or scene is mathematically converted into a picture • Ray tracing is capable of simulating a wide variety of optical effects, such as reflection and refraction, scattering, and dispersion phenomena

  3. Persistence Of Vision – Ray (POV-Ray) • A three dimensional rendering free and open source software • The program derives information from an external text file, that contains the description of the scene • Scenes in ray tracing are described mathematically by a programmer or may also incorporate data from digital photography

  4. Example for input: • To create a scene we will need: objects, light sources, camera • The objects are defined mathematically or using an image, several types of cameras, sources of lights • Examples for types of light sources: point light, spotlight,  cylindrical, spotlight, parallel light, area light, soft shadows

  5. Surface patterns: wrinkles bumps • Atmospheric effects: fog, clouds, haze, mist, rainbows and skies • Show and hide options: shadows, reflection, no image, no body background { blue 1 } camera { location <0.0, 0.5, -4.0> look_at <0.0, 0.0, 0.0> } light_source { <-30, 30, -30> color rgb <1, 1, 1> } plane { <0, 1, 0>, -1 pigment { color rgb <0, 1, 0> } } sphere { <0, 0, 0>, 1 texture { pigment { color rgb <1, 1, 0> } finish{ specular 0.6 } } }

  6. Next stage - Rendering • Calculating per pixel • The algorithm works line by line with an horizontal scan of each pixel • The direction of the rays is opposite to the physical direction – no calculations for the rays that will not reach our point of sight

  7. Illustration For each pixel in the image we “shoot” a ray through the pixel until it heats one of the objects, from there we direct rays to all the light sources and use superposition to get the final value for that specific pixel.

  8. Work flow Input file Parsing Tracing Video\file Output line Last line? Distant shores by Christoph Gerber End

  9. A few examples: Norbert Kern for the International Ray Tracing Competition

  10. Still with Bullets by Jaime Vives Piqueres Call of the Wild by Gilles Tran

  11. Glasses by Gilles Tran

  12. Problems and SolutionsMotivation to Parallelization • Determining the color of each pixel requires a large amount of calculations depending on the complexity of the scene • Antialiasing – a method of calculation in which we consider not only basic calculations but also the relationship and compatibility of the pixel to the nearby pixels • The algorithm we described enables working in an embarrassingly parallel method

  13. Now that the motivation is cleared… • What are we going to talk about now ? • Approaches to parallelize • Results

  14. Static Partitioning • Each node is assigned a section of the line to elaborate • They send it to a master processor that, after processing its section, reconstructs the complete line • This procedure is repeated up to the last line of the image

  15. This approach assumes that all processors are similar… • In fact a line is completed only when the slowest processor finishes the computation of its section while the faster processors remain idle • Wasting useful time of elaboration…

  16. Second Approach • The load of each process is dynamically balanced • More work is assigned to the faster processes • In this way we try to find a solution to the slower process limitation, optimizing the use of each processor

  17. Each line of the image is now divided into a number of sections greater than the number of the available processes • Initially each processor is assigned a single section of the line to be computed • Here, the master process does not have any section to elaborate. It has the task to assign a new section to the first process that end its work • The procedure is iterated, also in this case, line after line

  18. Disadvantages… • In antialiasing approach, each slave has to know the complete line previously elaborated and some information concerning the antialiasing of the same line (all this is sent from the master) • Getting complicated…

  19. Tests and Results • The examples have been tested on: • The distributed architecture ParMa2(composed of four Dual Pentium II 450 MHz interconnected by a 100Mbit/s switched Fast Ethernet network, forming an 8-processor system) • A commercial multiprocessor machine: SGI Onix2 (with 8 R10000 195 MHz processors).

  20. :FOR THE STATIC PARTITIONING - Linear speedup -The best time is obtained with ParMa2.

  21. :FOR THE DYNAMIC - speedup and performances are better for the Onix2

  22. Additional aspects to Parallel Computing • Divide by frames (in video, animation) • Divide by areas in the image (depends on optical/graphical parameters) • “Superposition” of two light sources..

  23. REFERENCES 1) MPIPOV: a Parallel Implementation of POV-Ray Based on MPI Alessandro Fava1, Emanuele Fava1, and Massimo Bertozzi21 Dipartimento di Ingegneria Industriale, Universit`a di Parma Parco Area delle Scienze 181/A, I-43100 Parma, Italy 2) Dipartimento di Ingegneria dell’Informazione, Universit`a di Parma Parco Area delle Scienze 181/A, I-43100 Parma, Italy bertozzi@ce.unipr.it 3) Wikipedia

  24. Thank you for listening.Any questions ?

More Related