SlideShare uma empresa Scribd logo
1 de 27
SHADING
Michael Heron
INTRODUCTION
 Shading is an important part of creating realistic
objects.
 It adds nuance and definition to otherwise flat
representations.
 Illumination may fall unevenly across a polygon.
 Can be calculated individually for each pixel.
 Expensive to calculate.
 Faster shading algorithms exist.
SHADING
 There are several key determinants in the level
of shading across a polygon.
 Surface properties
 Texture
 Colour
 Material
 Light sources
 Relative positions and orientations
SHADING
 Shading is important as a mechanism for
conveying information about 3D shapes in 2D.
 Representation of shapes with single colours
render the images as 2D to our eyes.
LOCAL RENDERING OF LIGHT
 Modelled in one of three ways.
 Perfect specular reflection.
 Light is reflected directionally.
 Imperfect specular reflection.
 Light is reflected imperfectly
 Perfect diffuse reflection
 Light is scattered in all directions.
 These three models can be used to determine the
shading of polygons.
FLAT SHADING
 Flat shading works by applying a single pixel
colour across an entire polygon.
 It cannot handle specular reflection.
 Very quick and efficient, but realism is limited.
 Especially for low polygon counts.
 Separate polygons are clearly visible.
FLAT SHADING
 The human eye is especially good at
noticing edges.
Flat shading is thus acting against our biology.
 Better results can be obtained by
interpolation of shading across a polygon’s
surface.
Common technique for this is Gouraud
Shading.
Used when polygons are approximating curved
surfaces.
This provides a linear colour gradient over the
polygon.
GOURAUD SHADING
 First, must calculate vertex intensity.
 Simple method is to average the light intensity of all
polygons sharing a vertex.
 More complex method involves modelling light
interaction at each vertex.
 More computation, but more realistic output.
The arrows indicate
surface normals
GOURAUD SHADING
 Light intensity at each vertex used to calculate
light intensity of pixels in polygon.
10
0 20
15
10
5
10
172
10
FLAT VERSUS GOURAUD
Flat Shading Model – note
individual polygons easily
identifiable.
Gouraud Shading Model –
interpolation of pixel colours
across polygons hides edges
better.
FLAT SHADING
GOURAUD SHADING
PHONG REFLECTION MODEL
 The Phong Reflection Model works by estimating
the colours of pixels.
 Light described as the combination of:
 Ambient light
 Diffuse light
 Specular Light
PHONG SHADING
 Problem of visible edges mitigated by Gouraud
shading
 Not eliminated
 Minimum and maximum intensity will always occur
at vertexes.
 Calculation works on the basis of interpolation.
 Interpolation works slightly differently.
SURFACE NORMALS
 When determining the way light interacts
with a polygon, we base it on the surface
normal.
A hypothetical line that extends
perpendicularly from the point.
 With flat shading, we base the
intersection on the surface normal of the
middle pixel of a polygon.
This gives a rough measure of light intensity.
 With Gouraud, we base it on the intensity
of each vertex.
More nuanced.
PHONG SHADING
 Phong Shading interpolates the surface normals
across a polygon.
 Intensity is estimated based on these interpolated
normals.
The arrows indicate
surface normals
SHADING MODELS
Phong Shading Flat Shading
Gouraud Shading
SPECULAR REFLECTION
 Specular reflection can have its own colour.
 A snooker ball’s highlight is the colour of the light, not
the colour of the ball.
 Several specular models exist
 Phong
 Basic, but good output
 Cook-Tor
 Optimised version of Phong, handles hardness
 Blinn
 Also handles softness of highlight
 Toon
 Simulates cartoon style shading
 Play about with these in Blender.
SHADOWS
 Shadows are tremendously important in
3D images.
They give cues for depth, shape, structure, and
light source positions
 Texture of an image represented by
variation across a surface.
 Gouraud and Phong scenes lack shadows
