Method system and computer program product for shading
First Claim
1. A method for shading a computer graphics image, the computer graphics image including an object surface, comprising the steps of:
- building an object space transform matrix that defines a transformation from eye space to object space;
transforming a shading vector defined at a point in eye space into object space defined by said object space transform matrix to form a corresponding object space shading vector;
performing a vector operation between said object space shading vector and a perturbed normal in object space at said point; and
computing a shading value for said point based on said vector operation performed in said performing step;
whereby, said shading value can be mapped to a pixel to shade the object surface.
3 Assignments
0 Petitions
Accused Products
Abstract
A method, system, and computer program product are provided for accelerated shading of an object surface by bump mapping in tangent space or object space. A tangent space transform module builds a tangent space transform matrix M(p) having elements comprised of normal, tangent, and binormal vector components determined at a surface point on the object surface. The tangent space transform module further transforms shading vectors, such as, lighting and viewing vectors, into a tangent space defined by the tangent space transform matrix and outputs corresponding tangent space shading vectors. A bump mapping module performs vector operations between one or more tangent space shading vectors and a perturbed normal N'"'"' in tangent space. A texture memory stores a surface dependent or a surface independent tangent space perturbed normal texture map. The lighting module computes a shading value for the surface point based on the vector operations. The shading value can be then be mapped to a pixel to shade the object surface rendered on a computer graphics display. In one example, the bump mapping module outputs diffuse and specular components. The diffuse component corresponds to a first dot product between a normalized, interpolated tangent space lighting vector and three perturbed normal components Nx'"'"', Ny'"'"', and Nz'"'"'. The specular component corresponds to a second dot product between a normalized, interpolated tangent space half angle vector and three perturbed normal components Nx'"'"', Ny'"'"', and Nz'"'"'. Different types of shading vectors and lighting equations can be used depending upon the chosen illumination model. For bump mapping in object space, an object space transformation, such as the inverse of a modelview matrix, is used to define a transformation from eye space to object space for shading vectors. A bump mapping module performs a vector operation between an object space shading vector and a perturbed normal in object space to compute a shading value.
-
Citations
41 Claims
-
1. A method for shading a computer graphics image, the computer graphics image including an object surface, comprising the steps of:
-
building an object space transform matrix that defines a transformation from eye space to object space; transforming a shading vector defined at a point in eye space into object space defined by said object space transform matrix to form a corresponding object space shading vector; performing a vector operation between said object space shading vector and a perturbed normal in object space at said point; and computing a shading value for said point based on said vector operation performed in said performing step;
whereby, said shading value can be mapped to a pixel to shade the object surface. - View Dependent Claims (2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15)
-
-
16. A system for shading a computer graphics image, the computer graphics image including an object surface, the system comprising:
-
an object space transform module; a bump mapping module; and a lighting module; wherein said object space transform module builds an object space transform matrix and transforms a shading vector at said point into object space defined by said object space transform matrix to form a corresponding object space shading vector, said object space shading vector being output to said bump mapping module, and said bump mapping module performs a vector operation between said object space shading vector and a perturbed normal in object space at said point, and provides an output representative of said vector operation, and said lighting module computes a shading value for said point based on said vector operation output;
whereby, said shading value can be mapped to a pixel to shade the object surface. - View Dependent Claims (17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30)
-
-
31. A system for shading an object surface, the system comprising:
-
means for building an object space transform matrix that defines a transformation from eye space to object space; means for transforming a shading vector defined at a point in eye space into object space defined by said object space transform matrix to form a corresponding object space shading vector; means for performing a vector operation between said object space shading vector and a perturbed normal in object space at said point; and means for computing a shading value for said point based on said vector operation;
whereby, said shading value can be mapped to a pixel to shade the object surface when rendered on a computer graphics display.
-
-
32. A computer program product comprising a computer useable medium having computer program logic recorded thereon for enabling a graphics processor in a computer system to shade an object surface in a computer graphic image, said computer program logic comprising:
-
means for enabling the graphics processor to build an object space transform matrix that defines a transformation from eye space to object space; means for enabling the graphics processor to transform a shading vector defined at a point in eye space into object space defined by said object space transform matrix to form a corresponding object space shading vector; means for enabling the graphics processor to perform a vector operation between said object space shading vector and a perturbed normal in object space at said point; and means for enabling the graphics processor to compute a shading value for said point based on said vector operation;
whereby, said shading value can be mapped to a pixel to shade the object surface when rendered on a computer graphics display.
-
-
33. A system for shading a computer graphics image, the comprising:
-
Phong shading hardware; a texture memory for storing an object space perturbed normal texture map; and a switch coupled between said Phong shading hardware and said texture memory; whereby, object space bump mapping can shade the computer graphics image when said switch is in a state connecting said texture memory to said Phong shading hardware. - View Dependent Claims (34, 35)
-
-
36. A method for shading a computer graphics image, the computer graphics image including an object surface, comprising the steps of:
-
fetching a normal vector for the object surface from memory, said normal vector being defined in terms of a coordinate space; transforming a shading vector into said coordinate space; and performing a lighting computation in said coordinate space using said normal vector and said transformed shading vector.
-
-
37. A system for shading a computer graphics image, the computer graphics image including an object surface, comprising:
-
means for fetching a normal vector for the object surface from memory, said normal vector being defined in terms of a coordinate space; means for transforming a shading vector into said coordinate space; and means for performing a lighting computation in said coordinate space using said normal vector and said transformed shading vector.
-
-
38. A computer program product comprising a computer useable medium having computer program logic recorded thereon for enabling a graphics processor in a computer system to shade an object surface in a computer graphic image, said computer program logic comprising:
-
means for enabling the graphics processor to fetch a normal vector for the object surface from memory, said normal vector being defined in terms of a coordinate space; means for enabling the graphics processor to transform a shading vector into said coordinate space; and means for enabling the graphics processor to perform a lighting computation in said coordinate space using said normal vector and said transformed shading vector.
-
-
39. A method for shading a computer graphics image, the computer graphics image including an object surface, comprising the steps of:
-
fetching a perturbed normal vector for the object surface from memory, said perturbed normal vector being defined in terms of a coordinate space; transforming a shading vector into said coordinate space; and performing a lighting computation in said coordinate space using said perturbed normal vector and said transformed shading vector.
-
-
40. A system for shading a computer graphics image, the computer graphics image including an object surface, comprising:
-
means for fetching a perturbed normal vector for the object surface from memory, said perturbed normal vector being defined in terms of a coordinate space; means for transforming a shading vector into said coordinate space; and means for performing a lighting computation in said coordinate space using said perturbed normal vector and said transformed shading vector.
-
-
41. A computer program product comprising a computer useable medium having computer program logic recorded thereon for enabling a graphics processor in a computer system to shade an object surface in a computer graphic image, said computer program logic comprising:
-
means for enabling the graphics processor to fetch a perturbed normal vector for the object surface from memory, said perturbed normal vector being defined in terms of a coordinate space; means for enabling the graphics processor to transform a shading vector into said coordinate space; and means for enabling the graphics processor to perform a lighting computation in said coordinate space using said perturbed normal vector and said transformed shading vector.
-
Specification