48
March 1, 2009 Dr. Muhammed Al-Mulhem 1 ICS 415 Computer Graphics Rendering Dr. Muhammed Al-Mulhem Dr. Muhammed Al-Mulhem March 1, 2009 March 1, 2009

March 1, 2009Dr. Muhammed Al-Mulhem1 ICS 415 Computer Graphics Rendering Dr. Muhammed Al-Mulhem March 1, 2009 Dr. Muhammed Al-Mulhem March 1, 2009

Embed Size (px)

Citation preview

Page 1: March 1, 2009Dr. Muhammed Al-Mulhem1 ICS 415 Computer Graphics Rendering Dr. Muhammed Al-Mulhem March 1, 2009 Dr. Muhammed Al-Mulhem March 1, 2009

March 1, 2009 Dr. Muhammed Al-Mulhem 1

ICS 415Computer Graphics

Rendering

Dr. Muhammed Al-MulhemDr. Muhammed Al-Mulhem

March 1, 2009March 1, 2009

Dr. Muhammed Al-MulhemDr. Muhammed Al-Mulhem

March 1, 2009March 1, 2009

Page 2: March 1, 2009Dr. Muhammed Al-Mulhem1 ICS 415 Computer Graphics Rendering Dr. Muhammed Al-Mulhem March 1, 2009 Dr. Muhammed Al-Mulhem March 1, 2009

March 1, 2009 Dr. Muhammed Al-Mulhem 2

Rendering

• It is the process of generating an image from a model, by It is the process of generating an image from a model, by means of computer programs. means of computer programs.

• The model is a description of three dimensional objects in The model is a description of three dimensional objects in a strictly defined language or data structure.a strictly defined language or data structure.

• It would contain geometry, viewpoint, texture, lighting, and It would contain geometry, viewpoint, texture, lighting, and shading information. shading information.

• It is the process of generating an image from a model, by It is the process of generating an image from a model, by means of computer programs. means of computer programs.

• The model is a description of three dimensional objects in The model is a description of three dimensional objects in a strictly defined language or data structure.a strictly defined language or data structure.

• It would contain geometry, viewpoint, texture, lighting, and It would contain geometry, viewpoint, texture, lighting, and shading information. shading information.

Page 3: March 1, 2009Dr. Muhammed Al-Mulhem1 ICS 415 Computer Graphics Rendering Dr. Muhammed Al-Mulhem March 1, 2009 Dr. Muhammed Al-Mulhem March 1, 2009

March 1, 2009 Dr. Muhammed Al-Mulhem 3

Features of Rendering

• A rendered image can be understood in terms of a A rendered image can be understood in terms of a number of visible features. number of visible features.

• Rendering research and development has been Rendering research and development has been largely motivated by finding ways to simulate these largely motivated by finding ways to simulate these efficiently. efficiently.

• Some of these features are listed next.Some of these features are listed next.

• A rendered image can be understood in terms of a A rendered image can be understood in terms of a number of visible features. number of visible features.

• Rendering research and development has been Rendering research and development has been largely motivated by finding ways to simulate these largely motivated by finding ways to simulate these efficiently. efficiently.

• Some of these features are listed next.Some of these features are listed next.

Page 4: March 1, 2009Dr. Muhammed Al-Mulhem1 ICS 415 Computer Graphics Rendering Dr. Muhammed Al-Mulhem March 1, 2009 Dr. Muhammed Al-Mulhem March 1, 2009

March 1, 2009 Dr. Muhammed Al-Mulhem 4

Features of Rendering• ShadingShading — how the color and brightness of a surface varies with — how the color and brightness of a surface varies with

lighting.lighting.

• Texture-mappingTexture-mapping — a method of applying detail to surfaces.— a method of applying detail to surfaces.

• ShadingShading — how the color and brightness of a surface varies with — how the color and brightness of a surface varies with lighting.lighting.

• Texture-mappingTexture-mapping — a method of applying detail to surfaces.— a method of applying detail to surfaces.

Page 5: March 1, 2009Dr. Muhammed Al-Mulhem1 ICS 415 Computer Graphics Rendering Dr. Muhammed Al-Mulhem March 1, 2009 Dr. Muhammed Al-Mulhem March 1, 2009

March 1, 2009 Dr. Muhammed Al-Mulhem 5

Features of Rendering• bump-mappingbump-mapping — a method of simulating small-scale bumpiness — a method of simulating small-scale bumpiness

on surfaces. on surfaces.

• fogging/participating mediumfogging/participating medium — how light dims when passing — how light dims when passing through non-clear atmosphere or air.through non-clear atmosphere or air.

• bump-mappingbump-mapping — a method of simulating small-scale bumpiness — a method of simulating small-scale bumpiness on surfaces. on surfaces.

• fogging/participating mediumfogging/participating medium — how light dims when passing — how light dims when passing through non-clear atmosphere or air.through non-clear atmosphere or air.

Page 6: March 1, 2009Dr. Muhammed Al-Mulhem1 ICS 415 Computer Graphics Rendering Dr. Muhammed Al-Mulhem March 1, 2009 Dr. Muhammed Al-Mulhem March 1, 2009

March 1, 2009 Dr. Muhammed Al-Mulhem 6

Features of Rendering• ShadowsShadows — the effect of obstructing (blocking) light.— the effect of obstructing (blocking) light.

• Soft shadowsSoft shadows — varying darkness caused by partially obscured — varying darkness caused by partially obscured light sources.light sources.

• ShadowsShadows — the effect of obstructing (blocking) light.— the effect of obstructing (blocking) light.

