Presentation is loading. Please wait.

Presentation is loading. Please wait.

Nic Shulver, 3D with Ray Tracing What is Ray Tracing? l“In computer graphics, an advanced technique for adding realism to an image.

Similar presentations


Presentation on theme: "Nic Shulver, 3D with Ray Tracing What is Ray Tracing? l“In computer graphics, an advanced technique for adding realism to an image."— Presentation transcript:

1 Nic Shulver, N.A.Shulver@staffs.ac.uk 3D with Ray Tracing What is Ray Tracing? l“In computer graphics, an advanced technique for adding realism to an image by including variations in shade, color intensity, and shadows that would be produced by having one or more light sources.” [Webopedia]computer graphicsWebopedia l“A rendering method that simulates light reflections, refractions and shadows. It follows a light path from a specific source and computes each pixel in the image to simulate the effect of the light. It is a very process- intensive operation.” [PCmag Encyclopedia]Encyclopedia

2 Nic Shulver, N.A.Shulver@staffs.ac.uk 3D with Ray Tracing What is raytracing? lIt’s a graphics technique for rendering very realistic scenes. lAnd a method of creating highly unreal scenes that look plausible, too. lEach pixel’s colour is calculated from a reasonably accurate physics model. lThe path of a notional “light ray” is traced from the screen out into the scene.

3 Nic Shulver, N.A.Shulver@staffs.ac.uk 3D with Ray Tracing Tracing the path of a ray... lThe colour of a pixel is calculated by tracing the ray from the viewpoint, through the pixel until an intersection is found. lFurther rays may be generated and they are traced, and so on. lDull, opaque objects tend to stop a ray, but shiny objects reflect and transparent objects can generate extra rays.

4 Nic Shulver, N.A.Shulver@staffs.ac.uk 3D with Ray Tracing Tracing the path of a ray... 32 1 4 5 8 9 6 7 10 11 12 13 14 15

5 Nic Shulver, N.A.Shulver@staffs.ac.uk 3D with Ray Tracing Limitations lPerfect parallel mirrors are an obvious problem - most raytracers have a fixed “cut-off” depth. lSome ray tracers add a “glow” to all objects to help simulate ambient lighting. lComplex scenes may require a lot of memory and an enormous amount of time to process.

6 Nic Shulver, N.A.Shulver@staffs.ac.uk 3D with Ray Tracing Performance lIn a scene of 100 primitive objects, rendered at a resolution of 640 by 480 pixels, the minimum number of intersection tests (using the simplest ray tracing algorithm) is in excess of 30 million. lIn practice, objects are bound by spheres or boxes to simplify intersection tests. Only if the ray intersects with the bounding shape is it worth testing the “complex” shape.

7 Nic Shulver, N.A.Shulver@staffs.ac.uk 3D with Ray Tracing Constructive Solid Geometry lPrimitive shapes (spheres, boxes, cones, cylinders) are not terribly useful on their own. lCSG gives us a way to build complicated shapes by merging, joining and subtracting primitives. lYou can weld shapes together or use one shape to take a chunk out of another with CSG.

8 Nic Shulver, N.A.Shulver@staffs.ac.uk 3D with Ray Tracing CSG types lunion (and merge) objects “glued” together - may overlap. Merging loses the edges inside the composite object. lintersection the new object exists only where all the original shapes overlapped. ldifference removes a shape from another.

9 Nic Shulver, N.A.Shulver@staffs.ac.uk 3D with Ray Tracing Boolean Set Operators lUnion - edges maintained lMerge - edges lost

10 Nic Shulver, N.A.Shulver@staffs.ac.uk 3D with Ray Tracing Boolean Set Operators lIntersection lDifference

11 Nic Shulver, N.A.Shulver@staffs.ac.uk 3D with Ray Tracing Practicalities lDifference is often implemented by complement and Intersection lRay tracing procedures have to be modified to determine the surfaces of the CSG objects lSurfaces are generated for a CSG object by using the texture of the primitive that formed that surface

12 Nic Shulver, N.A.Shulver@staffs.ac.uk 3D with Ray Tracing References/Links lRay Tracing, G. Scott Owen, SIGgraph http://www.siggraph.org/education/materials/Hype rGraph/raytrace/rtrace0.htm http://www.siggraph.org/education/materials/Hype rGraph/raytrace/rtrace0.htm lThe Internet Raytracing Competition http://www.irtc.org/ http://www.irtc.org/ lGoogle search “define:Ray tracing” http://www.google.co.uk/search?hl=en&lr=&oi=def more&defl=en&q=define:Ray+tracing http://www.google.co.uk/search?hl=en&lr=&oi=def more&defl=en&q=define:Ray+tracing


Download ppt "Nic Shulver, 3D with Ray Tracing What is Ray Tracing? l“In computer graphics, an advanced technique for adding realism to an image."

Similar presentations


Ads by Google