Part of the Khronos Group
OpenGL.org

The Industry's Foundation for High Performance Graphics

from games to virtual reality, mobile phones to supercomputers

Results 1 to 6 of 6

Thread: Normals and gouraud shading ?

  1. #1
    Junior Member Newbie
    Join Date
    May 2001
    Location
    aulnay, france
    Posts
    19

    Normals and gouraud shading ?

    Hi !
    can somebody else tell me what is exactly gouraud shading ?
    in my code :
    1) i define normals for each of my facets
    2) i calculate normals for each vertex, by averaging the neighboring facets normals

    what is the behaviour of OpenGL with such normals, and what Gouraud shading can add ?

    thanks
    phanie
    phanie

  2. #2
    Senior Member OpenGL Pro
    Join Date
    Jun 2000
    Location
    Shreveport, LA, USA
    Posts
    1,505

    Re: Normals and gouraud shading ?

    Gouraud shading is independent of vertex normals. Except if you have lighting enabled in which case it is only indirectly dependent on the vertex normals. What you get from Gourard shading is a simple pseudo surface smoothing effect, and a better appearance overall.

  3. #3
    Member Regular Contributor
    Join Date
    May 2000
    Location
    Oxford, England
    Posts
    471

    Re: Normals and gouraud shading ?

    ie, colours are computed at each vertex and interpolated (blended) across the surface. These colours can be specified with glColor*() or if lighting is enabled, these colours are computed using the lighting equations. Here the vertex normals are used to calculate the colour (and other stuff like lighting properties, material properties etc).

    Gouraud shading falls down if the polygon is very large and a light patch should appear in the center. This is because only lighting at the vertices is calculated. Phong shading is the next step up, but takes a lot longer to calculate. If you get this problem, subdivide your polygons.

  4. #4
    Junior Member Newbie
    Join Date
    May 2001
    Location
    aulnay, france
    Posts
    19

    Re: Normals and gouraud shading ?

    thanks for your answers !
    phanie

  5. #5
    Junior Member Newbie
    Join Date
    Jun 2001
    Posts
    15

    Re: Normals and gouraud shading ?

    Gouraud shading falls down if the polygon is very large and a light patch should appear in the center. This is because only lighting at the vertices is calculated. Phong shading is the next step up, but takes a lot longer to calculate. If you get this problem, subdivide your polygons.

    I have a similar problem.
    I have a big wall and I want to light this in
    the center.
    How subdivide the wall?

  6. #6
    Member Regular Contributor
    Join Date
    May 2000
    Location
    Oxford, England
    Posts
    471

    Re: Normals and gouraud shading ?

    split your 1 polygon into say 4x4 polys or 101x polys etc. All depends on the size of the area

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •