×

Method and apparatus for shading graphical images in a data processing system

  • US 5,659,671 A
  • Filed: 04/25/1996
  • Issued: 08/19/1997
  • Est. Priority Date: 09/30/1992
  • Status: Expired due to Term
First Claim
Patent Images

1. An apparatus for displaying an image of an object, being illuminated by at least one light source, on a display within a computer graphics display system, wherein said image is graphically represented by a mesh of polygons and wherein each polygon within said mesh has a surface defined by a set of vertices, said surface having a plurality of points, said apparatus comprising:

  • a frame buffer memory;

    at least one table stored in said frame buffer memory, said at least one table containing values representing sn, wherein s is a first normalized dot product and n is an exponential value, wherein said at least one table is used to determine a specular highlight contribution and a diffuse color contribution;

    processor means responsive to each set of vertices defining a surface of a polygon within said mesh and responsive to ambient light for rendering a selected number of surfaces within said mesh of polygons to produce a plurality of initially rendered surfaces within said mesh of polygons;

    specular highlight contribution means responsive to a halfway vector, within said processor means, said halfway vector pointing from a point on each surface to a direction halfway between a light vector and a vector pointing towards a viewpoint and being associated with a vector normal to a point on each surface, for producing a specular highlight contribution for said point on each surface within said mesh of polygons using said at least one table, said specular highlight contribution means including,means for determining a dot product of a halfway vector with a vector normal to a point on each surface;

    means for dividing said dot product by the magnitude of said vector normal to said point on each surface multiplied by the magnitude of said halfway vector to produce a first normalized dot product; and

    means for retrieving sn from said at least one table in response to determining said first normalized dot product, wherein s and n are both utilized as parameters for determining sn from said at least one table; and

    means for multiplying sn by a specular reflection coefficient of said object and by a specular color of said object to produce said specular highlight contribution;

    diffuse color contribution means, responsive to said light vector associated with a vector normal to said point on each surface, within said processor means, for producing a diffuse color contribution for said point on each surface within said mesh of polygons using said at least one table, said diffuse color contribution means including,means for determining a dot product of a light vector with a vector normal to a point on each surface;

    means for dividing said dot product by the magnitude of said vector normal to each surface multiplied by the magnitude of said light vector to produce a second normalized dot product; and

    means for multiplying said second normalized dot product by a diffuse reflection coefficient of said object and by a diffuse color of said object to produce said diffuse color contribution;

    summation means within said processor means for adding said specular highlight contribution and said diffuse color contribution for said point on each surface to said plurality of initially rendered surfaces to produce a plurality of finally rendered surfaces within said mesh of polygons, wherein said summation means is connected to said specular highlight contribution means and said diffuse color contribution means; and

    display means for displaying said image of said object within said computer graphics display system utilizing said plurality of finally rendered surfaces within said mesh of polygons.

View all claims
  • 2 Assignments
Timeline View
Assignment View
    ×
    ×