Presentation is loading. Please wait.

Presentation is loading. Please wait.

Image.

Similar presentations


Presentation on theme: "Image."— Presentation transcript:

1 Image

2 Examples

3 Examples

4 Ray Tracing Ray tracing is a realistic method for rendering 3D computer graphics environments. It works by tracing the path taken by a ray of light through the scene, and calculating reflection, refraction, or absorption of the ray whenever it intersects an object in the world. Effects such as reflections and shadows, which are difficult to simulate in other algorithms, follow naturally from the ray tracing algorithm.

5 Ray Tracing This method is very good at simulating specular reflections and transparency, since the rays that are traced through the scenes can be easily bounced at mirrors and refracted by transparent objects. The following scenes were generated with ray tracers developed at our institute. Source:

6 Radiosity Calculating the overall light propagation within a scene, for short global illumination is a very difficult problem. With a standard ray tracing algorithm, this is a very time consuming task, since a huge number of rays have to be shot. For this reason, the radiosity method was invented. The main idea of the method is to store illumination values on the surfaces of the objects, as the light is propagated starting at the light sources.

7 Ray Tracing

8 Classical Recursive Ray Tracing
For each pixel in image { Create ray from eyepoint passing through this pixel Initialize NearestT to INFINITY and NearestObject to NULL For every object in scene { If ray intersects this object { If t of intersection is less than NearestT { Set NearestT to t of the intersection Set NearestObject to this object }

9 Classical Recursive Ray Tracing (Cnt.)
If NearestObject is NULL { Fill this pixel with background color } Else { Shoot a ray to each light source to check if in shadow If surface is reflective, generate reflection ray: recurse If transparent, generate refraction ray: recurse Use NearestObject and NearestT to compute shading function Fill this pixel with color result of shading function }

10 The Basic Idea This approach simulates light rays from light source to an observer's eye. Observer Light Source Reflected ray Object

11 “Forward” Ray-Tracing
Trace rays from light Lots of work for little return Light Image Plane Light Rays Eye Object Source:

12 “Backward” Ray-Tracing
Trace rays from eye instead Do work where it matters Light Image Plane Eye Object Source:

13 Ray Parametric form Ray expressed as function of a single parameter (“t”) <x, y, z> = <xo, yo, zo> + t * <xd, yd, zd> <x, y, z> = ro + trd t = 2.5 rd = <xd, yd, zd> t = 2.0 t = 1.0 ro = <xo, yo, zo> t = 0.0 Source:

14 Generating Rays Trace a ray for each pixel in the image plane Image
fovx Eye Eye Source:

15 Generating Rays Trace a ray for each pixel in the image plane
Side View m (tan(fovx)* 2) / m (tan(fovy)* 2) / n Eye n Image Plane Source:

16 Triangle Intersection
Want to know: at what point (p) does ray intersect triangle? Compute lighting, reflected rays, shadowing from that point p rd ro <?, ?, ?> (t = ???) Source:

17 Lighting We’ll use triangles for lights Some lighting terms
Build complex shapes from triangles Some lighting terms Light Eye N I R V Surface Source:

18 Lighting Use modified Phong lighting for each light
similar to OpenGL simulates rough and shiny surfaces for each light In = IambientKambient + IdiffuseKdiffuse (L.N) + IspecularKspecular (R.V)n Source:

19 Ambient Light Iambient Simulates the indirect lighting in a scene. Eye
Source:

20 Diffuse Light Idiffuse simulates direct lighting on a rough surface
Viewer independent Paper, rough wood, brick, etc... Eye Light

21 Specular Light Ispecular simulates direct lighting on a smooth surface
Viewer dependent Plastic, metal, polished wood, etc... Eye Light

22 Shadow Test Check against other objects to see if point is shadowed
Eye Shadowing Object

23 Reflection Angle of incidence = angle of reflection ( qI = qR )
I, R, N lie in the same plane R = I - 2 (N . I) N N qI qR I R Source:

24 This is A Good Start Lighting, Shadows, Reflection are enough to make some compelling images Want better lighting and objects Need more speed

25 More Quality, More Speed
Better Lighting + Forward Tracing Texture Mapping Modeling Techniques Motion Blur, Depth of Field, Blurry Reflection/Refraction Distributed Ray-Tracing Improving Image Quality Acceleration Techniques

26 Reflections Reflections are generated using ray tracing.
In real life, the interaction of light with a reflective object occurs in the following sequence: a light source emits photons. photons collide with and bounce off of objects (some energy is absorbed by such collisions, which is why we see color.) photons travel into the eye.

27 Shadows Shadows are very simple to do in a
ray tracer. A point is in shadow if a ray from that point to the light source intersects an objects, then the Point is in shadow. In order to apply diffuse shading, the point of intersection of a ray and a sphere has already been calculated. Source:

28 Ray Tracing Tools Professional Tool Free Tools
RenderMan is the name of a rendering software package developed by Pixar Animation Studios; it implements Pixar's photorealistic 3D description standard, the RenderMan Interface Specification. Free Tools POV-Ray YafRay BRL-CAD OpenRT

29 Examples

30 Examples

31 Examples

32 Ray Tracing Paths Ra Tc D Rc C A Rb Ra Ta Ra B Ta A C B PRP Tc Rc Rb D
Rd


Download ppt "Image."

Similar presentations


Ads by Google