• Soft shadowsSoft shadows — varying darkness caused by partially obscured — varying darkness caused by partially obscured light sources.light sources.

Page 7: March 1, 2009Dr. Muhammed Al-Mulhem1 ICS 415 Computer Graphics Rendering Dr. Muhammed Al-Mulhem March 1, 2009 Dr. Muhammed Al-Mulhem March 1, 2009

March 1, 2009 Dr. Muhammed Al-Mulhem 7

Features of Rendering

• ReflectionReflection — mirror-like or — mirror-like or highly glossy reflection.highly glossy reflection.

• TransparencyTransparency or or OpacityOpacity — — sharp transmission of light sharp transmission of light through solid objects. through solid objects.

• ReflectionReflection — mirror-like or — mirror-like or highly glossy reflection.highly glossy reflection.

• TransparencyTransparency or or OpacityOpacity — — sharp transmission of light sharp transmission of light through solid objects. through solid objects.

Page 8: March 1, 2009Dr. Muhammed Al-Mulhem1 ICS 415 Computer Graphics Rendering Dr. Muhammed Al-Mulhem March 1, 2009 Dr. Muhammed Al-Mulhem March 1, 2009

March 1, 2009 Dr. Muhammed Al-Mulhem 8

Features of Rendering

• TranslucencyTranslucency — highly scattered transmission of light through — highly scattered transmission of light through solid objects.solid objects.

• RefractionRefraction — bending of light associated with transparency.— bending of light associated with transparency.

• TranslucencyTranslucency — highly scattered transmission of light through — highly scattered transmission of light through solid objects.solid objects.

• RefractionRefraction — bending of light associated with transparency.— bending of light associated with transparency.

Page 9: March 1, 2009Dr. Muhammed Al-Mulhem1 ICS 415 Computer Graphics Rendering Dr. Muhammed Al-Mulhem March 1, 2009 Dr. Muhammed Al-Mulhem March 1, 2009

March 1, 2009 Dr. Muhammed Al-Mulhem 9

Features of Rendering

• DiffractionDiffraction — bending, spreading and interference — bending, spreading and interference of light passing by an object or aperture (hole or of light passing by an object or aperture (hole or crack) that disrupts the ray.crack) that disrupts the ray.

• DiffractionDiffraction — bending, spreading and interference — bending, spreading and interference of light passing by an object or aperture (hole or of light passing by an object or aperture (hole or crack) that disrupts the ray.crack) that disrupts the ray.

Page 10: March 1, 2009Dr. Muhammed Al-Mulhem1 ICS 415 Computer Graphics Rendering Dr. Muhammed Al-Mulhem March 1, 2009 Dr. Muhammed Al-Mulhem March 1, 2009

March 1, 2009 Dr. Muhammed Al-Mulhem 10

Features of Rendering

• IndirectIndirect illuminationillumination — surfaces illuminated by — surfaces illuminated by light reflected off other surfaces, rather than. light reflected off other surfaces, rather than. directly from a light source (also known as directly from a light source (also known as global illumination).global illumination).

• IndirectIndirect illuminationillumination — surfaces illuminated by — surfaces illuminated by light reflected off other surfaces, rather than. light reflected off other surfaces, rather than. directly from a light source (also known as directly from a light source (also known as global illumination).global illumination).

Page 11: March 1, 2009Dr. Muhammed Al-Mulhem1 ICS 415 Computer Graphics Rendering Dr. Muhammed Al-Mulhem March 1, 2009 Dr. Muhammed Al-Mulhem March 1, 2009

March 1, 2009 Dr. Muhammed Al-Mulhem 11

Features of Rendering

• CausticsCaustics (a form of indirect illumination) — (a form of indirect illumination) — reflection of light off a shiny object, or reflection of light off a shiny object, or focusing of light through a transparent object, focusing of light through a transparent object, to produce bright highlights on another object.to produce bright highlights on another object.

• CausticsCaustics (a form of indirect illumination) — (a form of indirect illumination) — reflection of light off a shiny object, or reflection of light off a shiny object, or focusing of light through a transparent object, focusing of light through a transparent object, to produce bright highlights on another object.to produce bright highlights on another object.

Page 12: March 1, 2009Dr. Muhammed Al-Mulhem1 ICS 415 Computer Graphics Rendering Dr. Muhammed Al-Mulhem March 1, 2009 Dr. Muhammed Al-Mulhem March 1, 2009

March 1, 2009 Dr. Muhammed Al-Mulhem 12

Features of Rendering

• Depth of fieldDepth of field — objects appear blurry or out of focus when too far — objects appear blurry or out of focus when too far in front of or behind the object in focus.in front of or behind the object in focus.

• Motion blurMotion blur — objects appear blurry due to high-speed motion, or — objects appear blurry due to high-speed motion, or

the motion of the camera.the motion of the camera.

• Depth of fieldDepth of field — objects appear blurry or out of focus when too far — objects appear blurry or out of focus when too far in front of or behind the object in focus.in front of or behind the object in focus.

• Motion blurMotion blur — objects appear blurry due to high-speed motion, or — objects appear blurry due to high-speed motion, or

the motion of the camera.the motion of the camera.

Page 13: March 1, 2009Dr. Muhammed Al-Mulhem1 ICS 415 Computer Graphics Rendering Dr. Muhammed Al-Mulhem March 1, 2009 Dr. Muhammed Al-Mulhem March 1, 2009

March 1, 2009 Dr. Muhammed Al-Mulhem 13

Features of Rendering

• Photorealistic morphingPhotorealistic morphing —3D renderings to appear more life-like.—3D renderings to appear more life-like.

