Method and apparatus for shading graphical images in a data processing system
First Claim
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.
2 Assignments
0 Petitions
Accused Products
Abstract
The present invention provides an apparatus for displaying an image of an object, as illuminated by a light source, on a display within a computer graphics display system. The image is graphically represented by a mesh of polygons and each polygon within the mesh has a surface defined by a set of vertices. The vertices define the surface of the polygon. The apparatus includes a processor, such as a rasterizer, that is responsive to each set of vertices for rendering each surface within the mesh of polygons in response to ambient lighting to produce a number of initially rendered surfaces within the mesh of polygons. Phong shading is utilized by the present invention. The processor produces a specular highlight contribution for each surface within the mesh of polygons utilizing a halfway vector, pointing from each surface to a direction halfway between a light vector and a vector pointing towards a viewpoint, associated with a vector normal to each surface. Diffuse color contributions are generated within the processor using a light vector from a surface pointing to an illumination source associated with a vector normal to each surface. The specular highlight contribution and the diffuse color contribution for each surface of the initially rendered surfaces are summed to produce finally rendered surfaces within the mesh of polygons. These finally rendered polygons are used to display the image within the computer graphics display system.
-
Citations
11 Claims
-
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 Dependent Claims (2, 3, 4, 10)
-
-
5. A computer graphics system for displaying an image of an object, as illuminated by at least one light source, on a display within said 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 computer graphics system 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 Dependent Claims (6, 7, 8, 11)
-
-
9. A method for displaying an image of an object, as 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, wherein said computer graphics system includes a frame buffer memory, said method comprising:
-
storing at least one table in said frame buffer memory, wherein said at least one table is used to determine a specular highlight contribution and a diffuse color contribution; 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; initially rendering a selected number of surfaces within said mesh of polygons in response to ambient lighting to produce a plurality of initially rendered surfaces within said mesh of polygons in response to a signal containing vertices, said vertices defining a surface of a polygon within said mesh; producing a specular highlight contribution for a point on each surface within said mesh of polygons using said at least one table in response to a signal including a halfway vector, pointing from said 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 the point on each surface, said step of producing a specular highlight contribution, determining a dot product of a halfway vector with a vector normal to a point on each surface; 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 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 multiplying sn by a specular reflection coefficient of said object and by a specular color of said object to produce said specular highlight contribution; producing a diffuse color contribution for each surface within said mesh of polygons using said at least one table in response to a signal including a light vector associated with a vector normal to a point on each surface for producing a diffuse color contribution for a point on each surface within said mesh of polygons, said step of producing a diffuse color contribution including, determining a dot product of a light vector with a vector normal to a point on each surface; 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 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; generating an output signal including finally rendered surfaces from said initially rendered surfaces by adding said specular highlight contribution and said diffuse color contribution for each surface to each initially rendered surface; and displaying said image of said object within said computer graphics display system in response to said output signal including finally rendered surfaces within said mesh of polygons.
-
Specification