Presentation is loading. Please wait.

Presentation is loading. Please wait.

Ray Tracing POV Oz Levy Yulia Shnaider 06.01.2014.

Similar presentations


Presentation on theme: "Ray Tracing POV Oz Levy Yulia Shnaider 06.01.2014."— Presentation transcript:

1

2 Ray Tracing POV Oz Levy Yulia Shnaider 06.01.2014

3 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

4 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

5 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

6 background { blue 1 } camera { location look_at } light_source { color rgb } plane {, -1 pigment { color rgb } } sphere {, 1 texture { pigment { color rgb } finish{ specular 0.6 } } Surface patterns: wrinkles bumps Atmospheric effects: fog, clouds, haze, mist, rainbows and skies Show and hide options: shadows, reflection, no image, no body

7 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

8 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.

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

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

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

12 Glasses by Gilles Tran

13 Problems and Solutions Motivation 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

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

15 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

16 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…

17 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

18 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

19 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…

20 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).

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

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

23 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..

24 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

25 Thank you for listening. Any questions ?


Download ppt "Ray Tracing POV Oz Levy Yulia Shnaider 06.01.2014."

Similar presentations


Ads by Google