• Non-photorealisticNon-photorealistic renderingrendering — rendering of scenes in an artistic — rendering of scenes in an artistic style, intended to look like a painting or drawing. style, intended to look like a painting or drawing.

• Photorealistic morphingPhotorealistic morphing —3D renderings to appear more life-like.—3D renderings to appear more life-like.

• Non-photorealisticNon-photorealistic renderingrendering — rendering of scenes in an artistic — rendering of scenes in an artistic style, intended to look like a painting or drawing. style, intended to look like a painting or drawing.

Page 14: March 1, 2009Dr. Muhammed Al-Mulhem1 ICS 415 Computer Graphics Rendering Dr. Muhammed Al-Mulhem March 1, 2009 Dr. Muhammed Al-Mulhem March 1, 2009

March 1, 2009 Dr. Muhammed Al-Mulhem 14

Rendering Algorithms

• Global illumination Global illumination

• Painter's algorithm Painter's algorithm

• Radiosity Radiosity

• Ray tracing Ray tracing

• Scanline algorithms like Reyes Scanline algorithms like Reyes

• Volume rendering Volume rendering

• Unbiased rendering Unbiased rendering

• Z-buffer algorithms Z-buffer algorithms

• Global illumination Global illumination

• Painter's algorithm Painter's algorithm

• Radiosity Radiosity

• Ray tracing Ray tracing

• Scanline algorithms like Reyes Scanline algorithms like Reyes

• Volume rendering Volume rendering

• Unbiased rendering Unbiased rendering

• Z-buffer algorithms Z-buffer algorithms

Page 15: March 1, 2009Dr. Muhammed Al-Mulhem1 ICS 415 Computer Graphics Rendering Dr. Muhammed Al-Mulhem March 1, 2009 Dr. Muhammed Al-Mulhem March 1, 2009

March 1, 2009 Dr. Muhammed Al-Mulhem 15

Global illumination

• Global illuminationGlobal illumination is a general name for a group of is a general name for a group of algorithms used in 3D computer graphics that are algorithms used in 3D computer graphics that are meant to add more realistic lighting to 3D scenes. meant to add more realistic lighting to 3D scenes.

• Such algorithms take into account not only the light Such algorithms take into account not only the light which comes directly from a light source (direct which comes directly from a light source (direct illumination), but also subsequent cases in which illumination), but also subsequent cases in which light rays from the same source are reflected by other light rays from the same source are reflected by other surfaces in the scene (indirect illumination). surfaces in the scene (indirect illumination).

• Global illuminationGlobal illumination is a general name for a group of is a general name for a group of algorithms used in 3D computer graphics that are algorithms used in 3D computer graphics that are meant to add more realistic lighting to 3D scenes. meant to add more realistic lighting to 3D scenes.

• Such algorithms take into account not only the light Such algorithms take into account not only the light which comes directly from a light source (direct which comes directly from a light source (direct illumination), but also subsequent cases in which illumination), but also subsequent cases in which light rays from the same source are reflected by other light rays from the same source are reflected by other surfaces in the scene (indirect illumination). surfaces in the scene (indirect illumination).

Page 16: March 1, 2009Dr. Muhammed Al-Mulhem1 ICS 415 Computer Graphics Rendering Dr. Muhammed Al-Mulhem March 1, 2009 Dr. Muhammed Al-Mulhem March 1, 2009

March 1, 2009 Dr. Muhammed Al-Mulhem 16

Global illumination

• Theoretically reflections, refractions, and shadows Theoretically reflections, refractions, and shadows are all examples of global illumination, because are all examples of global illumination, because when simulating them, one object affects the when simulating them, one object affects the rendering of another object (as opposed to an rendering of another object (as opposed to an object being affected only by a direct light). object being affected only by a direct light).

• In practice, however, only the simulation of diffuse In practice, however, only the simulation of diffuse inter-reflection or caustics is called global inter-reflection or caustics is called global illumination. illumination.

• Theoretically reflections, refractions, and shadows Theoretically reflections, refractions, and shadows are all examples of global illumination, because are all examples of global illumination, because when simulating them, one object affects the when simulating them, one object affects the rendering of another object (as opposed to an rendering of another object (as opposed to an object being affected only by a direct light). object being affected only by a direct light).

• In practice, however, only the simulation of diffuse In practice, however, only the simulation of diffuse inter-reflection or caustics is called global inter-reflection or caustics is called global illumination. illumination.

Page 17: March 1, 2009Dr. Muhammed Al-Mulhem1 ICS 415 Computer Graphics Rendering Dr. Muhammed Al-Mulhem March 1, 2009 Dr. Muhammed Al-Mulhem March 1, 2009

March 1, 2009 Dr. Muhammed Al-Mulhem 17

Global illumination

• Images rendered using global illumination Images rendered using global illumination algorithms often appear more photorealistic than algorithms often appear more photorealistic than images rendered using only direct illumination images rendered using only direct illumination algorithms. algorithms.

• However, such images are computationally more However, such images are computationally more expensive and consequently much slower to expensive and consequently much slower to generate. generate.

• Images rendered using global illumination Images rendered using global illumination algorithms often appear more photorealistic than algorithms often appear more photorealistic than images rendered using only direct illumination images rendered using only direct illumination algorithms. algorithms.

• However, such images are computationally more However, such images are computationally more expensive and consequently much slower to expensive and consequently much slower to generate. generate.

Page 18: March 1, 2009Dr. Muhammed Al-Mulhem1 ICS 415 Computer Graphics Rendering Dr. Muhammed Al-Mulhem March 1, 2009 Dr. Muhammed Al-Mulhem March 1, 2009

