SlideShare une entreprise Scribd logo
1  sur  18
Shading “  Shading is referred as  the  implementation of illumination model   at the pixel points  or  polygon surfaces of the graphics objects .”
Constant-Intensity Shading ,[object Object],Fig(1). A polygon mesh approximation of an object (a) is rendered with flat shading (b) and With Gouraud shading  (c).
[object Object],[object Object],[object Object],[object Object]
Gouraud Shading ,[object Object],[object Object],[object Object],[object Object],[object Object]
At each polygon vertex, we obtain a normal vector by averaging the surface normals of all polygons starting  that vertex, as illustrated in Fig.(2).  Thus, for any vertex position V, we obtain the unit vertex normal with the calculation Once we have the vertex normals, we can determine the intensity at the vertices from a lighting model. Figure (2). The normal vector at vertex V is calculated as the average of the surface normals for each polygon  sharing that vertex. N 1 N 2 N 3 N 4 V
[object Object],3 Y X Scan Line 5 2 4 1 Fig(3). For Gouraud shading, the intensity at point 4 is linearly interpolated from the intensities at vertices 1 and2. The intensity at point 5 is linearly interpolated from intensities at vertices 2 and 3. An interior point p is then assigned an intensity value that is linearly interpolated from intensities at positions 4 and 5. P
[object Object],I 1 +  I 2 I 4 =  y 4 -y 2 y 1 -y 2 y 1 -y 4 y 1 -y 2 I 4 +  I 5 I P =  X 5 - X P X 5 - X 4 X P - X 4 X 5 - X 4
[object Object],3 Y X Scan Lines I 2 I 1 Y-1 I’ I X X+1 Fig.(4) Incremental interpolation  of intensity values along a polygon edge for successive scan lines.
+  I 2 I =  Y - Y 2 Y 1 - Y 2 Y 1 - Y Y 1 - Y 2 I 1 then we can obtain the intensity along this edge for the next scan line, y - I, as I’=I+ Y 1 - Y 2 I 2 - I 1 if the intensity at edge position (x,y) is interpolated as
Similar calculations are used to obtain intensities at successive horizontal pixel positions along each scan line.  When surfaces are to be rendered in color, the intensity of each color component is calculated at the vertices. Gouraud shading can be combined with a hidden-surface algorithm to fill in the visible polygons along each scan line. An example of an object shaded with the Gouraud method appears in following Fig. A polygon mesh approximation of an object (a) is rendered with flat shading (b) and With Gouraud shading  (c).
[object Object],[object Object]
Phong Shading ,[object Object],[object Object],[object Object],[object Object],[object Object]
[object Object],Scan Line N  N  1 N  3 N  2 Fig.(5)  Interpolation of surface normals Along a polygon edge. N 1 +  N 2 N=  Y - Y 2 Y 1 - Y 2 Y 1 - Y Y 1 - Y 2
[object Object],[object Object]
Fast Phong Shading ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],I diff (x,y)=  = =
[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],I diff (x,y)=  a= I diff (x,y)=
[object Object],[object Object]

Contenu connexe

Tendances

Concept of basic illumination model
Concept of basic illumination modelConcept of basic illumination model
Concept of basic illumination model
Ankit Garg
 
Window to viewport transformation&matrix representation of homogeneous co...
Window to viewport transformation&matrix representation of homogeneous co...Window to viewport transformation&matrix representation of homogeneous co...
Window to viewport transformation&matrix representation of homogeneous co...
Mani Kanth
 
Video display devices
Video display devicesVideo display devices
Video display devices
Mohd Arif
 

Tendances (20)

Clipping in Computer Graphics
Clipping in Computer GraphicsClipping in Computer Graphics
Clipping in Computer Graphics
 
Frame buffer
Frame bufferFrame buffer
Frame buffer
 
Random scan displays and raster scan displays
Random scan displays and raster scan displaysRandom scan displays and raster scan displays
Random scan displays and raster scan displays
 
3D Transformation in Computer Graphics
3D Transformation in Computer Graphics3D Transformation in Computer Graphics
3D Transformation in Computer Graphics
 