and texture.
 Simple approach to paste shadows onto
the scene.
SHADOWS
SHADOWS
Scene without shadows lacks
definition and detail. Obviously
unrealistic.
Scene with shadows has much
greater detail and provides visual
cues as to light sources and
shapes.
SHADOWS
 Shadow algorithms provide approximations.
 Limited consideration of light characteristics.
 Point lights create sharp shadows
 Other sources create softer shadows.
 Most common algorithm used for shadow
generation is shadow mapping.
 Also known as shadow z-buffering
SHADOW MAPPING
 Process works similarly to z-buffering.
Trace the light from each light source.
If a pixel is occluded, it is in shadow.
 We use the light-source in the same way
as we use a view-port in z-buffering.
Count the level of shadow depth
 Two pass algorithm.
Calculate shadows across a scene
 Reusable data
Calculate z-buffering for rasterisation.
SHADOW MAPPING
Light
Viewpoint
transform
SHADOW MAPPING
Pixels may be illuminated from many sources or from many paths of light.
Pixels in the umbra are entirely shadowed.
Pixels in the penumbra are in shadow from only some parts of the light
source.
Requires the use of Extended Light Sources
SHADOW MAPPING
Number of paths calculated from light
source is a simplification. Too hard to
compute. Number of paths determined
by sample points.
Image on the left uses one sample point,
Image on the right uses 36
sample points.
Takes much longer to render!
SUMMARY
 Shading and shadows important for 3D
definition.
 Different models exist for managing
shading
Flat
Gouraud
Phong
 Shadows important for realism.
Mostly done using shadow mapping.
Only an approximation of light occlusion.

Mais conteúdo relacionado

Mais procurados

hidden surface elimination using z buffer algorithm
hidden surface elimination using z buffer algorithmhidden surface elimination using z buffer algorithm
hidden surface elimination using z buffer algorithmrajivagarwal23dei
 
Color Image Processing: Basics
Color Image Processing: BasicsColor Image Processing: Basics
Color Image Processing: BasicsA B Shinde
 
Hidden lines & surfaces
Hidden lines & surfacesHidden lines & surfaces
Hidden lines & surfacesAnkur Kumar
 
Computer Graphics: Visible surface detection methods
Computer Graphics: Visible surface detection methodsComputer Graphics: Visible surface detection methods
Computer Graphics: Visible surface detection methodsJoseph Charles
 
3D transformation in computer graphics
3D transformation in computer graphics3D transformation in computer graphics
3D transformation in computer graphicsSHIVANI SONI
 
Visible surface detection in computer graphic
Visible surface detection in computer graphicVisible surface detection in computer graphic
Visible surface detection in computer graphicanku2266
 
Color fundamentals and color models - Digital Image Processing
Color fundamentals and color models - Digital Image ProcessingColor fundamentals and color models - Digital Image Processing
Color fundamentals and color models - Digital Image ProcessingAmna
 
Raster scan system & random scan system
Raster scan system & random scan systemRaster scan system & random scan system
Raster scan system & random scan systemshalinikarunakaran1
 
B-spline
B-spline B-spline
B-spline nmahi96
 
Back face detection
Back face detectionBack face detection
Back face detectionPooja Dixit
 
Color Models Computer Graphics
Color Models Computer GraphicsColor Models Computer Graphics
Color Models Computer Graphicsdhruv141293
 
Computer graphics curves and surfaces (1)
Computer graphics curves and surfaces (1)Computer graphics curves and surfaces (1)
Computer graphics curves and surfaces (1)RohitK71
 
2D transformation (Computer Graphics)
2D transformation (Computer Graphics)2D transformation (Computer Graphics)
2D transformation (Computer Graphics)Timbal Mayank
 
Color Image Processing
Color Image ProcessingColor Image Processing
Color Image Processingkiruthiammu
 

Mais procurados (20)