March 1, 2009 Dr. Muhammed Al-Mulhem 18

Global illumination• Examples of algorithms used in global illumination: Examples of algorithms used in global illumination:

– RadiosityRadiosity

– Ray tracingRay tracing

– Beam tracingBeam tracing

– Cone tracing, path tracingCone tracing, path tracing

– Metropolis light transportMetropolis light transport

– Ambient occlusion Ambient occlusion

– Photon mappingPhoton mapping

– Image based lighting Image based lighting

• Examples of algorithms used in global illumination: Examples of algorithms used in global illumination: – RadiosityRadiosity

– Ray tracingRay tracing

– Beam tracingBeam tracing

– Cone tracing, path tracingCone tracing, path tracing

– Metropolis light transportMetropolis light transport

– Ambient occlusion Ambient occlusion

– Photon mappingPhoton mapping

– Image based lighting Image based lighting

Page 19: March 1, 2009Dr. Muhammed Al-Mulhem1 ICS 415 Computer Graphics Rendering Dr. Muhammed Al-Mulhem March 1, 2009 Dr. Muhammed Al-Mulhem March 1, 2009

March 1, 2009 Dr. Muhammed Al-Mulhem 19

Example-Global illumination• Rendering without Global Illumination.Rendering without Global Illumination.

– Consider the next Figure.Consider the next Figure.

– Note that we are looking at a fully-enclosed scene through a Note that we are looking at a fully-enclosed scene through a one-way-transparency scheme (see the chrome sphere's one-way-transparency scheme (see the chrome sphere's reflection of the otherwise invisible white and green walls). reflection of the otherwise invisible white and green walls).

– There is a lack of definition in areas that are outside the beam There is a lack of definition in areas that are outside the beam of direct light from the ceiling lamp. of direct light from the ceiling lamp.

– For example, the geometry of the ceiling lamp's housing is For example, the geometry of the ceiling lamp's housing is obscured within a solid grey area produced by an ambient obscured within a solid grey area produced by an ambient color. color.

– Without the ambient color added into the rendering equation, Without the ambient color added into the rendering equation, this surface would be black. this surface would be black.

• Rendering without Global Illumination.Rendering without Global Illumination.

– Consider the next Figure.Consider the next Figure.

– Note that we are looking at a fully-enclosed scene through a Note that we are looking at a fully-enclosed scene through a one-way-transparency scheme (see the chrome sphere's one-way-transparency scheme (see the chrome sphere's reflection of the otherwise invisible white and green walls). reflection of the otherwise invisible white and green walls).

– There is a lack of definition in areas that are outside the beam There is a lack of definition in areas that are outside the beam of direct light from the ceiling lamp. of direct light from the ceiling lamp.

– For example, the geometry of the ceiling lamp's housing is For example, the geometry of the ceiling lamp's housing is obscured within a solid grey area produced by an ambient obscured within a solid grey area produced by an ambient color. color.

– Without the ambient color added into the rendering equation, Without the ambient color added into the rendering equation, this surface would be black. this surface would be black.

Page 20: March 1, 2009Dr. Muhammed Al-Mulhem1 ICS 415 Computer Graphics Rendering Dr. Muhammed Al-Mulhem March 1, 2009 Dr. Muhammed Al-Mulhem March 1, 2009

March 1, 2009 Dr. Muhammed Al-Mulhem 20

Example-Global illumination

Page 21: March 1, 2009Dr. Muhammed Al-Mulhem1 ICS 415 Computer Graphics Rendering Dr. Muhammed Al-Mulhem March 1, 2009 Dr. Muhammed Al-Mulhem March 1, 2009

March 1, 2009 Dr. Muhammed Al-Mulhem 21

Example-Global illumination• Rendering with global illuminationRendering with global illumination

• Note how light is reflected by surfaces. Note how light is reflected by surfaces.

• Note how colors transfer (or "bleed") from one surface to another, Note how colors transfer (or "bleed") from one surface to another, an effect of diffuse inter-reflection. an effect of diffuse inter-reflection.

• Notice how colors from the red and green walls are diffusely Notice how colors from the red and green walls are diffusely reflected by other surfaces in the scene (one-way transparency is reflected by other surfaces in the scene (one-way transparency is used to allow us to see "through" two walls from the outside while used to allow us to see "through" two walls from the outside while preserving their effect inside the scene). preserving their effect inside the scene).

• Also notable is the caustic projected on the red wall as light Also notable is the caustic projected on the red wall as light passes through the glass sphere.passes through the glass sphere.

• Rendering with global illuminationRendering with global illumination

• Note how light is reflected by surfaces. Note how light is reflected by surfaces.

• Note how colors transfer (or "bleed") from one surface to another, Note how colors transfer (or "bleed") from one surface to another, an effect of diffuse inter-reflection. an effect of diffuse inter-reflection.

• Notice how colors from the red and green walls are diffusely Notice how colors from the red and green walls are diffusely reflected by other surfaces in the scene (one-way transparency is reflected by other surfaces in the scene (one-way transparency is used to allow us to see "through" two walls from the outside while used to allow us to see "through" two walls from the outside while preserving their effect inside the scene). preserving their effect inside the scene).

• Also notable is the caustic projected on the red wall as light Also notable is the caustic projected on the red wall as light passes through the glass sphere.passes through the glass sphere.

Page 22: March 1, 2009Dr. Muhammed Al-Mulhem1 ICS 415 Computer Graphics Rendering Dr. Muhammed Al-Mulhem March 1, 2009 Dr. Muhammed Al-Mulhem March 1, 2009