Computer graphics
Computer graphicsComputer graphics
Computer graphics
 
GRPHICS06 - Shading
GRPHICS06 - ShadingGRPHICS06 - Shading
GRPHICS06 - Shading
 
Concept of basic illumination model
Concept of basic illumination modelConcept of basic illumination model
Concept of basic illumination model
 
Curves and surfaces
Curves and surfacesCurves and surfaces
Curves and surfaces
 
Hidden surface removal
Hidden surface removalHidden surface removal
Hidden surface removal
 
2D transformation (Computer Graphics)
2D transformation (Computer Graphics)2D transformation (Computer Graphics)
2D transformation (Computer Graphics)
 
Unit 3
Unit 3Unit 3
Unit 3
 
Dda algorithm
Dda algorithmDda algorithm
Dda algorithm
 
Depth Buffer Method
Depth Buffer MethodDepth Buffer Method
Depth Buffer Method
 
Character generation techniques
Character generation techniquesCharacter generation techniques
Character generation techniques
 
illumination model in Computer Graphics by irru pychukar
illumination model in Computer Graphics by irru pychukarillumination model in Computer Graphics by irru pychukar
illumination model in Computer Graphics by irru pychukar
 
Color Models Computer Graphics
Color Models Computer GraphicsColor Models Computer Graphics
Color Models Computer Graphics
 
Window to viewport transformation&matrix representation of homogeneous co...
Window to viewport transformation&matrix representation of homogeneous co...Window to viewport transformation&matrix representation of homogeneous co...
Window to viewport transformation&matrix representation of homogeneous co...
 
Video display devices
Video display devicesVideo display devices
Video display devices
 
Segments in Graphics
Segments in GraphicsSegments in Graphics
Segments in Graphics
 
Illumination Models & Shading
Illumination Models & ShadingIllumination Models & Shading
Illumination Models & Shading
 

En vedette

Geometric modeling111431635 geometric-modeling-glad (1)
Geometric modeling111431635 geometric-modeling-glad (1)Geometric modeling111431635 geometric-modeling-glad (1)
Geometric modeling111431635 geometric-modeling-glad (1)
manojg1990
 
Hidden surfaces
Hidden surfacesHidden surfaces
Hidden surfaces
Mohd Arif
 
ILLUMINATION & LIGHTING
ILLUMINATION & LIGHTINGILLUMINATION & LIGHTING
ILLUMINATION & LIGHTING
Hemant Suthar
 

En vedette (16)

Illumination model
Illumination modelIllumination model
Illumination model
 
Ray tracing
 Ray tracing Ray tracing
Ray tracing
 
3D Graphics & Rendering in Computer Graphics
3D Graphics & Rendering in Computer Graphics3D Graphics & Rendering in Computer Graphics
3D Graphics & Rendering in Computer Graphics
 
Phong Shading over any Polygonal Surface
Phong Shading over any Polygonal Surface Phong Shading over any Polygonal Surface
Phong Shading over any Polygonal Surface
 
Shading and two type of shading flat shading and gauraud shading with coding ...
Shading and two type of shading flat shading and gauraud shading with coding ...Shading and two type of shading flat shading and gauraud shading with coding ...
Shading and two type of shading flat shading and gauraud shading with coding ...
 
Illumination Model
Illumination ModelIllumination Model
Illumination Model
 
Geometric modelling
Geometric modellingGeometric modelling
Geometric modelling
 
191483523 geometric-modeling
191483523 geometric-modeling191483523 geometric-modeling
191483523 geometric-modeling
 
5 geometric-modeling-ppt-university-of-victoria
5 geometric-modeling-ppt-university-of-victoria5 geometric-modeling-ppt-university-of-victoria
5 geometric-modeling-ppt-university-of-victoria
 
Parametric modelling
Parametric modellingParametric modelling
Parametric modelling
 
Geometric Modeling
Geometric Modeling Geometric Modeling
Geometric Modeling
 
