ScholarQuill logoScholarQuillUniversity Notes
  • Notes
  • Past Papers
  • Blogs
  • Todo
Login
ScholarQuill logoScholarQuillUniversity Notes
Login
NotesPast PapersBlogsTodo
More
SubjectsDiscussionCGPA CalculatorGPA CalculatorStudent PortalCourse Outline
About
About usPrivacy PolicyReportContact
Notes
Past Papers
Blogs
Todo
Analytics
    Current Subject
    🧩
    HCI & Computer Graphics
    COMP3145
    Progress0 / 73 topics
    Topics
    1. The Human: Input-output channels2. Human memory3. Thinking, Reasoning, Problem solving4. Emotions and Individual differences5. Psychology and design of interacting systems6. The Computer: Text entry devices7. Positioning, Pointing, and drawing devices8. Display devices9. Devices for virtual reality and 3D interaction10. Physical controls, Sensors and special devices11. Paper printing and scanning12. Memory, Processing and networks13. The Interaction: Models of interaction14. Frameworks and HCI15. Ergonomics16. Interaction styles17. Elements of the WIMP interfaces18. Interactivity and Context of interaction19. Usability Paradigm and Principles: Introduction20. Paradigms for interaction21. Interaction Design Basics: What is design22. Process of design and User focus23. Navigation design24. Screen design and layout25. Iteration and prototyping26. HCI in Software Process: Software life cycle27. Usability engineering28. Iterative design and prototyping29. Design rationale30. Design rules and Guidelines31. Golden rules and heuristics32. HCI patterns33. Evaluation techniques and methods34. Task analysis35. Universal design36. User support systems37. Computer Supported Cooperative Work38. Groupware systems39. Implementation of synchronous groupware40. Ubiquitous computing41. History of Computer Graphics42. Graphics architectures and software43. Imaging and vision: Pinhole camera, Human vision, Synthetic camera44. Modeling vs. rendering45. OpenGL Architecture46. Displaying simple two-dimensional geometric objects47. Positioning systems and windowed environment48. Color perception and models49. RGB, CMY, HLS color models50. Color transformations51. Color in OpenGL: RGB and indexed color52. Input: Network environment and client-server computing53. Input measures: event, sample and request input54. Using callbacks and picking55. Affine transformations: translation, rotation, scaling, shear56. Homogeneous coordinates and concatenation57. Current transformation and matrix stacks58. Three Dimensional Graphics: Classical viewing59. Specifying views in 3D60. Affine transformation in 3D61. Projective transformations62. Ray tracing63. Shading: Illumination and surface modeling64. Phong shading model65. Polygon shading66. Rasterization: Line drawing via Bresenham's algorithm67. Clipping and polygonal fill68. BitBlt operations69. Hidden surface removal (z buffer)70. Discrete Techniques: Buffers71. Reading and writing bitmaps and pixel maps72. Texture mapping73. Compositing
    COMP3145›Shading: Illumination and surface modeling
    HCI & Computer GraphicsTopic 63 of 73

    Shading: Illumination and surface modeling

    4 minread
    728words
    Beginnerlevel

    1. Definition

    Shading is the process of determining the color and brightness of a surface in a 3D scene based on light interaction.

    It relies on two main components:

    1. Illumination (Lighting Model) – How light sources contribute to the color at a point on a surface.
    2. Surface Modeling – How the surface properties (like texture, reflectivity, and orientation) affect the way light is reflected.

    2. Illumination Models

    Illumination models define how light interacts with surfaces. They can be classified into:

    A. Local Illumination Models

    • Compute color at a point based only on direct light sources and surface properties.
    • Ignore reflections from other objects (no global effects).
    • Common models:

    i. Ambient Lighting

    • Uniform light everywhere; represents indirect scattered light.
    • No direction; prevents completely black areas.
    • Formula: Iambient=ka⋅IaI_{ambient} = k_a \cdot I_aIambient​=ka​⋅Ia​ Where kak_aka​ = ambient reflection coefficient, IaI_aIa​ = ambient light intensity.

    ii. Diffuse Reflection (Lambertian)

    • Light scattered equally in all directions from a rough surface.
    • Depends on the angle between surface normal NNN and light direction LLL.
    • Formula (Lambert’s Law): Idiffuse=kd⋅Il⋅max⁡(0,N⋅L)I_{diffuse} = k_d \cdot I_l \cdot \max(0, \mathbf{N} \cdot \mathbf{L})Idiffuse​=kd​⋅Il​⋅max(0,N⋅L) Where kdk_dkd​ = diffuse coefficient, IlI_lIl​ = light intensity.

    iii. Specular Reflection

    • Light reflected in a preferred direction (shiny surfaces).
    • Depends on view direction VVV, light direction LLL, and surface normal NNN.
    • Phong model formula: Ispecular=ks⋅Il⋅(max⁡(0,R⋅V))nI_{specular} = k_s \cdot I_l \cdot (\max(0, \mathbf{R} \cdot \mathbf{V}))^nIspecular​=ks​⋅Il​⋅(max(0,R⋅V))n Where ksk_sks​ = specular coefficient, nnn = shininess exponent, RRR = reflection vector.

    Total Local Illumination:

    I=Iambient+Idiffuse+IspecularI = I_{ambient} + I_{diffuse} + I_{specular}I=Iambient​+Idiffuse​+Ispecular​

    B. Global Illumination Models

    • Consider light bouncing off other objects (reflections, refractions, shadows, caustics).
    • Methods include ray tracing, radiosity, photon mapping.
    • Produce more realistic images, but computationally expensive.

    3. Surface Modeling

    Surface modeling defines how surfaces reflect light. Types:

    A. Surface Types

    1. Matte / Diffuse surfaces – scatter light equally; appear soft.
    2. Shiny / Specular surfaces – reflect light in preferred directions.
    3. Transparent / Refractive surfaces – allow light to pass through, bending it according to Snell’s law.

    B. Surface Representation

    • Normals are essential for shading; computed per:

      • Vertex (for smooth shading)
      • Face (for flat shading)
    • Texture mapping adds fine-grained details without increasing geometry.


    4. Shading Techniques

    A. Flat Shading

    • Compute one color per polygon using the face normal.
    • Quick, but produces faceted look.

    B. Gouraud Shading

    • Compute vertex colors using normals and interpolate across polygon.
    • Smooth appearance, but can miss small specular highlights.

    C. Phong Shading

    • Interpolate normals across the polygon and compute color per pixel.
    • Produces high-quality smooth highlights.

    5. Summary Table

    Aspect Description
    Shading Determining pixel color based on light and surface properties
    Illumination Ambient, Diffuse, Specular (Local); Ray tracing, Radiosity (Global)
    Surface Modeling Matte, Shiny, Transparent; uses normals and textures
    Techniques Flat, Gouraud, Phong shading

    Key Points:

    • Shading combines light sources, surface orientation, and material properties to create realistic visuals.
    • Phong model is widely used for per-pixel lighting in modern graphics.
    • Surface modeling is crucial for defining how light interacts with objects, affecting realism.
    Previous topic 62
    Ray tracing
    Next topic 64
    Phong shading model

    Past Papers

    Open this section to load past papers

    Click on Show Past Papers to see past papers.
    On This Page
      Reading Stats
      Est. reading time4 min
      Word count728
      Code examples0
      DifficultyBeginner