US2005168466A1PendingUtilityA1

Method and apparatus for providing shading in a graphic display system

Priority: Jun 27, 1997Filed: Dec 21, 2004Published: Aug 4, 2005
Est. expiryJun 27, 2017(expired)· nominal 20-yr term from priority
Inventors:David Collodi
G06T 15/80G06T 15/506G06T 15/50
41
PatentIndex Score
0
Cited by
0
References
0
Claims

Abstract

A method and apparatus for shading polygons in a graphics rendering system is provided. The method includes the step of providing, for each polygon to be shaded, a polygon coordinate system defined by three normalized vectors which represent the X, Y and Z axes. A light source defining a three dimensional light direction vector is further provided. The three dimensional light vector is rotated to correspond with the polygon direction vector. The rotated three dimensional light vector is converted into a two dimensional-vector whose length is proportional to the angle between the polygon Z vector and the light direction vector. Another aspect of the present invention involves the interpolation of two dimensional vertex angle values, provided for each of the polygon's vertices, at each drawn pixel within the polygon surface. A bump map vector value is added to the interpolated vertex value forming a two dimensional composite surface angle vector. Light coefficients are then derived from the distance between the composite surface angle vector and the two dimensional light vectors.

Claims

exact text as granted — not AI-modified
1 . A method for shading polygon surfaces in a rendering system comprising the steps of: 
 providing a polygon within the scene database to be shaded a polygon coordinate system defined by three normalized vectors which represent the X, Y and Z axes;    providing a light source defining a three-dimensional light source direction vector;    rotating the three-dimensional light source direction vector to correspond with the polygon coordinate system in order to provide a rotated three-dimensional light source direction vector; and    converting the rotated three-dimensional light source direction vector into a two-dimensional vector whose length is proportional to the angle between the polygon Z vector and the three-dimensional light source direction vector.    
   
   
       2 . The method for shading polygons of  claim 1  further comprising the steps of: 
 providing a three-dimensional light specularity vector;    rotating the three-dimensional light specularity vector to correspond with the polygon coordinate system; and    converting the rotated three-dimensional light specularity vector into a two-dimensional vector whose length is proportional to the angle between the polygon Z vector and the three-dimensional light specularity vector.    
   
   
       3 . The method for shading polygons of claims  1  or  2 , wherein the step of converting the rotated three-dimensional Light source direction vector into a two-dimensional vector comprises the steps of: 
 determining a value of proportionality from the component values of the light source direction vector;    dropping, from the three-dimensional light source direction vector, the vector component corresponding to a Z-coordinate and leaving the two remaining components; and    scaling the remaining components by the value of proportionality in order to create the two-dimensional vector whose length is proportional to the angle between the polygon Z vector and the light source direction vector.    
   
   
       4 . The method for shading polygons of  claim 3 , wherein the step of determining a value of proportionality is determined by:  
     
       
         
           
             r 
             = 
             
               
                 2 
                 ⁢ 
                 
                     
                 
                 ⁢ 
                 
                   cos 
                   
                     l 
                     _ 
                   
                 
                 ⁢ 
                 
                     
                 
                 ⁢ 
                 C 
               
               
                 π 
                 ⁢ 
                 
                     
                 
                 ⁢ 
                 
                   
                     1 
                     - 
                     
                       C 
                       2 
                     
                   
                 
               
             
           
         
       
     
     where r is said value of proportionality and C is the Z component of the three-dimensional light source direction vector.  
   
   
       5 . The method of shading polygons according to  claim 3  wherein the step of determining a value of proportionality includes the step of providing a lookup table which is indexed by one or more component values of said three-dimensional light source direction vector.  
   
   
       6 . A method for determining lighting coefficients for a pixel residing on a polygon surface within a polygon graphics system comprising the steps of: 
 providing a two-dimensional vertex angle vector for each of the polygon's vertices;    providing a two-dimensional light source direction vector;    interpolating the vertex angle vectors for each drawn pixel on the polygon surface;    combining the interpolated vertex angle vector with a two-dimensional bump map vector to produce a composite surface angle vector; and    obtaining a diffuse light coefficient value from a function of the distance between the composite surface angle vector and the two-dimensional light source direction vector.    
   
   
       7 . The method for determining pixel lighting coefficients of  claim 6  further comprising the steps of: 
 providing a two-dimensional light specularity vector;    obtaining a specular light coefficient value from a function of the distance between the composite surface angle vector and the two-dimensional light specularity vector.    
   
   
       8 . The method for determining pixel lighting coefficients of  claim 7  wherein the step of obtaining a diffuse light coefficient value from a function of the distance between the composite surface angle vector and the two-dimensional light source direction vector includes the step of providing a lookup table for the determination of the distance function.  
   
   
       9 . The method for determining pixel lighting coefficients of  claim 8  wherein the step of obtaining a specular light coefficient value from a function of the distance between the composite surface angle vector and the two-dimensional light specularity vector includes the step of providing a look-up table for the determination of the distance function.  
   
   
       10 . A system for shading polygon surfaces in a rendering system, the system comprising a computer having: 
 a database having a first set of data representing the orientation of the polygon and a second set of data representing a three-dimensional light source direction vector;    a processor operatively connected to receive the first and second sets of data and including a logic element capable of a) generating a rotated three-dimensional light source direction vector corresponding with a polygon coordinate system of the polygon and b) converting the rotated three-dimensional light source direction vector into a two-dimensional vector representative of the three-dimensional tight source direction vector; and    a display operatively connected to the processor.    
   
   
       11 . The system of  claim 10  wherein the database includes a third set of data corresponding to a three-dimensional Light specularity vector and the logic element of the processor having a logic element capable of a) generating a rotated three-dimensional light specularity vector and b) converting the rotated three-dimensional light specularity vector into a two-dimensional vector representative of the three-dimensional light specularity vector.  
   
   
       12 . The system of claim II wherein the logic element of the processor is further capable of generating a variable scaler quantity r useful in generating the two-dimensional vectors.  
   
   
       13 . The system of  claim 11  wherein the database includes a fourth set of data further comprising a variable scaler quantity r useful in generating the two-dimensional vectors.  
   
   
       14 . An system for determining lighting coefficients for a pixel residing on a polygon surface within a polygon graphics system, the system having a computer comprising: 
 a database having a first set of data representing a bump map for the polygon and second set of data corresponding to a plurality of surface angle vectors representing the orientation of the polygon;    a processor operatively connected to receive the first and second sets of data and including a logic element capable of a) interpolating the surface angle vectors, b) combining an interpolated surface angle vector with a two-dimensional bump map vector for the database to produce a composite surface angle vector, and c) determining a diffuse light coefficient value from a function of the distance between the composite surface angle vector and a two-dimensional light source direction vector stored in the database; and    a display operatively connected to the processor.    
   
   
       15 . The system of  claim 14  wherein the logic element of the processor is further capable of or obtaining a specular light coefficient value from a function of the distance between the composite surface angle vector and a two-dimensional light specularity vector stored in the database.  
   
   
       16 . The system of  claim 15  wherein the database includes data useful in the determination of the distance function for the two-dimensional light source direction vector.  
   
   
       17 . The system of  claim 16  wherein the database includes data useful in the determination of the distance function for a two-dimensional light specularity vector.  
   
   
       18 . A method for lighting surfaces in a rendering system comprising the steps of: 
 providing a scene database including a polygon having a polygon surface represented by three-dimensional vectors;    providing a light source defining a three-dimensional light source direction vector;    providing a bump map;    rotating the light source direction vector to a (3D) polygon orientation at each vertex;    interpolating the rotated light source direction vector at each vertex;    calculating, using dedicated pixel shading computer hardware, a lighting equation to provide a shading value for substantially each drawn pixel residing on the polygon surface using the bump map and the interpolated light source direction vector, the dedicated computer hardware configured to produce a shading value using linear calculations and only mathematical functions selected from the group of addition, subtraction, multiplication and division whereby a display signal incorporating the shading values is generated without using a square root calculation.    
   
   
       19 . The method of  claim 18  wherein the light source is point light source.  
   
   
       20 . The method of  claim 19  wherein the step of interpolating includes interpolating a surface normal vector.  
   
   
       21 . The method of  claim 20  wherein the step of calculating a lighting equation includes the use of a reference map which includes information useful in the determination of a shading value.  
   
   
       22 . The method of  claim 21  wherein the step of calculating a lighting equation includes calculating a surface normal vector per pixel.  
   
   
       23 . The method of  claim 22  wherein the surface normal vector is calculated using the bump map.  
   
   
       24 . The method of  claim 23  wherein the bump map is contained at least partially in local texture memory.  
   
   
       25 . The method of  claim 24  wherein a bump map vector is calculated for substantially each pixel.  
   
   
       26 . The method of  claim 25  wherein the bump map vector is combined with the surface normal vector.  
   
   
       27 . A system for lighting surfaces in a rendering system comprising: 
 a scene database including polygon information corresponding to a polygon with the polygon surface represented by three-dimensional vectors and light source information including a three-dimensional (3-D) light source direction vector;    a bump map;    a graphics processing unit including logic that rotates the light source direction vector to a (3-D) polygon orientation at each vertex and interpolates the rotated light source direction vector at each vertex, the graphics processing unit having dedicated pixel shading computer hardware to calculate a lighting equation to provide a shading value for substantially each drawn pixel residing on the polygon surface using the bump map and the interpolated light source direction vector, the dedicated computer hardware configured to produce a shading value using linear calculations and only mathematical functions selected from the group of addition, subtraction, multiplication and division whereby a display signal incorporating the shading values is generated without using a square root calculation.    
   
   
       28 . The system of  claim 27  wherein the light source is a point light source.  
   
   
       29 . The system of  claim 28  wherein the processing unit includes hardware logic that interpolates a surface normal vector.  
   
   
       30 . The system of  claim 29  wherein the processing unit includes hardware logic operable to calculate a surface normal vector per pixel.  
   
   
       31 . The system of  claim 30  wherein the processing unit includes hardware logic operable to receive information from the bump map to calculate the surface normal vector.  
   
   
       32 . The system of  claim 31  wherein the bump map is contained at least partially in a local texture memory.  
   
   
       33 . The system of  claim 32  wherein the processing unit includes hardware logic operable to calculate a bump map vector for substantially each pixel.  
   
   
       34 . The system of  claim 33  wherein the process includes hardware logic operable to combine the bump map vector with the surface normal vector.

Join the waitlist — get patent alerts

Track US2005168466A1 — get alerts on status changes and closely related new filings.

We store only your email — no account needed. See our privacy policy.