hidden surface elimination using z buffer algorithm
hidden surface elimination using z buffer algorithmhidden surface elimination using z buffer algorithm
hidden surface elimination using z buffer algorithm
 
fractals
fractalsfractals
fractals
 
Color Image Processing: Basics
Color Image Processing: BasicsColor Image Processing: Basics
Color Image Processing: Basics
 
Color models
Color modelsColor models
Color models
 
Hidden lines & surfaces
Hidden lines & surfacesHidden lines & surfaces
Hidden lines & surfaces
 
Computer Graphics: Visible surface detection methods
Computer Graphics: Visible surface detection methodsComputer Graphics: Visible surface detection methods
Computer Graphics: Visible surface detection methods
 
3D transformation in computer graphics
3D transformation in computer graphics3D transformation in computer graphics
3D transformation in computer graphics
 
Visible surface detection in computer graphic
Visible surface detection in computer graphicVisible surface detection in computer graphic
Visible surface detection in computer graphic
 
Color fundamentals and color models - Digital Image Processing
Color fundamentals and color models - Digital Image ProcessingColor fundamentals and color models - Digital Image Processing
Color fundamentals and color models - Digital Image Processing
 
Raster scan system & random scan system
Raster scan system & random scan systemRaster scan system & random scan system
Raster scan system & random scan system
 
B-spline
B-spline B-spline
B-spline
 
Back face detection
Back face detectionBack face detection
Back face detection
 
Computer graphics realism
Computer graphics realismComputer graphics realism
Computer graphics realism
 
Depth Buffer Method
Depth Buffer MethodDepth Buffer Method
Depth Buffer Method
 
Color Models Computer Graphics
Color Models Computer GraphicsColor Models Computer Graphics
Color Models Computer Graphics
 
Computer graphics curves and surfaces (1)
Computer graphics curves and surfaces (1)Computer graphics curves and surfaces (1)
Computer graphics curves and surfaces (1)
 
Shading
ShadingShading
Shading
 
Polygon mesh
Polygon  meshPolygon  mesh
Polygon mesh
 
2D transformation (Computer Graphics)
2D transformation (Computer Graphics)2D transformation (Computer Graphics)
2D transformation (Computer Graphics)
 
Color Image Processing
Color Image ProcessingColor Image Processing
Color Image Processing
 

Semelhante a GRPHICS06 - Shading

GRPHICS04 - Rendering (1)
GRPHICS04 - Rendering (1)GRPHICS04 - Rendering (1)
GRPHICS04 - Rendering (1)Michael Heron
 
GRPHICS07 - Textures
GRPHICS07 - TexturesGRPHICS07 - Textures
GRPHICS07 - TexturesMichael Heron
 
GRPHICS08 - Raytracing and Radiosity
GRPHICS08 - Raytracing and RadiosityGRPHICS08 - Raytracing and Radiosity
GRPHICS08 - Raytracing and RadiosityMichael Heron
 
Lighting and shading
Lighting and shadingLighting and shading
Lighting and shadingeshveeen
 
Globalillumination
GlobalilluminationGlobalillumination
Globalilluminationmeheng1001
 
Phong Shading over any Polygonal Surface
Phong Shading over any Polygonal Surface Phong Shading over any Polygonal Surface
Phong Shading over any Polygonal Surface Bhuvnesh Pratap
 
APPEARANCE-BASED REPRESENTATION AND RENDERING OF CAST SHADOWS
APPEARANCE-BASED REPRESENTATION AND RENDERING OF CAST SHADOWSAPPEARANCE-BASED REPRESENTATION AND RENDERING OF CAST SHADOWS
APPEARANCE-BASED REPRESENTATION AND RENDERING OF CAST SHADOWSijcga
 