March 1, 2009 Dr. Muhammed Al-Mulhem 22

Example-Global illumination

Page 23: March 1, 2009Dr. Muhammed Al-Mulhem1 ICS 415 Computer Graphics Rendering Dr. Muhammed Al-Mulhem March 1, 2009 Dr. Muhammed Al-Mulhem March 1, 2009

March 1, 2009 Dr. Muhammed Al-Mulhem 23

Demo-Global illumination

VedioVedioVedioVedio

Page 24: March 1, 2009Dr. Muhammed Al-Mulhem1 ICS 415 Computer Graphics Rendering Dr. Muhammed Al-Mulhem March 1, 2009 Dr. Muhammed Al-Mulhem March 1, 2009

March 1, 2009 Dr. Muhammed Al-Mulhem 24

Radiosity• Radiosity is a global illumination method.Radiosity is a global illumination method.

• Direct IlluminationDirect Illumination is a term that covers the principal lighting is a term that covers the principal lighting methods used by old school rendering engines such as 3D Studio methods used by old school rendering engines such as 3D Studio and POV. and POV.

• A scene consists of two types of entity: Objects and Lights. A scene consists of two types of entity: Objects and Lights.

• Lights cast light onto Objects, unless there is another Object in Lights cast light onto Objects, unless there is another Object in the way, in which case a shadow is left behind.the way, in which case a shadow is left behind.

• Examples of Direct illumination techniques are: Examples of Direct illumination techniques are:

– Shadow Volumes, Shadow Volumes,

– Z-Buffer methods, Z-Buffer methods,

– Ray Tracing.Ray Tracing.

• Radiosity is a global illumination method.Radiosity is a global illumination method.

• Direct IlluminationDirect Illumination is a term that covers the principal lighting is a term that covers the principal lighting methods used by old school rendering engines such as 3D Studio methods used by old school rendering engines such as 3D Studio and POV. and POV.

• A scene consists of two types of entity: Objects and Lights. A scene consists of two types of entity: Objects and Lights.

• Lights cast light onto Objects, unless there is another Object in Lights cast light onto Objects, unless there is another Object in the way, in which case a shadow is left behind.the way, in which case a shadow is left behind.

• Examples of Direct illumination techniques are: Examples of Direct illumination techniques are:

– Shadow Volumes, Shadow Volumes,

– Z-Buffer methods, Z-Buffer methods,

– Ray Tracing.Ray Tracing.

Page 25: March 1, 2009Dr. Muhammed Al-Mulhem1 ICS 415 Computer Graphics Rendering Dr. Muhammed Al-Mulhem March 1, 2009 Dr. Muhammed Al-Mulhem March 1, 2009

March 1, 2009 Dr. Muhammed Al-Mulhem 25

Radiosity• Global illumination methods try to overcome some of the methods try to overcome some of the

problems associated with problems associated with Direct Illumination.

• While a While a Direct Illumination tends to simulate light reflecting only tends to simulate light reflecting only once off each diffuse surface, once off each diffuse surface, global illumination renderers renderers simulate very many reflections of light around a scene. simulate very many reflections of light around a scene.

• While each object in a While each object in a Directly Illuminated scene must be lit by scene must be lit by some light source for it to be visible, an object in a some light source for it to be visible, an object in a Globally Illuminated scene may be lit simply by it's surroundings. scene may be lit simply by it's surroundings.

• Global illumination methods try to overcome some of the methods try to overcome some of the problems associated with problems associated with Direct Illumination.

• While a While a Direct Illumination tends to simulate light reflecting only tends to simulate light reflecting only once off each diffuse surface, once off each diffuse surface, global illumination renderers renderers simulate very many reflections of light around a scene. simulate very many reflections of light around a scene.

• While each object in a While each object in a Directly Illuminated scene must be lit by scene must be lit by some light source for it to be visible, an object in a some light source for it to be visible, an object in a Globally Illuminated scene may be lit simply by it's surroundings. scene may be lit simply by it's surroundings.

Page 26: March 1, 2009Dr. Muhammed Al-Mulhem1 ICS 415 Computer Graphics Rendering Dr. Muhammed Al-Mulhem March 1, 2009 Dr. Muhammed Al-Mulhem March 1, 2009

March 1, 2009 Dr. Muhammed Al-Mulhem 26

Example - Direct Illumination

• Lighting a simple scene with Direct Illumination:Lighting a simple scene with Direct Illumination:

• A simple scene is modeled in 3D Studio. A simple scene is modeled in 3D Studio.

• We wanted the room to look as if it was lit by the sun We wanted the room to look as if it was lit by the sun shining in through the window.shining in through the window.

• So, we set up a spotlight to shine in. So, we set up a spotlight to shine in.

• When we rendered it, the entire room was black, except When we rendered it, the entire room was black, except for a couple of patches on the floor that the light for a couple of patches on the floor that the light reached. reached.

• Lighting a simple scene with Direct Illumination:Lighting a simple scene with Direct Illumination:

• A simple scene is modeled in 3D Studio. A simple scene is modeled in 3D Studio.

• We wanted the room to look as if it was lit by the sun We wanted the room to look as if it was lit by the sun shining in through the window.shining in through the window.

• So, we set up a spotlight to shine in. So, we set up a spotlight to shine in.

• When we rendered it, the entire room was black, except When we rendered it, the entire room was black, except for a couple of patches on the floor that the light for a couple of patches on the floor that the light reached. reached.

Page 27: March 1, 2009Dr. Muhammed Al-Mulhem1 ICS 415 Computer Graphics Rendering Dr. Muhammed Al-Mulhem March 1, 2009 Dr. Muhammed Al-Mulhem March 1, 2009