Geometric modeling111431635 geometric-modeling-glad (1)
Geometric modeling111431635 geometric-modeling-glad (1)Geometric modeling111431635 geometric-modeling-glad (1)
Geometric modeling111431635 geometric-modeling-glad (1)
 
Computer Graphics - Hidden Line Removal Algorithm
Computer Graphics - Hidden Line Removal AlgorithmComputer Graphics - Hidden Line Removal Algorithm
Computer Graphics - Hidden Line Removal Algorithm
 
Hidden surfaces
Hidden surfacesHidden surfaces
Hidden surfaces
 
ILLUMINATION & LIGHTING
ILLUMINATION & LIGHTINGILLUMINATION & LIGHTING
ILLUMINATION & LIGHTING
 
Color Models
Color ModelsColor Models
Color Models
 

Similaire à Shading

Computer Vision: Shape from Specularities and Motion
Computer Vision: Shape from Specularities and MotionComputer Vision: Shape from Specularities and Motion
Computer Vision: Shape from Specularities and Motion
Damian T. Gordon
 
Visible surface determination
Visible  surface determinationVisible  surface determination
Visible surface determination
Patel Punit
 

Similaire à Shading (20)

Shading methods
Shading methodsShading methods
Shading methods
 
Computer Vision: Shape from Specularities and Motion
Computer Vision: Shape from Specularities and MotionComputer Vision: Shape from Specularities and Motion
Computer Vision: Shape from Specularities and Motion
 
Study on Contrast Enhancement with the help of Associate Regions Histogram Eq...
Study on Contrast Enhancement with the help of Associate Regions Histogram Eq...Study on Contrast Enhancement with the help of Associate Regions Histogram Eq...
Study on Contrast Enhancement with the help of Associate Regions Histogram Eq...
 
FACE RECOGNITION ALGORITHM BASED ON ORIENTATION HISTOGRAM OF HOUGH PEAKS
FACE RECOGNITION ALGORITHM BASED ON ORIENTATION HISTOGRAM OF HOUGH PEAKSFACE RECOGNITION ALGORITHM BASED ON ORIENTATION HISTOGRAM OF HOUGH PEAKS
FACE RECOGNITION ALGORITHM BASED ON ORIENTATION HISTOGRAM OF HOUGH PEAKS
 
Visible surface determination
Visible  surface determinationVisible  surface determination
Visible surface determination
 
Rendering equation
Rendering equationRendering equation
Rendering equation
 
Image restoration and reconstruction
Image restoration and reconstructionImage restoration and reconstruction
Image restoration and reconstruction
 
Reflection, Scaling, Shear, Translation, and Rotation
Reflection, Scaling, Shear, Translation, and RotationReflection, Scaling, Shear, Translation, and Rotation
Reflection, Scaling, Shear, Translation, and Rotation
 
lec41.ppt
lec41.pptlec41.ppt
lec41.ppt
 
3rd unit.pptx
3rd unit.pptx3rd unit.pptx
3rd unit.pptx
 
graphics notes
graphics notesgraphics notes
graphics notes
 
Lec_3_Image Enhancement_spatial Domain.pdf
Lec_3_Image Enhancement_spatial Domain.pdfLec_3_Image Enhancement_spatial Domain.pdf
Lec_3_Image Enhancement_spatial Domain.pdf
 
matdid950092.pdf
matdid950092.pdfmatdid950092.pdf
matdid950092.pdf
 
Digital image processing
Digital image processingDigital image processing
Digital image processing
 
3 intensity transformations and spatial filtering slides
3 intensity transformations and spatial filtering slides3 intensity transformations and spatial filtering slides
3 intensity transformations and spatial filtering slides
 
Advanced Approach for Slopes Measurement by Non - Contact Optical Technique
Advanced Approach for Slopes Measurement by Non - Contact Optical TechniqueAdvanced Approach for Slopes Measurement by Non - Contact Optical Technique
Advanced Approach for Slopes Measurement by Non - Contact Optical Technique
 
Multimedia color in image and video
Multimedia color in image and videoMultimedia color in image and video
Multimedia color in image and video
 