PapersWeLove - Rendering Synthetic Objects Into Real Scenes - Paul Debevec.pdf
PapersWeLove - Rendering Synthetic Objects Into Real Scenes - Paul Debevec.pdfPapersWeLove - Rendering Synthetic Objects Into Real Scenes - Paul Debevec.pdf
PapersWeLove - Rendering Synthetic Objects Into Real Scenes - Paul Debevec.pdfAdam Hill
 
Radiosity in CAD and 3D, informative.
Radiosity in CAD and 3D, informative.Radiosity in CAD and 3D, informative.
Radiosity in CAD and 3D, informative.meheng1001
 
Visual hull construction from semitransparent coloured silhouettes
Visual hull construction from semitransparent coloured silhouettesVisual hull construction from semitransparent coloured silhouettes
Visual hull construction from semitransparent coloured silhouettesijcga
 
Visual Hull Construction from Semitransparent Coloured Silhouettes
Visual Hull Construction from Semitransparent Coloured Silhouettes  Visual Hull Construction from Semitransparent Coloured Silhouettes
Visual Hull Construction from Semitransparent Coloured Silhouettes ijcga
 
Visual Hull Construction from Semitransparent Coloured Silhouettes
Visual Hull Construction from Semitransparent Coloured Silhouettes  Visual Hull Construction from Semitransparent Coloured Silhouettes
Visual Hull Construction from Semitransparent Coloured Silhouettes ijcga
 
7 illumination and-shading computer graphics
7 illumination and-shading computer graphics7 illumination and-shading computer graphics
7 illumination and-shading computer graphicscairo university
 
A Method of Survey on Object-Oriented Shadow Detection & Removal for High Res...
A Method of Survey on Object-Oriented Shadow Detection & Removal for High Res...A Method of Survey on Object-Oriented Shadow Detection & Removal for High Res...
A Method of Survey on Object-Oriented Shadow Detection & Removal for High Res...IJERA Editor
 
GRPHICS05 - Rendering (2)
GRPHICS05 - Rendering (2)GRPHICS05 - Rendering (2)
GRPHICS05 - Rendering (2)Michael Heron
 

Semelhante a GRPHICS06 - Shading (20)

3D Lighting Techniques in Animation
3D Lighting Techniques in Animation3D Lighting Techniques in Animation
3D Lighting Techniques in Animation
 
GRPHICS04 - Rendering (1)
GRPHICS04 - Rendering (1)GRPHICS04 - Rendering (1)
GRPHICS04 - Rendering (1)
 
GRPHICS07 - Textures
GRPHICS07 - TexturesGRPHICS07 - Textures
GRPHICS07 - Textures
 
GRPHICS08 - Raytracing and Radiosity
GRPHICS08 - Raytracing and RadiosityGRPHICS08 - Raytracing and Radiosity
GRPHICS08 - Raytracing and Radiosity
 
Lighting and shading
Lighting and shadingLighting and shading
Lighting and shading
 
Globalillumination
GlobalilluminationGlobalillumination
Globalillumination
 
Phong Shading over any Polygonal Surface
Phong Shading over any Polygonal Surface Phong Shading over any Polygonal Surface
Phong Shading over any Polygonal Surface
 
APPEARANCE-BASED REPRESENTATION AND RENDERING OF CAST SHADOWS
APPEARANCE-BASED REPRESENTATION AND RENDERING OF CAST SHADOWSAPPEARANCE-BASED REPRESENTATION AND RENDERING OF CAST SHADOWS
APPEARANCE-BASED REPRESENTATION AND RENDERING OF CAST SHADOWS
 
Illumination Model
Illumination ModelIllumination Model
Illumination Model
 
PapersWeLove - Rendering Synthetic Objects Into Real Scenes - Paul Debevec.pdf
PapersWeLove - Rendering Synthetic Objects Into Real Scenes - Paul Debevec.pdfPapersWeLove - Rendering Synthetic Objects Into Real Scenes - Paul Debevec.pdf
PapersWeLove - Rendering Synthetic Objects Into Real Scenes - Paul Debevec.pdf
 