March 1, 2009 Dr. Muhammed Al-Mulhem 27

Example - Direct Illumination

• Turning up the Ambient Light simply caused the room to appear a uniform grey, except for the uniformly red floor, and light patches.

• Lastly, we turned the background color to white, to give the appearance of a bright sky.

• Turning up the Ambient Light simply caused the room to appear a uniform grey, except for the uniformly red floor, and light patches.

• Lastly, we turned the background color to white, to give the appearance of a bright sky.

Page 28: March 1, 2009Dr. Muhammed Al-Mulhem1 ICS 415 Computer Graphics Rendering Dr. Muhammed Al-Mulhem March 1, 2009 Dr. Muhammed Al-Mulhem March 1, 2009

March 1, 2009 Dr. Muhammed Al-Mulhem 28

Example - Direct Illumination

Page 29: March 1, 2009Dr. Muhammed Al-Mulhem1 ICS 415 Computer Graphics Rendering Dr. Muhammed Al-Mulhem March 1, 2009 Dr. Muhammed Al-Mulhem March 1, 2009

March 1, 2009 Dr. Muhammed Al-Mulhem 29

Example - Global Lighting

• Lighting a simple scene with Global Lighting:

• We modeled the same scene by radiosity renderer. We modeled the same scene by radiosity renderer.

• To provide the source of light, we rendered an image of To provide the source of light, we rendered an image of the sky with Terragen (scenery generator), and placed it the sky with Terragen (scenery generator), and placed it outside the window. outside the window.

• No other source of light was used. No other source of light was used.

• With no further effort, the room looks realistically lit.With no further effort, the room looks realistically lit.

• Lighting a simple scene with Global Lighting:

• We modeled the same scene by radiosity renderer. We modeled the same scene by radiosity renderer.

• To provide the source of light, we rendered an image of To provide the source of light, we rendered an image of the sky with Terragen (scenery generator), and placed it the sky with Terragen (scenery generator), and placed it outside the window. outside the window.

• No other source of light was used. No other source of light was used.

• With no further effort, the room looks realistically lit.With no further effort, the room looks realistically lit.

Page 30: March 1, 2009Dr. Muhammed Al-Mulhem1 ICS 415 Computer Graphics Rendering Dr. Muhammed Al-Mulhem March 1, 2009 Dr. Muhammed Al-Mulhem March 1, 2009

March 1, 2009 Dr. Muhammed Al-Mulhem 30

Example - Global Lighting

Page 31: March 1, 2009Dr. Muhammed Al-Mulhem1 ICS 415 Computer Graphics Rendering Dr. Muhammed Al-Mulhem March 1, 2009 Dr. Muhammed Al-Mulhem March 1, 2009

March 1, 2009 Dr. Muhammed Al-Mulhem 31

Example - Global Lighting

• Interesting points to note:

• The entire room is lit and visible, even those surfaces facing away from the sun.

• Soft shadows.

• The change in brightness across the wall to the left of the scene.

• The grey walls, have a certain red color to them.

• The ceiling is slightly pink.

• Interesting points to note:

• The entire room is lit and visible, even those surfaces facing away from the sun.

• Soft shadows.

• The change in brightness across the wall to the left of the scene.

• The grey walls, have a certain red color to them.

• The ceiling is slightly pink.

Page 32: March 1, 2009Dr. Muhammed Al-Mulhem1 ICS 415 Computer Graphics Rendering Dr. Muhammed Al-Mulhem March 1, 2009 Dr. Muhammed Al-Mulhem March 1, 2009

March 1, 2009 Dr. Muhammed Al-Mulhem 32

The Workings of a Radiosity Renderer

• The basic premise of Radiosity.

• Any light that hits a surface is reflected back into the scene.

• That's any light. Not just light that's come directly from light sources.

• Anything that is visible is either emitting or reflecting light, i.e. it is a source of light.

• The basic premise of Radiosity.

• Any light that hits a surface is reflected back into the scene.

• That's any light. Not just light that's come directly from light sources.

• Anything that is visible is either emitting or reflecting light, i.e. it is a source of light.

Page 33: March 1, 2009Dr. Muhammed Al-Mulhem1 ICS 415 Computer Graphics Rendering Dr. Muhammed Al-Mulhem March 1, 2009 Dr. Muhammed Al-Mulhem March 1, 2009

March 1, 2009 Dr. Muhammed Al-Mulhem 33

The Workings of a Radiosity Renderer• Everything you can see around you is a light source.

• And so, when we are considering how much light is reaching any part of a scene, we must take care to add up light from all possible light sources.

• Basic Premises:

• There is no difference between light sources and objects.

• A surface in the scene is lit by all parts of the scene that are visible to it.

• Everything you can see around you is a light source.

• And so, when we are considering how much light is reaching any part of a scene, we must take care to add up light from all possible light sources.

• Basic Premises:

• There is no difference between light sources and objects.

• A surface in the scene is lit by all parts of the scene that are visible to it.

Page 34: March 1, 2009Dr. Muhammed Al-Mulhem1 ICS 415 Computer Graphics Rendering Dr. Muhammed Al-Mulhem March 1, 2009 Dr. Muhammed Al-Mulhem March 1, 2009

March 1, 2009 Dr. Muhammed Al-Mulhem 34

The process of performing Radiosity on a scene

• A Simple Scene

• We begin with a simple scene: a room with three windows.

• There are a couple of pillars and some alcoves, to provide interesting shadows. It will be lit by the scenery outside the windows, which we will assume is completely dark, except for a small, bright sun.

