Presentation is loading. Please wait.

Presentation is loading. Please wait.

Ray Tracing & Radiosity Dr. Amy H. Zhang. Outline  Ray tracing  Radiosity.

Similar presentations


Presentation on theme: "Ray Tracing & Radiosity Dr. Amy H. Zhang. Outline  Ray tracing  Radiosity."— Presentation transcript:

1 Ray Tracing & Radiosity Dr. Amy H. Zhang

2 Outline  Ray tracing  Radiosity

3 Ray Tracing  The color we see is determined by interactions among light sources and surfaces.

4 Ray-casting model

5 Ray Tracing : Initial Stage  Divide the image plane into pixel-sized areas  Generate a cast ray through each pixel  If the ray goes off to infinity without striking anything  Assign background color to the pixel  If the ray strikes a surface  Calculate a shade for the point of intersection

6 Ray Tracing: Computing shadows  Is the intersection point illuminated ?  Compute shadow or feeler rays from the point of intersection to each light source  If a shadow ray intersects a surface before it meets the source, this point is in shadow  No lighting calculation needs to be done for the point

7 Shadow Rays

8 Ray Tracing: Highly Reflective Surfaces  Follow the shadow ray as it bounces from surface to surface.  Stop if it either goes off to infinity or intersects a source. Any other condition(s)?

9 Ray Tracing: Reflection and Transmission  If a surface is both reflecting and transmitting  Cast a ray in the direction of a perfect reflection.  Cast a ray in the direction of the transmitted ray  How to calculate  Vector r (reflected ray)  Vector t (transmitted ray)  Vector l (incoming ray)

10 The Ray Tree  Secondary rays may be generated by the primary cast ray by reflection and transmission of light.  A ray tree can be dynamically constructed to represent the primary and secondary cast rays.

11 Ray Tracing: Example

12  From http://www.povray.org/competition/jun95/index.html

13  From: http://www.cg.tuwien.ac.at/research/rendering/rays-radio/

14 Ray Tracing: Pros and Cons, open problems  Pros  Simple and intuitive  Generate photo-realistic objects, especially for the highly reflective and transparent objects  Easy to generate shadow  Cons  Diffuse surface  Open problems  Optimal number of cast rays?  Optimal depth?

15 Radiosity  Ideal for scene consisting of only perfectly diffuse surfaces.  Light interactions in a view- independent way  paths which leave a light source and are reflected diffusely some number of times (possibly zero) before hitting the eye.  An example  Some of the diffuse reflections from red wall would fall on white wall.  Diffuse light from white wall would have a similar effect on red wall.  Simple shading model does not consider these diffuse-diffuse interactions.

16 Radiosity  Physical laws governing the radiant-energy transferred(1950)  Radiant energy terms  Energy of each Photon  Total radiant energy sum over all photons and all frequency  Radiant power [flux] ( Φ )  Rate at which light energy is transmitted (in watts = joules/sec).

17 Radiosity  Radiosity(B)  Existent flux density from a locally planar area (in watts/ m 2 )

18 Radiosity Equation  B k –Radiosity at surface k  E k -Energy emitted from surface k  ρ k -reflectivity factor for surface k  H k –sum of the radiant energy contributions from all surfaces in the rendered volume arriving at surface k per unit time per unit area  F jk -Form factor of surface j related to surface k http://www.siggraph.org/education/materials/HyperGraph/radiosity/overview_1.htm

19 The Form Factors  Breaks up the scene into small polygonal patches.  Consider patches pair wise to determine form factors.  The factors determine how the light energy leaving one patch affects the other.  Depends on distance, shape, orientation, occlusion Small form factor Large form factor

20 Progressive radiosity  have intermediate radiosity values for the patch correspond to bounce levels As the algorithm iterates, light can be seen to flow into the scene, as multiple bounces are computed. Individual patches are visible as squares on the walls and floor.

21 Radiosity : Example

22 Radiosity : Another Example

23 Overall comments on Global Illumination  Ray-tracing models specular reflection well, but diffuse reflection is approximated  Radiosity models diffuse reflection accurately, but specular reflection is ignored  Time cost-> Radiosity Map  Advanced algorithms combine the two –Get your PhD by improving it


Download ppt "Ray Tracing & Radiosity Dr. Amy H. Zhang. Outline  Ray tracing  Radiosity."

Similar presentations


Ads by Google