Radiosity in CAD and 3D, informative.
Radiosity in CAD and 3D, informative.Radiosity in CAD and 3D, informative.
Radiosity in CAD and 3D, informative.
 
Visual hull construction from semitransparent coloured silhouettes
Visual hull construction from semitransparent coloured silhouettesVisual hull construction from semitransparent coloured silhouettes
Visual hull construction from semitransparent coloured silhouettes
 
Visual Hull Construction from Semitransparent Coloured Silhouettes
Visual Hull Construction from Semitransparent Coloured Silhouettes  Visual Hull Construction from Semitransparent Coloured Silhouettes
Visual Hull Construction from Semitransparent Coloured Silhouettes
 
Visual Hull Construction from Semitransparent Coloured Silhouettes
Visual Hull Construction from Semitransparent Coloured Silhouettes  Visual Hull Construction from Semitransparent Coloured Silhouettes
Visual Hull Construction from Semitransparent Coloured Silhouettes
 
SID 2012
SID 2012SID 2012
SID 2012
 
7 illumination and-shading computer graphics
7 illumination and-shading computer graphics7 illumination and-shading computer graphics
7 illumination and-shading computer graphics
 
A Method of Survey on Object-Oriented Shadow Detection & Removal for High Res...
A Method of Survey on Object-Oriented Shadow Detection & Removal for High Res...A Method of Survey on Object-Oriented Shadow Detection & Removal for High Res...
A Method of Survey on Object-Oriented Shadow Detection & Removal for High Res...
 
3Ds Max lighting
3Ds Max lighting 3Ds Max lighting
3Ds Max lighting
 
GRPHICS05 - Rendering (2)
GRPHICS05 - Rendering (2)GRPHICS05 - Rendering (2)
GRPHICS05 - Rendering (2)
 
IDW 2012
IDW 2012IDW 2012
IDW 2012
 

Mais de Michael Heron

Meeple centred design - Board Game Accessibility
Meeple centred design - Board Game AccessibilityMeeple centred design - Board Game Accessibility
Meeple centred design - Board Game AccessibilityMichael Heron
 
Musings on misconduct
Musings on misconductMusings on misconduct
Musings on misconductMichael Heron
 
Accessibility Support with the ACCESS Framework
Accessibility Support with the ACCESS FrameworkAccessibility Support with the ACCESS Framework
Accessibility Support with the ACCESS FrameworkMichael Heron
 
ACCESS: A Technical Framework for Adaptive Accessibility Support
ACCESS:  A Technical Framework for Adaptive Accessibility SupportACCESS:  A Technical Framework for Adaptive Accessibility Support
ACCESS: A Technical Framework for Adaptive Accessibility SupportMichael Heron
 
Authorship and Autership
Authorship and AutershipAuthorship and Autership
Authorship and AutershipMichael Heron
 
Text parser based interaction
Text parser based interactionText parser based interaction
Text parser based interactionMichael Heron
 
GRPHICS03 - Graphical Representation
GRPHICS03 - Graphical RepresentationGRPHICS03 - Graphical Representation
GRPHICS03 - Graphical RepresentationMichael Heron
 
GRPHICS02 - Creating 3D Graphics
GRPHICS02 - Creating 3D GraphicsGRPHICS02 - Creating 3D Graphics
GRPHICS02 - Creating 3D GraphicsMichael Heron
 
GRPHICS01 - Introduction to 3D Graphics
GRPHICS01 - Introduction to 3D GraphicsGRPHICS01 - Introduction to 3D Graphics
GRPHICS01 - Introduction to 3D GraphicsMichael Heron
 
GRPHICS09 - Art Appreciation
GRPHICS09 - Art AppreciationGRPHICS09 - Art Appreciation
GRPHICS09 - Art AppreciationMichael Heron
 
2CPP14 - Abstraction
2CPP14 - Abstraction2CPP14 - Abstraction
2CPP14 - AbstractionMichael Heron
 