• A Simple Scene

• We begin with a simple scene: a room with three windows.

• There are a couple of pillars and some alcoves, to provide interesting shadows. It will be lit by the scenery outside the windows, which we will assume is completely dark, except for a small, bright sun.

Page 35: March 1, 2009Dr. Muhammed Al-Mulhem1 ICS 415 Computer Graphics Rendering Dr. Muhammed Al-Mulhem March 1, 2009 Dr. Muhammed Al-Mulhem March 1, 2009

March 1, 2009 Dr. Muhammed Al-Mulhem 35

The process of performing Radiosity on a scene

• Now, lets choose one of the surfaces in the room, and consider the lighting on it.

• Now, lets choose one of the surfaces in the room, and consider the lighting on it.

Page 36: March 1, 2009Dr. Muhammed Al-Mulhem1 ICS 415 Computer Graphics Rendering Dr. Muhammed Al-Mulhem March 1, 2009 Dr. Muhammed Al-Mulhem March 1, 2009

March 1, 2009 Dr. Muhammed Al-Mulhem 36

The process of performing Radiosity on a scene

• As with many difficult problems in computer graphics, we'll divide it up into little patches, and try to see the world from their point of view.

• As with many difficult problems in computer graphics, we'll divide it up into little patches, and try to see the world from their point of view.

Page 37: March 1, 2009Dr. Muhammed Al-Mulhem1 ICS 415 Computer Graphics Rendering Dr. Muhammed Al-Mulhem March 1, 2009 Dr. Muhammed Al-Mulhem March 1, 2009

March 1, 2009 Dr. Muhammed Al-Mulhem 37

The process of performing Radiosity on a scene

• Take one of those patches. Take one of those patches. And imagine you are that And imagine you are that patch. patch.

• What does the world look like What does the world look like from that perspective? from that perspective?

• Take one of those patches. Take one of those patches. And imagine you are that And imagine you are that patch. patch.

• What does the world look like What does the world look like from that perspective? from that perspective?

Page 38: March 1, 2009Dr. Muhammed Al-Mulhem1 ICS 415 Computer Graphics Rendering Dr. Muhammed Al-Mulhem March 1, 2009 Dr. Muhammed Al-Mulhem March 1, 2009

March 1, 2009 Dr. Muhammed Al-Mulhem 38

The process of performing Radiosity on a scene

• View from a patch:

• This patch can see no light. The room is very dark, the edges are drawn for demonstration.

• By adding together all the light it sees, we can calculate the total amount of light from the scene reaching the patch. We'll refer to this as the total incident light from now on.

• This patch can only see the room and the darkness outside. Adding up the incident light, we would see that no light is arriving here.

• This patch is darkly lit.

• View from a patch:

• This patch can see no light. The room is very dark, the edges are drawn for demonstration.

• By adding together all the light it sees, we can calculate the total amount of light from the scene reaching the patch. We'll refer to this as the total incident light from now on.

• This patch can only see the room and the darkness outside. Adding up the incident light, we would see that no light is arriving here.

• This patch is darkly lit.

Page 39: March 1, 2009Dr. Muhammed Al-Mulhem1 ICS 415 Computer Graphics Rendering Dr. Muhammed Al-Mulhem March 1, 2009 Dr. Muhammed Al-Mulhem March 1, 2009

March 1, 2009 Dr. Muhammed Al-Mulhem 39

The process of performing Radiosity on a scene

• View from a lower patch

• Pick a patch a little further down the pillar.

• This patch can see the bright sun outside the window. This time, adding up the incident light will show that a lot of light is arriving here.

• This patch is brightly lit.

• View from a lower patch

• Pick a patch a little further down the pillar.

• This patch can see the bright sun outside the window. This time, adding up the incident light will show that a lot of light is arriving here.

• This patch is brightly lit.

Page 40: March 1, 2009Dr. Muhammed Al-Mulhem1 ICS 415 Computer Graphics Rendering Dr. Muhammed Al-Mulhem March 1, 2009 Dr. Muhammed Al-Mulhem March 1, 2009

March 1, 2009 Dr. Muhammed Al-Mulhem 40

The process of performing Radiosity on a scene

• Lighting on the Pillar

• Having repeated this process for all the patches, and added up the incident light each time, we can look back at the pillar and see what the lighting is like.

• The patches nearer the top of the pillar, which could not see the sun, are in shadow, and those that can are brightly lit.

• Shadows naturally appear in parts of the scene that cannot see a source of light.

• Lighting on the Pillar

• Having repeated this process for all the patches, and added up the incident light each time, we can look back at the pillar and see what the lighting is like.

• The patches nearer the top of the pillar, which could not see the sun, are in shadow, and those that can are brightly lit.

• Shadows naturally appear in parts of the scene that cannot see a source of light.

Page 41: March 1, 2009Dr. Muhammed Al-Mulhem1 ICS 415 Computer Graphics Rendering Dr. Muhammed Al-Mulhem March 1, 2009 Dr. Muhammed Al-Mulhem March 1, 2009

March 1, 2009 Dr. Muhammed Al-Mulhem 41

The process of performing Radiosity on a scene

Page 42: March 1, 2009Dr. Muhammed Al-Mulhem1 ICS 415 Computer Graphics Rendering Dr. Muhammed Al-Mulhem March 1, 2009 Dr. Muhammed Al-Mulhem March 1, 2009

March 1, 2009 Dr. Muhammed Al-Mulhem 42

The process of performing Radiosity on a scene

• Entire Room Lit: 1st Pass

• Repeating the process for every patch in the room, gives us this scene.

– Everything is completely dark, except for surfaces that have received light from the sun.

• What's important to notice is that the room is completely dark, except for those areas that can see the sun.

• At the moment it's no improvement over any other renderer. Well, it doesn't end here.

• Now that some parts of the room are brightly lit, they have become sources of light themselves, and could well cast light onto other parts of the scene.

• Entire Room Lit: 1st Pass

• Repeating the process for every patch in the room, gives us this scene.

– Everything is completely dark, except for surfaces that have received light from the sun.

• What's important to notice is that the room is completely dark, except for those areas that can see the sun.

• At the moment it's no improvement over any other renderer. Well, it doesn't end here.

• Now that some parts of the room are brightly lit, they have become sources of light themselves, and could well cast light onto other parts of the scene.

Page 43: March 1, 2009Dr. Muhammed Al-Mulhem1 ICS 415 Computer Graphics Rendering Dr. Muhammed Al-Mulhem March 1, 2009 Dr. Muhammed Al-Mulhem March 1, 2009

March 1, 2009 Dr. Muhammed Al-Mulhem 43

The process of performing Radiosity on a scene

Page 44: March 1, 2009Dr. Muhammed Al-Mulhem1 ICS 415 Computer Graphics Rendering Dr. Muhammed Al-Mulhem March 1, 2009 Dr. Muhammed Al-Mulhem March 1, 2009

March 1, 2009 Dr. Muhammed Al-Mulhem 44

The process of performing Radiosity on a scene

• View from the patch after 1st Pass

• Patches that could not see the sun, and so received no light, can now see the light shining on other surfaces.

• So in the next pass, this patch will come out slightly lighter than the completely black it is now.

• View from the patch after 1st Pass

• Patches that could not see the sun, and so received no light, can now see the light shining on other surfaces.

• So in the next pass, this patch will come out slightly lighter than the completely black it is now.

Page 45: March 1, 2009Dr. Muhammed Al-Mulhem1 ICS 415 Computer Graphics Rendering Dr. Muhammed Al-Mulhem March 1, 2009 Dr. Muhammed Al-Mulhem March 1, 2009

March 1, 2009 Dr. Muhammed Al-Mulhem 45

The process of performing Radiosity on a scene

• Entire Room Lit: 2nd Pass

• This time, when you calculate the incident light on each patch in the scene, many patches that were black before are now lit. The room is beginning to take on a more realistic appearance.

• What's happened is that sun light has reflected once from the floor and walls, onto other surfaces.

• Entire Room Lit: 2nd Pass

• This time, when you calculate the incident light on each patch in the scene, many patches that were black before are now lit. The room is beginning to take on a more realistic appearance.

• What's happened is that sun light has reflected once from the floor and walls, onto other surfaces.

Page 46: March 1, 2009Dr. Muhammed Al-Mulhem1 ICS 415 Computer Graphics Rendering Dr. Muhammed Al-Mulhem March 1, 2009 Dr. Muhammed Al-Mulhem March 1, 2009

March 1, 2009 Dr. Muhammed Al-Mulhem 46

The process of performing Radiosity on a scene

• Entire Room Lit: 3rd Pass

• The third pass produces the effect of light having reflected twice in the scene. Everything looks pretty much the same, but is slightly brighter.

• Entire Room Lit: 3rd Pass

• The third pass produces the effect of light having reflected twice in the scene. Everything looks pretty much the same, but is slightly brighter.

Page 47: March 1, 2009Dr. Muhammed Al-Mulhem1 ICS 415 Computer Graphics Rendering Dr. Muhammed Al-Mulhem March 1, 2009 Dr. Muhammed Al-Mulhem March 1, 2009

March 1, 2009 Dr. Muhammed Al-Mulhem 47

The process of performing Radiosity on a scene

• The next pass only looks a little brighter than the last, The next pass only looks a little brighter than the last, and even the 16 th is not a lot different. There's not and even the 16 th is not a lot different. There's not much point in doing any more passes after that. much point in doing any more passes after that.

• The radiosity process slowly converges on a solution. The radiosity process slowly converges on a solution. Each pass is a little less different than the last, until Each pass is a little less different than the last, until eventually it becomes stable. Depending on the eventually it becomes stable. Depending on the complexity of the scene, and the lightness of the complexity of the scene, and the lightness of the surfaces, it may take a few, or a few thousand passes. surfaces, it may take a few, or a few thousand passes. It's really up to you when to stop it, and call it done. It's really up to you when to stop it, and call it done.

• The next pass only looks a little brighter than the last, The next pass only looks a little brighter than the last, and even the 16 th is not a lot different. There's not and even the 16 th is not a lot different. There's not much point in doing any more passes after that. much point in doing any more passes after that.

• The radiosity process slowly converges on a solution. The radiosity process slowly converges on a solution. Each pass is a little less different than the last, until Each pass is a little less different than the last, until eventually it becomes stable. Depending on the eventually it becomes stable. Depending on the complexity of the scene, and the lightness of the complexity of the scene, and the lightness of the surfaces, it may take a few, or a few thousand passes. surfaces, it may take a few, or a few thousand passes. It's really up to you when to stop it, and call it done. It's really up to you when to stop it, and call it done.

Page 48: March 1, 2009Dr. Muhammed Al-Mulhem1 ICS 415 Computer Graphics Rendering Dr. Muhammed Al-Mulhem March 1, 2009 Dr. Muhammed Al-Mulhem March 1, 2009

March 1, 2009 Dr. Muhammed Al-Mulhem 48

The process of performing Radiosity on a scene

44thth 1616thth 44thth 1616thth