Hidden Surface Removal using Z-buffer
Hidden Surface Removal using Z-bufferHidden Surface Removal using Z-buffer
Hidden Surface Removal using Z-buffer
 
Hcr's Theory of Polygon (Proposed by Mr Harish Chandra Rajpoot)
Hcr's Theory of Polygon (Proposed by Mr Harish Chandra Rajpoot)Hcr's Theory of Polygon (Proposed by Mr Harish Chandra Rajpoot)
Hcr's Theory of Polygon (Proposed by Mr Harish Chandra Rajpoot)
 
Hidden lines & surfaces
Hidden lines & surfacesHidden lines & surfaces
Hidden lines & surfaces
 

Plus de Amit Kapoor

Plus de Amit Kapoor (17)

Tweening and morphing
Tweening and morphingTweening and morphing
Tweening and morphing
 
Study from where
Study from whereStudy from where
Study from where
 
Projection
ProjectionProjection
Projection
 
Display devices
Display devicesDisplay devices
Display devices
 
Computer graphics syllabus
Computer graphics syllabusComputer graphics syllabus
Computer graphics syllabus
 
Cg my own programs
Cg my own programsCg my own programs
Cg my own programs
 
Animation
AnimationAnimation
Animation
 
3 d modeling of objects
3 d modeling of objects3 d modeling of objects
3 d modeling of objects
 
Essential c
Essential cEssential c
Essential c
 
C aptitude scribd
C aptitude scribdC aptitude scribd
C aptitude scribd
 
C in7-days
C in7-daysC in7-days
C in7-days
 
C interview question answer 2
C interview question answer 2C interview question answer 2
C interview question answer 2
 
C interview question answer 1
C interview question answer 1C interview question answer 1
C interview question answer 1
 
C notes mca i sem 2011
C notes mca i sem 2011C notes mca i sem 2011
C notes mca i sem 2011
 
C tutorials
C tutorialsC tutorials
C tutorials
 
User defined data type
User defined data typeUser defined data type
User defined data type
 
2 d transformations by amit kumar (maimt)
2 d transformations by amit kumar (maimt)2 d transformations by amit kumar (maimt)
2 d transformations by amit kumar (maimt)
 

Dernier

IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI Solutions
Enterprise Knowledge
 
CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Service
giselly40
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
Joaquim Jorge
 

Dernier (20)

IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI Solutions
 
CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Service
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
 
What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?
 
Advantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your BusinessAdvantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your Business
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processors
 
Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed texts
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day Presentation
 
Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf
 
A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
 
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...
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
 

Shading

  • 1. Shading “ Shading is referred as the implementation of illumination model at the pixel points or polygon surfaces of the graphics objects .”
  • 2.
  • 3.
  • 4.
  • 5. At each polygon vertex, we obtain a normal vector by averaging the surface normals of all polygons starting that vertex, as illustrated in Fig.(2). Thus, for any vertex position V, we obtain the unit vertex normal with the calculation Once we have the vertex normals, we can determine the intensity at the vertices from a lighting model. Figure (2). The normal vector at vertex V is calculated as the average of the surface normals for each polygon sharing that vertex. N 1 N 2 N 3 N 4 V
  • 6.
  • 7.
  • 8.
  • 9. + I 2 I = Y - Y 2 Y 1 - Y 2 Y 1 - Y Y 1 - Y 2 I 1 then we can obtain the intensity along this edge for the next scan line, y - I, as I’=I+ Y 1 - Y 2 I 2 - I 1 if the intensity at edge position (x,y) is interpolated as
  • 10. Similar calculations are used to obtain intensities at successive horizontal pixel positions along each scan line. When surfaces are to be rendered in color, the intensity of each color component is calculated at the vertices. Gouraud shading can be combined with a hidden-surface algorithm to fill in the visible polygons along each scan line. An example of an object shaded with the Gouraud method appears in following Fig. A polygon mesh approximation of an object (a) is rendered with flat shading (b) and With Gouraud shading (c).
  • 11.
  • 12.
  • 13.
  • 14.
  • 15.
  • 16.
  • 17.
  • 18.