2CPP13 - Operator Overloading
2CPP13 - Operator Overloading2CPP13 - Operator Overloading
2CPP13 - Operator OverloadingMichael Heron
 
2CPP12 - Method Overriding
2CPP12 - Method Overriding2CPP12 - Method Overriding
2CPP12 - Method OverridingMichael Heron
 
2CPP11 - Method Overloading
2CPP11 - Method Overloading2CPP11 - Method Overloading
2CPP11 - Method OverloadingMichael Heron
 
2CPP10 - Polymorphism
2CPP10 - Polymorphism2CPP10 - Polymorphism
2CPP10 - PolymorphismMichael Heron
 

Mais de Michael Heron (20)

Meeple centred design - Board Game Accessibility
Meeple centred design - Board Game AccessibilityMeeple centred design - Board Game Accessibility
Meeple centred design - Board Game Accessibility
 
Musings on misconduct
Musings on misconductMusings on misconduct
Musings on misconduct
 
Accessibility Support with the ACCESS Framework
Accessibility Support with the ACCESS FrameworkAccessibility Support with the ACCESS Framework
Accessibility Support with the ACCESS Framework
 
ACCESS: A Technical Framework for Adaptive Accessibility Support
ACCESS:  A Technical Framework for Adaptive Accessibility SupportACCESS:  A Technical Framework for Adaptive Accessibility Support
ACCESS: A Technical Framework for Adaptive Accessibility Support
 
Authorship and Autership
Authorship and AutershipAuthorship and Autership
Authorship and Autership
 
Text parser based interaction
Text parser based interactionText parser based interaction
Text parser based interaction
 
SAD04 - Inheritance
SAD04 - InheritanceSAD04 - Inheritance
SAD04 - Inheritance
 
GRPHICS03 - Graphical Representation
GRPHICS03 - Graphical RepresentationGRPHICS03 - Graphical Representation
GRPHICS03 - Graphical Representation
 
GRPHICS02 - Creating 3D Graphics
GRPHICS02 - Creating 3D GraphicsGRPHICS02 - Creating 3D Graphics
GRPHICS02 - Creating 3D Graphics
 
GRPHICS01 - Introduction to 3D Graphics
GRPHICS01 - Introduction to 3D GraphicsGRPHICS01 - Introduction to 3D Graphics
GRPHICS01 - Introduction to 3D Graphics
 
GRPHICS09 - Art Appreciation
GRPHICS09 - Art AppreciationGRPHICS09 - Art Appreciation
GRPHICS09 - Art Appreciation
 
2CPP18 - Modifiers
2CPP18 - Modifiers2CPP18 - Modifiers
2CPP18 - Modifiers
 
2CPP17 - File IO
2CPP17 - File IO2CPP17 - File IO
2CPP17 - File IO
 
2CPP16 - STL
2CPP16 - STL2CPP16 - STL
2CPP16 - STL
 
2CPP15 - Templates
2CPP15 - Templates2CPP15 - Templates
2CPP15 - Templates
 
2CPP14 - Abstraction
2CPP14 - Abstraction2CPP14 - Abstraction
2CPP14 - Abstraction
 
2CPP13 - Operator Overloading
2CPP13 - Operator Overloading2CPP13 - Operator Overloading
2CPP13 - Operator Overloading
 
2CPP12 - Method Overriding
2CPP12 - Method Overriding2CPP12 - Method Overriding
2CPP12 - Method Overriding
 
2CPP11 - Method Overloading
2CPP11 - Method Overloading2CPP11 - Method Overloading
2CPP11 - Method Overloading
 
2CPP10 - Polymorphism
2CPP10 - Polymorphism2CPP10 - Polymorphism
2CPP10 - Polymorphism
 

