Presentation is loading. Please wait.

Presentation is loading. Please wait.

Project Raytracing. Content Goals Idea of Raytracing Ray Casting – Therory – Practice Raytracing – Theory – Light model – Practice Output images Conclusion.

Similar presentations


Presentation on theme: "Project Raytracing. Content Goals Idea of Raytracing Ray Casting – Therory – Practice Raytracing – Theory – Light model – Practice Output images Conclusion."— Presentation transcript:

1 Project Raytracing

2 Content Goals Idea of Raytracing Ray Casting – Therory – Practice Raytracing – Theory – Light model – Practice Output images Conclusion

3 Specifications Ray tracer depends on how to represent objects Parametric equation for precision, not rapidity Develop a Ray Tracer in order to explore a new intersection algorithm Two teams : - for mathematics - for code

4 Main principle Create 3D pictures Mathematical equation Throw ray from eye to pixels Not FROM source light: TO it Number of reflections Great pictures but slow

5 Algorithms Ray casting - first method - no bounce Ray tracing - from eye to pixels - reflection - refraction - shadow

6 Fields of use Animation studio Pixar: with parsimony → light effects Video games → with triangles → faster and great

7 Ray casting For each pixel: ● Shoot a ray from the observer to the position of the pixel ● Test if the ray hits an object in the scene ● If there is a hit: the color of this pixel will be the color of the object ● If there is no hit: the pixel receives the color of the background

8 Ray casting What do we need ? ● A position for the observer (eye, camera) ● A direction/object to look at (and a « way up ») ● An object to show on screen ● A representation of the 2D screen in the 3D space

9 Ray casting

10 Our Ray Caster

11 From Ray Casting to Ray Tracing

12 We add : ● Lights ambient, diffuse, specular ● Shadows ● Reflexion => recursion : another ray is shot from the intersection ● Material properties ambient, diffuse, and specular coefficients

13 Lightmodel Used: Phong reflection model 3 types of light: ambient, diffuse, specular

14 Ambient and Diffuse

15 Specular

16 Shadows Only add diffuse and specular light, if a lightsource is visible Test for intersections between a point on the sphere and the lightsource

17 In practice ● Implementation of the ray casting algorithm ● From ray casting to ray tracing ● Demo, use cases ● Highlight of some interesting modules

18 From Ray Casting to Ray Tracing We add : ● Lights ambient, diffuse, specular ● Shadows ● Reflexion => recursion : another ray is shot from the intersection ● Material properties ambient, diffuse, and specular coefficients

19

20

21

22

23

24

25

26 Video link 1

27 Video link 2

28 Interesting modules ● Positionning of the screen in 3D space ● The RayTracer class ● That's the core of the program (light model) ● Shadows ● The use of inheritance to compute intersections ● Obtaining an animation ● Camera and lights movement ● Export a sequence of images, make a movie ● The Draughtboard

29

30 Difficulties - math libraries - C++, compilation, building environment - Screen implementation - Unexpected results (debugging)

31 Achievements Light effects Animation rendering Different shapes Antialiasing

32 Improvements Refraction and transparency Textures and noise Depth of Field Image mapping Bounding Volume Radiometry (power, energy, radiance...) Photon mapping

33 Thanks! Thank you for your attention!

34 Questions?

35 http://mathinfo.univ- reims.fr/image/siRendu/Documents/2004- Chap5-BRDF.pdf http://collgran.files.wordpress.com/2008/01/ray tracing.gif?w=468


Download ppt "Project Raytracing. Content Goals Idea of Raytracing Ray Casting – Therory – Practice Raytracing – Theory – Light model – Practice Output images Conclusion."

Similar presentations


Ads by Google