Method and apparatus for shading images
First Claim
1. An apparatus for generating shading values of graphic objects for display at a predetermined location on a graphics display device, said graphic objects comprising vectors, curves, polygons and patches, each graphic object defined by graphic object pixel data initially comprising a representation of the color of the graphic object, said graphic object shaded according to a light source, said device comprising a central processing unit (CPU), memory, a frame buffer and a display device which displays the pixel data stored in the frame buffer, said apparatus comprising:
- means for modifying the graphic object pixel data according to specular and diffuse functions to include specular and diffuse shading values for the graphic object,said specular function determined from specular shading scan line values, an object specular exponent for the graphic object and a surface normal vector for the graphic object, said specular shading scan line values being determined according to the dot product of the surface normal vector and unit vector in the direction of maximum highlight,said diffuse function determined from diffuse shading scan line values, a coefficient of ambient reflection of the graphic object, the surface normal vector for the graphic object, a pattern memory relevant to the graphic object, said diffuse shading scan line values being determined according to the dot product of the surface normal vector and a unit vector in the direction of the light source;
means or modifying the graphic object pixel data to produce a depth cue effect according to a depth cue function, said depth cue function determined for a depth cue color for the graphic object, said background color and the graphic object pixel data;
means for modifying the graphic object pixel data to produce an anti-aliase effect according to an anti-aliase function, said anti-aliase function determined from a modified Bresenham error function, and the pixel data read from the frame buffer located at the predetermined location the graphic object is to be displayed;
means for modifying he graphic object pixel data to produce a transparency effect according to a transparency function, said transparency function determined from a transparency coefficient for the graphic object, pixel data read from the frame buffer located at the predetermined location the graphic object is to be displayed and the graphic object pixel data;
means for organizing the means for modifying the graphic object pixel data according to specular and diffuse functions, means for modifying ht graphic object pixel data to produce an anti-aliase effect, means for modifying the graphic object pixel data to produce a depth cue effect and means for modifying the graphic object pixel data to produce a transparency effect in a pipeline structure, said pipeline structure comprising means which serially connect said means for modifying the graphic object pixel data according to specular and diffuse functions, means for modifying the graphic object pixel data to produce an anti-aliase effect, means for modifying the graphic object pixel data to produce a depth cue effect and means for modifying the graphic object pixel data to produce a transparency effect such that the output of one means is connected to the input of another means, the first means connected in the pipeline structure having unmodified graphic object pixel data as one of its input and the last means connected in the pipeline being input to he frame buffer and having as its output the modified pixel data a reflective of a shaded image of the graphic object;
means for the CPU to selectively enable said means for modifying the graphic object pixel data according to specular and diffuse functions, means for modifying the graphic object pixel data to produce an anti-aliase effect, means for modifying the graphic object pixel data to produce a depth cue effect and means for modifying the graphic object pixel data to produce a transparency effect according to the type of graphic object the graphic object pixel data defines; and
means for the frame buffered to receive the output of the last means connected in the pipeline structure and the frame buffered for subsequent display of the shaded image of the graphic object.
0 Assignments
0 Petitions
Accused Products
Abstract
The present invention provides unique methods and apparatus for shading curves, polygons and patches, implementing Phong, Gouraud and other shading techniques in the rendering of images on a cathode ray tube or other display device. The present invention also includes a unique method and apparatus for shading patches by rendering a series of adjacent curves such that no pixel gaps exist between each rendered curve.
79 Citations
22 Claims
-
1. An apparatus for generating shading values of graphic objects for display at a predetermined location on a graphics display device, said graphic objects comprising vectors, curves, polygons and patches, each graphic object defined by graphic object pixel data initially comprising a representation of the color of the graphic object, said graphic object shaded according to a light source, said device comprising a central processing unit (CPU), memory, a frame buffer and a display device which displays the pixel data stored in the frame buffer, said apparatus comprising:
-
means for modifying the graphic object pixel data according to specular and diffuse functions to include specular and diffuse shading values for the graphic object, said specular function determined from specular shading scan line values, an object specular exponent for the graphic object and a surface normal vector for the graphic object, said specular shading scan line values being determined according to the dot product of the surface normal vector and unit vector in the direction of maximum highlight, said diffuse function determined from diffuse shading scan line values, a coefficient of ambient reflection of the graphic object, the surface normal vector for the graphic object, a pattern memory relevant to the graphic object, said diffuse shading scan line values being determined according to the dot product of the surface normal vector and a unit vector in the direction of the light source; means or modifying the graphic object pixel data to produce a depth cue effect according to a depth cue function, said depth cue function determined for a depth cue color for the graphic object, said background color and the graphic object pixel data; means for modifying the graphic object pixel data to produce an anti-aliase effect according to an anti-aliase function, said anti-aliase function determined from a modified Bresenham error function, and the pixel data read from the frame buffer located at the predetermined location the graphic object is to be displayed; means for modifying he graphic object pixel data to produce a transparency effect according to a transparency function, said transparency function determined from a transparency coefficient for the graphic object, pixel data read from the frame buffer located at the predetermined location the graphic object is to be displayed and the graphic object pixel data; means for organizing the means for modifying the graphic object pixel data according to specular and diffuse functions, means for modifying ht graphic object pixel data to produce an anti-aliase effect, means for modifying the graphic object pixel data to produce a depth cue effect and means for modifying the graphic object pixel data to produce a transparency effect in a pipeline structure, said pipeline structure comprising means which serially connect said means for modifying the graphic object pixel data according to specular and diffuse functions, means for modifying the graphic object pixel data to produce an anti-aliase effect, means for modifying the graphic object pixel data to produce a depth cue effect and means for modifying the graphic object pixel data to produce a transparency effect such that the output of one means is connected to the input of another means, the first means connected in the pipeline structure having unmodified graphic object pixel data as one of its input and the last means connected in the pipeline being input to he frame buffer and having as its output the modified pixel data a reflective of a shaded image of the graphic object; means for the CPU to selectively enable said means for modifying the graphic object pixel data according to specular and diffuse functions, means for modifying the graphic object pixel data to produce an anti-aliase effect, means for modifying the graphic object pixel data to produce a depth cue effect and means for modifying the graphic object pixel data to produce a transparency effect according to the type of graphic object the graphic object pixel data defines; and means for the frame buffered to receive the output of the last means connected in the pipeline structure and the frame buffered for subsequent display of the shaded image of the graphic object. - View Dependent Claims (2, 3, 4, 5, 6, 7, 8, 9, 10, 11)
-
-
12. A method for generating shading values of graphic objects for display at predetermined locations on a graphics display, said graphic objects comprising vectors, curves, polygons and patches, each graphic object defined by graphic object pixel data initially comprising a representation of the color of the graphic object, each graphic object shaded according to a light source, said device comprising a central processing unit (CPU), memory, a frame buffer and a display which displays the data stored in the frame buffer, said method comprising the steps of:
-
selectively computing specular and diffuse shading values for the graphic object according to specular and diffuse shading functions and combining said specular and diffuse shading values for the graphic object width the graphic object pixel data to modify graphic object pixel data to include the specular and diffuse shading values, said specular function determined from specular shading scanline values, an object specular exponent for the graphic object, a light color with respect to the graphic object and a surface normal vector for the graphic object, said specular shading scan line values being determined according to the dot product of the surface normal vector and unit vector in the direction of maximum highlight, said diffuse function determined from diffuse shading scan line values, a coefficient of ambient reflection for the graphic object, the surface normal vector for the graphic object, a pattern memory relevant to the graphic object, said diffuse shading scan line values being determined according to the dot product of the surface normal vector and a unit vector toward the light source; selectively modifying the graphic object pixel data to produce a depth cue effect according to a a depth cue function, said depth cue function determined from a depth cue color for the graphic object, the background color and the graphic object pixel data; selectively modifying the graphic object pixel data to produce an anti-aliase effect according to an anti-aliase functions is anti-aliase function determined from a modified Bresenham error function, the graphic object pixel data and the pixel data from the frame buffer located at the predetermined location the graphic object is to be displayed; selectively modifying the graphic object pixel data to produce a transparency effect according to a transparency function, said transparency function determined from a transparency coefficient for the graphic object, pixel data brad from the frame buffer located at the predetermined location the graphic object is to be displayed and the graphic object pixel data; selecting the functions to modify the graphic object pixel data according to the type of graphic object to genrate a shaded image of the graphic object; and outputting the modified graphic object pixie data to the frame buffer for display of the shaded image. - View Dependent Claims (13, 14, 15, 16, 17, 18, 19, 20, 21, 22)
-
Specification