Último

Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityPrincipled Technologies
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonAnna Loughnan Colquhoun
 
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin WoodPolkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin WoodJuan lago vázquez
 
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, AdobeApidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobeapidays
 
Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024The Digital Insurer
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...Martijn de Jong
 
Manulife - Insurer Innovation Award 2024
Manulife - Insurer Innovation Award 2024Manulife - Insurer Innovation Award 2024
Manulife - Insurer Innovation Award 2024The Digital Insurer
 
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost SavingRepurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost SavingEdi Saputra
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024The Digital Insurer
 
Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherRemote DBA Services
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsJoaquim Jorge
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Drew Madelung
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationSafe Software
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoffsammart93
 
Deploy with confidence: VMware Cloud Foundation 5.1 on next gen Dell PowerEdg...
Deploy with confidence: VMware Cloud Foundation 5.1 on next gen Dell PowerEdg...Deploy with confidence: VMware Cloud Foundation 5.1 on next gen Dell PowerEdg...
Deploy with confidence: VMware Cloud Foundation 5.1 on next gen Dell PowerEdg...Principled Technologies
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘RTylerCroy
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024The Digital Insurer
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProduct Anonymous
 
Top 5 Benefits OF Using Muvi Live Paywall For Live Streams
Top 5 Benefits OF Using Muvi Live Paywall For Live StreamsTop 5 Benefits OF Using Muvi Live Paywall For Live Streams
Top 5 Benefits OF Using Muvi Live Paywall For Live StreamsRoshan Dwivedi
 
AWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAndrey Devyatkin
 

Último (20)

Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivity
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt Robison
 
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin WoodPolkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
 
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, AdobeApidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
 
Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...
 
Manulife - Insurer Innovation Award 2024
Manulife - Insurer Innovation Award 2024Manulife - Insurer Innovation Award 2024
Manulife - Insurer Innovation Award 2024
 
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost SavingRepurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024
 
Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a Fresher
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
 
Deploy with confidence: VMware Cloud Foundation 5.1 on next gen Dell PowerEdg...
Deploy with confidence: VMware Cloud Foundation 5.1 on next gen Dell PowerEdg...Deploy with confidence: VMware Cloud Foundation 5.1 on next gen Dell PowerEdg...
Deploy with confidence: VMware Cloud Foundation 5.1 on next gen Dell PowerEdg...
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
 
Top 5 Benefits OF Using Muvi Live Paywall For Live Streams
Top 5 Benefits OF Using Muvi Live Paywall For Live StreamsTop 5 Benefits OF Using Muvi Live Paywall For Live Streams
Top 5 Benefits OF Using Muvi Live Paywall For Live Streams
 
AWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of Terraform
 

GRPHICS06 - Shading

  • 2. INTRODUCTION  Shading is an important part of creating realistic objects.  It adds nuance and definition to otherwise flat representations.  Illumination may fall unevenly across a polygon.  Can be calculated individually for each pixel.  Expensive to calculate.  Faster shading algorithms exist.
  • 3. SHADING  There are several key determinants in the level of shading across a polygon.  Surface properties  Texture  Colour  Material  Light sources  Relative positions and orientations
  • 4. SHADING  Shading is important as a mechanism for conveying information about 3D shapes in 2D.  Representation of shapes with single colours render the images as 2D to our eyes.
  • 5. LOCAL RENDERING OF LIGHT  Modelled in one of three ways.  Perfect specular reflection.  Light is reflected directionally.  Imperfect specular reflection.  Light is reflected imperfectly  Perfect diffuse reflection  Light is scattered in all directions.  These three models can be used to determine the shading of polygons.
  • 6. FLAT SHADING  Flat shading works by applying a single pixel colour across an entire polygon.  It cannot handle specular reflection.  Very quick and efficient, but realism is limited.  Especially for low polygon counts.  Separate polygons are clearly visible.
  • 7. FLAT SHADING  The human eye is especially good at noticing edges. Flat shading is thus acting against our biology.  Better results can be obtained by interpolation of shading across a polygon’s surface. Common technique for this is Gouraud Shading. Used when polygons are approximating curved surfaces. This provides a linear colour gradient over the polygon.
  • 8. GOURAUD SHADING  First, must calculate vertex intensity.  Simple method is to average the light intensity of all polygons sharing a vertex.  More complex method involves modelling light interaction at each vertex.  More computation, but more realistic output. The arrows indicate surface normals
  • 9. GOURAUD SHADING  Light intensity at each vertex used to calculate light intensity of pixels in polygon. 10 0 20 15 10 5 10 172 10
  • 10. FLAT VERSUS GOURAUD Flat Shading Model – note individual polygons easily identifiable. Gouraud Shading Model – interpolation of pixel colours across polygons hides edges better.
  • 13. PHONG REFLECTION MODEL  The Phong Reflection Model works by estimating the colours of pixels.  Light described as the combination of:  Ambient light  Diffuse light  Specular Light
  • 14. PHONG SHADING  Problem of visible edges mitigated by Gouraud shading  Not eliminated  Minimum and maximum intensity will always occur at vertexes.  Calculation works on the basis of interpolation.  Interpolation works slightly differently.
  • 15. SURFACE NORMALS  When determining the way light interacts with a polygon, we base it on the surface normal. A hypothetical line that extends perpendicularly from the point.  With flat shading, we base the intersection on the surface normal of the middle pixel of a polygon. This gives a rough measure of light intensity.  With Gouraud, we base it on the intensity of each vertex. More nuanced.
  • 16. PHONG SHADING  Phong Shading interpolates the surface normals across a polygon.  Intensity is estimated based on these interpolated normals. The arrows indicate surface normals
  • 17. SHADING MODELS Phong Shading Flat Shading Gouraud Shading
  • 18. SPECULAR REFLECTION  Specular reflection can have its own colour.  A snooker ball’s highlight is the colour of the light, not the colour of the ball.  Several specular models exist  Phong  Basic, but good output  Cook-Tor  Optimised version of Phong, handles hardness  Blinn  Also handles softness of highlight  Toon  Simulates cartoon style shading  Play about with these in Blender.
  • 19. SHADOWS  Shadows are tremendously important in 3D images. They give cues for depth, shape, structure, and light source positions  Texture of an image represented by variation across a surface.  Gouraud and Phong scenes lack shadows and texture.  Simple approach to paste shadows onto the scene.
  • 21. SHADOWS Scene without shadows lacks definition and detail. Obviously unrealistic. Scene with shadows has much greater detail and provides visual cues as to light sources and shapes.
  • 22. SHADOWS  Shadow algorithms provide approximations.  Limited consideration of light characteristics.  Point lights create sharp shadows  Other sources create softer shadows.  Most common algorithm used for shadow generation is shadow mapping.  Also known as shadow z-buffering
  • 23. SHADOW MAPPING  Process works similarly to z-buffering. Trace the light from each light source. If a pixel is occluded, it is in shadow.  We use the light-source in the same way as we use a view-port in z-buffering. Count the level of shadow depth  Two pass algorithm. Calculate shadows across a scene  Reusable data Calculate z-buffering for rasterisation.
  • 25. SHADOW MAPPING Pixels may be illuminated from many sources or from many paths of light. Pixels in the umbra are entirely shadowed. Pixels in the penumbra are in shadow from only some parts of the light source. Requires the use of Extended Light Sources
  • 26. SHADOW MAPPING Number of paths calculated from light source is a simplification. Too hard to compute. Number of paths determined by sample points. Image on the left uses one sample point, Image on the right uses 36 sample points. Takes much longer to render!
  • 27. SUMMARY  Shading and shadows important for 3D definition.  Different models exist for managing shading Flat Gouraud Phong  Shadows important for realism. Mostly done using shadow mapping. Only an approximation of light occlusion.