GB2207585A - Method and apparatus for shading images - Google Patents

Method and apparatus for shading images Download PDF

Info

Publication number
GB2207585A
GB2207585A GB08811392A GB8811392A GB2207585A GB 2207585 A GB2207585 A GB 2207585A GB 08811392 A GB08811392 A GB 08811392A GB 8811392 A GB8811392 A GB 8811392A GB 2207585 A GB2207585 A GB 2207585A
Authority
GB
United Kingdom
Prior art keywords
function
implementing
shading
color
specular
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
GB08811392A
Other versions
GB8811392D0 (en
GB2207585B (en
Inventor
Sheue-Ling Lien
Michael J Shantz
Susan E Carrie
Jim Van Loo
David Elrod
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Sun Microsystems Inc
Original Assignee
Sun Microsystems Inc
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Sun Microsystems Inc filed Critical Sun Microsystems Inc
Publication of GB8811392D0 publication Critical patent/GB8811392D0/en
Publication of GB2207585A publication Critical patent/GB2207585A/en
Application granted granted Critical
Publication of GB2207585B publication Critical patent/GB2207585B/en
Anticipated expiration legal-status Critical
Expired - Fee Related legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T15/003D [Three Dimensional] image rendering
    • G06T15/50Lighting effects
    • G06T15/80Shading
    • G06T15/83Phong shading
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T15/003D [Three Dimensional] image rendering
    • G06T15/50Lighting effects
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T15/003D [Three Dimensional] image rendering
    • G06T15/50Lighting effects
    • G06T15/80Shading
    • G06T15/87Gouraud shading

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Graphics (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Theoretical Computer Science (AREA)
  • Image Generation (AREA)

Description

2 2 0 7 5 -R 5
- 1 METHOD AND APPARATUS FOR SHADING IMAGES FIELD OF THE INVENTIO11
The present application hereby incorporates by reference co-pending U.S. patent applications; UMethod and Apparatus for Adaptive Forward Differencing in the Rendering of Curves and Surfaces," serial no. 07/047, 696; "Method and Apparatus for Rendering Vectors Using Bresenham Parameters," serial no. 07/047,693; and "Method and Apparatus for Deriving Instantaneous Reciprocals of the Homogenous coordinate w for use in Defining Images on a Display."
The present invention relates to methods and apparatus for generating images on a cathode ray tube (11CRT11) or other display device. More particularly, the present invention relates to methods and apparatus for the painting of curves, curved surfaces, vectors, polygons or objects on a CRT or other display device.
BACKGROUND OF THE INVENTION
In many computer systems, it is quite common to represent and convey information to a user through digitial images. These images may take a variety of forms, such as, for example, alpha numeric characters, cartesian graphs, and other pictorial representations. In many applications, the digital images are conveyed to a user on a display device, such as a raster scan video monitor, printer or the like. Typically, the images to be displayed are stored in digital form, manipulated and then displayed.
in rendering an image on a cathode ray tube, the coordinants for each pixel of an image being rendered must be calculated, as well as such valdes as the color, transparency, depth cue, haze and specular and diffuse factors for each such pixel. Rendering a pixel so that it Illustrates a characteristic k of an object being rendered (i.e. a three-dimensional object) to reflect depth, closeness to the view, reflection from light sources, etc. is known as "shading" the pixel.
Several shading techniques are used for generating smoothly shaded images of surfaces approximated by three dimensional parametric patches or polygons. One such well known technique is Phong shading, which is a desirable shading technique because it gives a fairly realistic rendering of the desired image with a modest computational cost. Most threedimensional computer-aided design applications give highest priority to interactive performance and therefore often utilize the realism afforded by Phong shading. Another well-known shading technique is called Gouraud shading, which performs linear interpolation of color over the individual polygons being rendered and which is less accurate than Phong shading. Polygon approximations of curved surfaces are used for performance reasons, since most prior art high-speed graphics hardware is built for fast rendering of polygons. A typical bi-cubic patch, for example, may require 100 or more polygons to give a reasonably accurate approximation of the desired patch. Many design applications would be greatly facilitated if smooth, highspeed, curved surface rendering were available.
Accordingly,-it is a principal object of the present invention to provide a parametric patch rendering method and apparatus, which uses relatively simple hardware to do Phong shading directly without slowing down the pixel rendering rate.
Another object of the present invention is to provide a method and apparatus for the rendering of images having uniform bivariate surface patches as well as non-uniform rational B-spline surfaces.
Accordingly, in the present invention, bi-cubic 9 3 - functions which approximate the shading parameters are derived and evaluated, by adaptive forward differencing circuits (AFDU) to provide a shaded color at each pixel along a parametric curve. [Note: adaptive forward differencing circuits (AlDU) will later be explained.] The present invention provides an apparatus for accurately and quickly shading vectors and polygons at a much faster rate, and without any appreciable loss in quality, than was heretofore available under prior art methods. [For a more thorough understanding of Phong shading and shading of polygons, vectors, curves and other objects, see: Bui Tuong- Phong, Illumination For Computer-Generated Images, UTEC-CS c-73-129, July 1973; Tom Duff, USmoothly Shaded Renderings Of Polyhedral objects on Raster Displays," Computer Graphics, Volume 13, No. 2, August 1979; Steven A. Coon, 0Surfaces For Computer-Aided Design Of Space Forms,11 Project MAC, Massachusetts Institute of Technology, MAC-TR-41, June, 1967; Bishop and Weimer, "Fast Phong Shading," Computer Graphics, Volume 20, No. 4, August 1986; M. Shantz and S-L Lien, "Shading Bicubic Patches," Computer Graphics, Volume 21, No. 4, July, 1987; Sheue-Ling Lien, Michael Shantz and Vaughan Pratt, "Adaptive Forward Differencing For Rendering Curves And Surfaces," úgmputer Graphics, Volume 21, July, 1987.]
BRIEF SUMMARY OF THE INVENTION
The aforementioned objects are accomplished in a method and apparatus for shading vectors and curves on a display device. The apparatus comprises a means for implementing a first function, said first function comprising:
Tc [PB1] + (1 - To) X: where Tc equals a transparency factor; PB 1 equals a first pixel buffer of data fed back from a frame buffer from each pixel address along an object such as a curve, and where X represents a second function; the apparatus for shading vectors and curves also comprising a means for implementing the second function, the second function comprising: Be [PB 21 + (1 - Be) Y: where Be = a modified Bresenham error factor which is calculated by the apparatus of the present invention; where PB 2 a second pixel buffer of data fed back from the frame buffer and where Y represents a third function. The above described apparatus also comprises a means for implementing a third function, the third function comprising: Z[Cd) + (1 - Z) [PM): where Z.'represents a depth volume or distance of the object from the viewer; Cd represents a "haze" or background color, and wherein PM represents intrinsic curve color from a pattern memory. Finally, the apparatus for shading vectors and curves includes a means for combining the above implementations of the first, second and third functions together, to comprise the implementation of Tc(PB1) + (1 - Tc) [Be (PB 2) + (1 - Be) [Z (Cd) + 1-Z (PM)]] thereby shading the curve and vector being rendered.
The present invention also includes a means for shading ' A '.
k polygons comprising a means for Implementing a first function, the first function comprising:
Tc IPB] + (1 - Tc) X; where Tc = a transparency factor; PB = pixel buffer of data fed back from the frame buffer, and where X represents a second function. The apparatus for shading polygons also includes a means for implementing the second function, the second function comprising:
Z [Cd) + (1 - Z) [diffuse [IM] + specular [Le]]; where Cd represents depth cue color or haze color, z represents depth and where OdiffuseU and llspecularll represent third and fourth functions.
The present invention also includes a means for implementing the above mentioned third (diffuse) function, the third function comprising:
Ka + 1/ F1M. 14 [ c4 NLt + (1 -Pc) NLlt]; where N.N represents the surface normal vector; N.N is the dot product of N with itself, NL rt is the dot product of the surface normal at the right edge of the polygon and a unit vector L toward a light source; NL it is the dot product of N and L at the left edge of the polygon; Ka represents the coefficient of ambient reflection, and where Lc represents a light source color. Alpha (of.) increases from 0 to 1 between the left and right edge of the polygon.
The apparatus for shading polygons also includes a means for implementing the above mentioned fourth (specular) function; the fourth function comprising:
l/ JN.N ( CK NH rt + (1- c>,.) NH it, Oe where NH rt is the dot product of the surface normal N at the right edge of the polygon times the unit vector H in the 1 .. 9 ' ' 1 direction of maximum highlight, NH it is the dot product of the normal vector N at the left edge of the polygon times H, Oe is a power to which the expression in brackets is raised, and where C4 increases from 0 to 1 between the left and right edges of the polygon.
Finally, the invented apparatus for shading polygons includes a means for combining said implemented first, second, third and fourth functions to thereby comprise:
Tc[PB] + (1 - Tc) [z[Cd] + (1 - z) [diffuse [IM) + specular [Lc]]]; where IM-is the object color from a constant color value or a color value from an addressed image array of color values and where Lc is the color of the light source.
The present invention also includes a means for shading parametric patches by shading a sequence of surface curves spaced closely together. The spacing calculation is described below, comprising a means for implementing the first function, the first function comprising:
Tc[PB] + (1 - Tc) X; The apparatus for shading patches also includes a for implementing the second function X, the second function comprising:
Z[Cd] + (1-Z) Y; where Cd = depth cue color, z = depth and UdiffuseN and 'Ispecularll represent fifth and sixth functions.
The apparatus also includes a means for implementing a fifth (diffuse) and sixth (specular) function. The fifth function comprising:
Ka + N.LIJN.N where N is the surface normal vector which varies along a surface curve as a parametric function. The sixth function (specular) comprising:
1 1.. 1.
Oe (N. H/ fN.N) Finally the apparatus for shading parametric patches includes a means for combining said implemented first, second, fifth and sixth functions to thereby comprise:
Tc [PB) + (1-Tc) [Z [Cd] + (1-Z) [(Ka + N.LIIN'-N) [IM] + (N.HIM.N) " [Lcl]] thereby shading the surface curve of the parametric patch being rendered.
A 1 9 BRIEF DESCRIPTION OF THE DRAWINGS
Figure 1 is a block diagram of the circuitry for shading pixels of the present invention that incorporates the present invention; Figure 2 Is an exploded view of the block diagram of Figure 1; Figure 3 Is another exploded view of some of the circuitry shown in Figure 2; Figure 4 is an alternative embodiment of the circuitry of Figure 2.
1 9 - DETAILED DESCRIPTION OF THE INVENTION
The present invention discloses apparatus and methods having particular application for use in a computer system used for the graphic display of images. Although the present Invention is described with reference to specific circuits, block diagrams, signals, algorithms,.etc., it will be appreciated by one of ordinary skill in the art that such details are disclosed simply to provide a more thorough understanding of the present invention. It will therefore be apparent to one skilled in the art that the prepent invention nay be practiced without these specific details. in other instances, well known circuits are shown in block diagram form In order not to obscure the present invention unnecessarily.
In Figure 1 there is shown an overall functional block diagram of the present Invention. In order to define images on a CRT display or other display device, it Is necessary to manipulate data at a high speed in order to select the pixel location and color on a CRT display that define the curve, curved surface, vector or image that is desired to be displayed. It is well known in the art that the location of each point to be displayed on a CRT often is represented by digital values stored in a memory device which correspond to x, y, z and w homogeneous coordinates.
Geometry section 7, which includes the X, Y, Z and W AM units 14 shown and described in Figure 1 of co-pending applications, serial nos. 07/047, 696 and 07/047,693, computes the x, y, w and z homogeneous coordinates of an object whose image is to be displayed. The geometry section 7 also comprises an address pipeline 16 which includes the pixel filter circuit 30 of Figures 1 and 7 of co-pending applications serial nos. 07/047,696 and 07/047,693, which outputs a modified Bresenham 1 algorithm error term, which is used as an anti-aliasing weighting function. [The afore-mentioned modified version of the Bresenham algorithm is widely used for incrementally stepping along the edge of a polygon in scanline order and in anti-aliasing vector techniques (see Akira Fujimoto and Ko Iwata, "Jag Free Images on a Raster CRT,11 Computer Graphics Theory and Applications, edited by Tosiyasu Kunii, published by Springer Verlag, 1983).] The weighting function is outputted to a shading pipeline 12 of a paint section 150. The paint section 150 is used to color pixels on a CRT 22 as will lAter be described. The AFWIs 14 output instantaneous x, y, w and z coordinates to address pipeline 16. The pixel filter 30 outputs arc-length and an anti-aliasing weighting function Ce, and also outputs the z coordinate, arc-length and the anti-aliasing weighting function to an address pipeline 12 of paint section 150, as will later be discussed.
Address pipeline 16 outputs the x, y, w and z coordinates to frame buffer 20 to define a particular pixel on a CRT. The instantaneous coordinate z, which is inputted to the shading pipeline 12, is used therein for depth cueing which is a well known technique for fading out objects being rendered so that they appear farther away [in the z (depth) dimension] from the viewer of the image. [Foley & Van Damm, Interactive Computer Graphics, Addison Wesley,.1982.] The arc-length outputted to shading pipeline 12 is used for incrementally indexing a pattern memory for the purpose of mapping a pattern along a curve, while the anti-aliasing weighting factor Is used for blending pixels along the edge or silhouette of an object being rendered with the background to reduce the jagged appearance of images on a raster display.
Paint section 150 comprises a plurality of additional - 11 AFDU circuits 10 and the above mentioned shading pipeline 12. Paint section 150 renders and outputs red, green and blue representations of the color to be displayed at each pixel and performs vector shading, curve shading, polygon shading, as well as patch shading (i.e. shading of bi-cubic patches). The operation and performance of each of these functions will be explained in greater detail hereinafter.
AFDU ciccuits 10 serve as'function generators to provide parametric inputs to the shading pipeline 12. More specifically, AFDU's 10 serve the purpose of computing parametric cubic approximations to the normal vector dot products in the well known Phong shading equation, as well as computing linear Interpolation functions and addresses into Image memory for mapping images onto patches. Shading pipeline 12 comprises three channels, one each for red, green and blue processing. Each channel comprises a series of cascaded arithmetic units that perform color vector arithmetic operations. Each arithmetic unit in shading pipeline 12 performs one of several arithmetic functions, which will later be described, depending upon the command received from CPU Shadingpipeline 12 computes and outputs to frame buffer 20 colors which have both diffuse and specular reflection contributions and, in addition, adds color depth cueing, antialiasing, optional motion blur and transparency to each pixel color. Pixel color values are outputted from shading pipeline 12 to frame buffer 20 for display on the CRT 22 (i.e. as defined by x, y, z and w coordinates).
Shading pipeline 12 may also have its output directed to pixel buffers in shading pipeline 12 so that a recursive computational ability is provided. The values computed at each pixel address are written sequentially into a pixel buffer t 1 - memory. As will later be explained, the same curve may be executed again by MDUls 14 and 10 and combined with the previously computed pixel values stored in the pixel buffer for additional shading computations.
Address pipeline 16 may also function in a frame buffer read mode whereby the addresses generated by address pipeline 16 are used to read pixel values from the frame buffer 20 and output these values to sequential locations in the shading pipeline 12 so that these values may be used In subsequent rendering operations such as for anti-aliasing, transparency and notion blur calculations.
VECTOR SHADING With respect to rendering vectors, vector attributes include line width, anti-aliasing, color depth cueing and transparency. Line width and anti- aliasing are derived from the geometry section 7 as described above and as will later be more fully explained. Color depth cueing and transparency are derived by implementing the below listed co-efficients as calculated in formula (1) below.
T.c - Transparency coefficient ranges 0 (opaque) to 1(clear), and typically comprises 12 fractional bits. To is constant for a given object.
PB - pixel buffer memory, addressed by values generated by the AMUls 10. <R.G.B>, range 0 to 1, 12 fractional bits (typical).
Be - modified Bresenham error (used as anti-aliasing weighting function) range from 0 to 1, and typically comprises 12 fractional bits. B is generated by the AFDU's 14 for'each pixel along the vector.
-4 IN - Image memory, IN PM = Pattern memory, PM Z - Depth value from ZAFD, range 0 to 1, typically 12 fractional bits Ca - Color constant for anti-aliasing background, <R,G,B>, 8 bits
Red (1) Green - Tc Blue PB r PB 9 PB b + (1-TC) PB Cd r r Be PB 9 +(1-Be) Z Cd 9 PB b Cd b IM r (1-Z) IN 9 L 1M bj The above equation can be simplified by setting Tc = 0 for opaque objects, by substituting a constant color Ca for PB in the anti-aliasing term, by setting Be - 0 for no anti-aliasing, by substituting constant color Oc for IM! or by setting Z - 0 when no depth cueing is desired. (Note: With respect to an anti-aliased vector, it will be appreciated that its two sides can be drawn independently as two separate vectors side by side.) Implementation of equation (1) ill later be described with reference to the circuitry of Figure 2. CURVE SHADING Curves are very similar to vectors in their shading attributes. (Reference Foley and Van Damn, Fundamentals of Interactive Computer Graphics, Addison Wesley, 1982.) The primary difference being that an anti-aliasing coefficient Ce replaces Be of equation (1), above. Accordingly, the equation for rendering a curve is accomplished by implementing equation 2 below.
(2) 14 R PB r PB r Cd r IM r G = Te PB 9 +(l-Tc) Cc PB 9 +(1-Ce) Z Cd 9 +(1-Z) IM 9 B PB b PB b Cd b IM b L J J L L J L L J L J J J Equation (2) offers the same simplifications as for vectors. The coefficient Cc is computed by the pixel filter 30 in address pipeline 16 for each pixel along the curve. This circuit is part of pixel filter 30 and will later be described in greater detail.
POLYGON SHADING The shading attributes which apply to polygons include hollow, solid, Gouraud, or Phong shading style, image mapping, anti-aliasing, depth cueing, and transparency. The following equation gives the shading equation for a line between two points (i.e. a scanline) of a polygon. Polygon shading Is accomplished by Implementing the coefficients listed below in equation (3) and (4) below.
NL = Unnormalized dot product NoL at the left or right edge of a scan line of a polygon being shaded, the normals at the vertices being normalized, such that linear interpolation causes NL to always range from 0 to 1, never e:ceading 1. 1M in the preferred embodiment has 12 fractional bitai although more or less bits may be used.
NH Unnormalized dot product N.H at the left or right edge of the scan line of the polygon (typically having the same range and bits as NL).
NN The squared length of the surface normal vector, i.e. the dot product of H and N. This value typically, in the preferred embodimenti is from 0. 5 to 1 and requires 12 fractional bits.
oL - a value generated by an AFDU circuit which increases linearly from 0 to 1 between the left and right edges of a scan line of a.polygon being shaded and typically includes 12 fractional bits. (Note: the MDU circuit is identical in circuitry to the X AM circuit of Figure 3 of co-pending applications, serial nos. 071047,696 and 07/047,693.) rdiff a NLrt NLlt (diffuse value) 1 spec 1 - 10 +1/ nN. C& NH rt + (1-4x) NH it (specular valu) 0 io 0 L 0 A 1 R PB; d; Lc; -lmr- G Tc PB 9 +(I-Tc) Z Cd 9 +(1-Z) spec oe LC 9 +diff IM 9 B PBbl 1 Cd b Lcb LIMb] L L 1 1 1 1 The above equations (3) and (4) can be greatly simplified by the high overhead technique of using the W AMU to generate an appro:iixation of spec and a AM circuit"(later described with reference to Figure 2) to approximate diff. Spec and diff range from 0 to 1 and together with Ka must sum to 1 and each typically, In the preferred embodiment, is comprised of 12 fractional bits.
For Gouraud shading (i.e. interpolation of color along a scanline of a CRT) the above shade equation may be simplified by eliminating the multiply by 11jN.N. (Note: Gouraud shading is well known in the art and is explained, for example, in Gouraud, Henri, ConRuter Display of curved Surfaces, Department (3) 1 1 R G B L 1971, see also Ton Duff, "Smoothly Shaded Renderings of Polyhedral Objects on Raster Displays,11 Computer Graphics, Volume 13, 1979.) As is well known in the art, in shading polygons, boundaries must often be drawn around polygons to render the edge-style attribute. Where such boundaries are more than one pixel wide, a problem arises in getting correct values for dz/dx on the boundary being rendered, so that the value doesn't minimize the x value boundary pixels. Applicant has discovered a solution to the afore-mentioned problem of rendering boundaries which are more than one pixel wide. Two polygons are rendered, an edge polygon defining an outer boundary, and an inner polygon defining an inner hole. The vertices of the inner polygon are also those of the polygon interior, thereby eliminating the problem of occluded boundary pixels. Alternatively, if the boundary is only one pixel wide or if anti- aliasing is desired at the edge of the polygon being rendered, it is preferred to render a vector (half an anti-aliased vector) wrapping the polygon. The x or y offset of the anti-aliased vector method insures that the wrapping vector contains no pixels which lie inside the exact boundary of the polygon. The shading equation for an anti-aliased edge around a Phong shaded polygon is diff Ka NL P1 spec 0 +11fN.N of. NH P1 + (1-PL) 0 0 0 L J L J L PB r Cd r Lc X Be PB 9 +(l-Be) Z Cd 9 +(1-Z) spec oe Lc 9 PB b Cd b Lc L - J - -. 1 =Tc PB r PB 9 PB bl + (1-TC) NL PO NHPO 0 +.dif f IM r IM 9 Imb It has been discovered that multiple light sources may be rendered by the apparatus of Figure 2 by first storing diff [IN]. in the pixel buffers 116, 216 and 316 of Figure 2 and then repeatedly adding the specular component spec oe [Lc.] for each light source to the pixel buffer.
PARAMETRIC PATCH SHADING The following equation gives the shading equation for a surface curve across a bivariate parametric patch.
R PB r Cd r Lc r IMr 1 G Tc PB 9 +(l-Tc) z Cd 9 4 (1-Z) spec Oe Lc 9 diff Img B PB b Cd b Lc b IMb As described in co-pending applications, serial nos.
07/047,696 and 07/047,693, MDU circuits may be used to implement a cubic (or higher order) parametric function of the variable (called the parameter) v. These MDU circuits used as cubic function generators are used to generate x(v), y(v), z(v), and w(v) to give the pixel addresses along a cubic curve such that substantially one pixel steps are generated. AFDU circuits may also be used to generate cubic function approximations to spec(v), diff(v)t.N4,L(Y), N.H(v) or N.N(Y) which are all controlled by the pixel filter 30 to generate shading values for the corresponding pixel addresses.
For the shading of a bivariate surface patch f(u,v), the apparatus of Figure 2 generates a sequence of curves g(v) spaced closely enough together in the u parameter so that the resulting surface contains no holes or pixel gaps. Thus the patch is rendered In u,v parameter spaceo thereby greatly facilitating such shading operations as image mapping and patch trimming which are well known in the art. Generating a sequence 1 of closely spaced curves to shade a bivariate patch can be implemented using the aforedescribed adaptive forward differencing technique of co- pending applications, serial numbers 07/047,696 and 07/047,693.
The following description will conveyto one skilled in the art the method of the present invention for shading patches by rendering several closely spaced curves.
In adaptive forward differencing from a first curve to the next curve, the basis function for the first curve is f(u,v) while the basis function for the second curve is f(u + du,v). The well known matrix in forward difference basis for representing a curve in u,v is:
f (U, V) = BV A 00 A 01 A 02 A 03 A 10 A 11 A 12 A 13 A 20 A 21 A 22 A 23 LA A A A 31 32 3 Bo where Bv and Bo are the forward difference basis matrices. [For a more thorough explanation of forward difference basis matrices, see Foley & Van Damm, Interactive Computer Graphics, Addison Wesley, 1982.] The jtli column of the A matrix is referred to by Mj. Similarly, the ith row of the A matrix is referred to by Aix. A forward difference step from one curve to the next curve on a bivariate parametric patch is achieved by adding column A xl to A X01 A x2 to %, and A x3 to A x2 The next curve is then defined by the four values in column Axo. The next curve rendered is checked to see if it will be too far (leaving pixel gaps) away from the current curve as follows.
The "difference%' column A xl is converted to the well known 11Bezierll basis. The well known Bezier convex hull is then 19 tested to get the maximum distance in pixel coordinate x and y between the two curves. if this distance is greater than a predetermined threshold value, the curve is adjusted down each row of the A matrix. If the distance in x and that in y are less than a predetermined minimum threshold, we adjust up each row of the matrix. (For a more thoroug explanation of 11Bezierll basis and its interplay with forward differencing, see Foley & Van Damm, Fundamentals of Interactive Computer Graphics, Addison Wesley, 1982.) Implementation of the above-listed equations for vector, curve, polygon and bi-cubic patch shading will now be described with reference to Figure 2.
Referring to Figure 2, an overall block diagram of the shading hardware of the present invention is shown. Figure 2 illustrates a three-channel processor for developing standard red, green, and blue signals for a color CRT. in general, with respect to components having reference numerals, 100-199 correspond to the red channel, 200-299 to the green channel, and 300-399 to the blue channel.
Four adaptive forward differencing circuits (AFDU's) 50, 60, 70 and 90 corr.espond to AMUls 10 of Figure 1 and provide pixel shading values corresponding to the pixel addresses outputted from AFDUts 14. The AMUls are third order digital differential analyzers which implement an adaptive forward difference solution to a parametric cubic function of parameter t, as described in co-pending applications serial numbers 07/047,696 and 07/047,693 so that as t varies from 0 to 1 along a cubic curve, the dt step size tor t is adaptively adjusted so that the curve steps along In approximately one pixel steps. Arithmetic units (11AU1s11) 76, 78, 86, 88, 104, 114, 122, 124, 128, 204, 214, 222, 224, 228, 304, 314, 322, 324 and 328 are all - 20 Identical units, which can be implemented as gate arrays or built out of discrete components such as 11TRWII multipliers and ALUts. For the sake of clarity, the embodiment described herein relates to a pipeline structure in which each computational step is assigned to a dedicated ALU. It is to be appreciated that the same results may be achieved by the use of recursive processing wherein a single ALU for each channel performs each of the computational operations hereinafter described during successive operational cycles. Feedback and multiplexing circditry is required to support such recursive processing. An example of such a recursive embodiment will later be described with reference to Figure 4. Each of the AUls receives inputs A, B and ALPHA and provides aresult designated RES. Each of the AUls computes one of the following expressions at the RES output:
(ALPHA) A + (1-ALPHA) B (6a) (ALPHA) B+ (1-ALPHA) A (6b) (ALPHA) A + B (7a) (ALPHA) B + A (7b) A B (7c) A + B (7d) The output of AA MDU 50 is delivered to AA function module 52, which Is a look-up table containing a function that converts distance from a scan line to Be in equation 1. The output of AA function module 52 is inputted to multiplexor 96. Multiplexor 96 also receives as an input an anti-alias weighting factor (Ce in equation 2) from a pixel filter circuit 30 (shown in Figure 3 of geometry section 7.' Figure 3 shows several of the registers (102, 103, 104, 120, 121, 122) shown in figure 7 (the afore- referenced pixel filter 30) of co-pending applications, serial nos. 07/047,696 and 07/047,693. Subtractor 170 of Figure 3 receives inputs from x registers 103 and 104 and produces the 4 output tx = X n+2 - Xn+2 (tx Is the x component of the instantaneous tangent vector). Subtractor 171 takes inputs from y registers 121 and 122 to produce the output t y " Yn+l -yn+2 (tx is the y component of the instantaneous tangent vector). Lookup table 176 of Figure 3 takes the instantaneous tangent vector <t X4, t y > inputs from subtractors 170-and 171, and input 182 from CPU 9, as well as the fractional portional of address f X and f y from registers 103 and 121.
Lookup table 176 produces three outputs: output 178, the anti-aliasing weighting factor xO to the paint section 150, output 179 (the x-offset) to adder 183 and output 180 (the y offset) to adder 184 which is later received by the frame buffer.
Lookup table 176 is loaded with preconputed values corresponding to the two tables below. A one bit wide input signal 182 to table 176 is set to elzerotl by CPU 9 to Instruct the circuitry of Figure 1 to render a first pass of an'anti-aliased curve. One bit wide signal is set to 'lone" to render a second pass. For the first pass, the pixel <x,y> generated by the MDUls is shaded with the shading factor 1 -1d-1 where d. X if the curve being rendered is an x major curve and(X Y if y major. The anti aliasing weighting.1actor is computed by C (f7-o.5) + or + VY The output of look-up table 176 for a pass for x major and y major curves is shown below in Table I.
Pass 1 major axis xoffset - Yoffs t Vidng factor cc Weighun It. 12:1 ly 1 CL, A 0 0 CL.
0 <0 0 < i t, 1 a 0 0 2-A CLI<0 0 0 For the second pass, the pixel having the coordinates <x+xoffset, y+ yoffset> by IcKI where xoffset - sign (o/C). x major and yoffset - sign (C4). y major. The output of lock-up table 176 for the second pass for x major and y major curves is shown below in Table 11.
Pass 2 major axis C >0 xoffset yoffset weighting factor u 0 1 a. 1 cr, <0 0 alpha. 1 C >0 1 0 lc 1 c<0 -1 0 As shown.in Tables I and II, the signal 182 to look-up table 176 is set to Ozero.0 Output 179 of look-up table 176 is xoffset = 0. When signal 182 is set to one, output 179 from lookup table 176 is as follows: (1) 0 if input 174 indicates the curve being rendered is an x-major tangent vector; (11) 1 if input 174 indicates y-major tangent vector and oe- is positive; (M) -1 If input 174 indicates y-major tangent vector and 01is negative. Output 180 from table 176 is as follows: (1) 0 if input 174 indicates y-major tangent vector; (11) 1 if input 174 indicates x-major tangent vector and 0e- is positive; (M) -1 if input 174 indicates x-major tangent vector and CX. is negative. Adder 183 adds thQ.x-offset 179 from table 176 to the register content 102 and output the x coordinate of the current pixel. Adder 184 adds the y-offset 180 from table 176 to the register content 120 and output the y coordinate of the current pixel.
Referring now back to Figure 2, the output of multiplexor 96 of Figure 2 Is received by the ALPHA inputs of AU 124, 224 and 324.
The, output of N#N AM 60 is received by look-up table 62, which performs an approximation of the inverse square root of WN. The output of look-up table 62 is provided to the ALPHA input of AUls 78 and 88. AU 78 receives its A input from the RES 1 Output Of AU 76. The output of INTERP MDU 70 is provided to the ALPHA input of AU 76 and 86. Registers 72 and 74 provide A and B inputs respectively to AU 76. The output of AU 78 is provided to X oe function module 79. The output of xoe function module 79 is delivered to the ALPHA inputs of AUlt 114, 214 and 314.
The outputs of registers 82 and 84 provide inputs A and B respectively of AU 86. The RES output of AU 86 is provided to the A input of AU 88. The B input of AU 88 is provided by register 87. The RES output of AU 88 Is provided to the ALPHA input of AUts 104, 204 and 304.
The output of pattern AM 90 is provided to PATT function module 92. The output of module 92 Is a pattern memory address, which is input to pattern memories 102, 202 and 302. The contents of the addressed locations in pattern memories 102, 202, and 302, are delivered to the A inputs of AUls 104, 204 and 304 respectively. The RES output of AUls 104, 204 and 304 are delivered to nultiplexors 110, 210 and 310 respectively. Multiplexors 110, 210 and 310 also receive as inputs the outputs of registers 106, 206 and 306, respectively. Outputs of multiplexors 110, 210 and 310 are delivered at the A inputs of AUls 114, 214 and.314, respectively.
The RES outputs of AUls 114, 214 and 314 are delivered to the A inputs of AUls 122, 222 and 322 respectively. These same RES outputs are provided as sequential inputs to pixel buffer memories 116 and 118, 216 and 218, and 316 and 318, respectively. Sequential outputs of these pixel buffer memories are provided to multiplexors 112, 212 and 312, respectively, which also receive as inputs the outputs of registers 108, 208 and 308, respectively. The outputs of multiplexors 112, 212 and 312 are delivered to the B inputs of AU15 114, 214 and 314, respectively. Employing the circuitry of the present invention as shown in Figure 2, a new shading function of the same curve can be calculated and combined in the AUls arithmetically with the shading value of the corresponding pixel previously calculated and stored in the pixel buffer array. The pixel buffers are sequentially controlled by a counter (not shown) which must be reset at the beginning of a curve operation by CPU 9. All registers can be accessed by CPU 9.
AUls 122, 222 and 322 receive B inputs from the outputs of registers 120, 220 and 320, respectively. The RES outputs of AUls 122, 222, and 322 are delivered at the A inputs of AUls 124, 224 and 324, respectively. Red, green and blue feedback data from frame buffer 20 (not shown) is delivered as inputs to sequentially addressed pixel buffer memories 126, 130, 226, 230, 326 and 330. The outputs of pixel buffers 126, 226 and 326 are delivered to the B inputs of AUls 124, 224 and 324 respectively. The outputs of pixel buffers 130, 230 and 330 are delivered to the B inputs of AUls 128, 228 and 328, respectively. The RES outputs of AUls 124, 224 and 324 are delivered at the A inputs of AUls 128, 228 and 328, respectively. The ALPHA input of AUls 128, 228 and 328 is provided by the output of transparency register 98. The RES outputs of AUls 128, 228 and 328 provide digital representations of the pixel shading for the red, green and blue CRT channels, respectively.
Having thus described the Interconnections of the circuit components shown in Figure 2, the functional performance of the circuitry will now be described with regard to the aforedescribed shading equations which are implemented by the circuitry of Figure 2. In the following discussion, reference will generally be made only to the red channel. However, it is to be understood, unless otherwise indicated, that identical processing occurs in the green and blue channels as well.
1. VECTOR AND CURVE SHADING As stated, vector and curve shading is accomplished by implementing the equation (8) as listed below (8) pixel color T (PB) + (1 - T) (Be(PB) + (1 - Be) (z (Cd) + (1 z) (PM))) c 4 c j Where:
To = transpa. rency factor PB 31 PB4 = pixel buffer data feedback from frame buffer Be = modified Bresenham error function Z = depth weight c d = haze or depth cue color PM = intrinsic curve color from the pattern memories of Figure 2.
Pattern AFDU 90 outputs the current value of a parametric function to pattern address translation function 92, which, in turn, performs a pattern address translation of the value inputted thereto. The pattern address outputted by address translation function 92 is supplied to pattern memory 102 to address a memory location therein. The addressed contents of the pattern memory 90 represent intrinsic curve color, (and also include a write enable bit for the current pixel of the vector or curve being rendered) designated PM in the above equation (8). In this case, PM passes unaltered through AUls 104 and 114, and is applied to input A of AU 122. Raze color, Cd' of equation (8) above is provided by register 120 to input B of AU 122. A z coordinate value from the geometric section 7 is input to z function module 94. Module 94 performs a look-up table function to provide an interpolation weight at the ALPHA Input of AU 122 - 26 as a function of the z coordinate value. AU 122 performs equation 6(b) above with: input ALPHA of AU 122 being equal to z. input A, of AU of 122 being equal to PM. input B of AU 122 being equal to Cd. Output RES of AU 122 is therefore expressed as equation (9) below:
(9) Z(C d) + (1 - z) (PM) This quantity represents the intrinsic color adjusted for depth (i.e. blended with a density of haze color that is dependent upon the z coordinate value), also referred to as the depth cued color. This value is then provided at input A of AU 124.
AA MDU 50, in conjunction with AA function module 52, develops the aforementioned modified Bresenham error function, Be. This function is provided by multiplexor 96 to the ALPHA input of AU 124. Pixel data feedback from the frame buffer 20 of Figure 1 is held by pixel buffer memory 126 and provided to the B input of AU 124. AU 124 performs equation (6b) above with: input ALPHA of AU 124 being equal to Be; input A of AU 124 receives the above described depth cued color result which is outputted at output RES of AU 122; input B of AU 124 being equal to PB 3 of equation (1) above. Output RES of AU 124 is therefore: (10) Be (PB 3) + (1 - Be) (depth cued color) This quantity is referred to as the anti-aliased color and is provided to input A of AU 128. Transparency factor, TC, is provided by transparency register 98 to the ALPHA input of AU 128. Pixel data feedback is held in pixel buffer memory 130 and provided to input of AU 128.AU 128 also performs equation 6(b) above with:
.:i.. 'i 1 input ALPHA of AU 128 being equal to TC input A being equal to anti- allased color input B of AU 128 being equal to PB 4 Output RES of AU 128 is therefore expressed as equation 11 below. (11) TC (PB 4) + (1 - To) (anti-aliased color) Referring to the above equations (9) and (10) and the circuitry of Figure 2, it can be seen that quantity (11), which is the pixel color as defined by equation (8), is uniquely rendered by the circuitry of the present invention.
2. POLYGON AND PATCH SHADING Applying the well known Phong approximation, the color at any point on the surface of a polygon illuminated by a single light source at infinity is represented by the sum of a diffuse coefficient times the object color and a specular coefficient raised to an object specular exponent times the light color.
[Note: Phong approximations are well known In the art and are fully described, for example, in Tom Duff, Smoothly Shaded Renderings of Polyhedral objects on Raster Displays, Compute.r Graphics, Volume 13, No. 2, August 1979.] As discussed, the specular and diffuse coefficients are computed for 'a polygon scan line according to equations (12) and (13) as listed below:
(12)- diffuse = K a + 11-N'.N [cKNIRT + (1-o,.) NLLT1 (13) specular = llrN.N [ocNH RT + (1-0k) NHLTI Where:
N is the surface normal vector; L is a unit vector toward the light source; H is a unit vector in the direction of maximum highlight (i.e. the vector in the direction halfway between the viewer and the light source); 1 c ' -,-; 1 - 2B - K a is the coefficient of ambient reflection; c>'- is an interpolation coefficient, the value of which linearly varies between 0 to 1 along a scan line segment of a polygon being rendered; RT and LT refer to the value of the dot product N.L at the right and left ends respectively of a scan line segment of a polygon.
The CPU 9 scan converts the polygon and provides a scanline segment across the polygon being rendered. Diffuse and specular coefficitnts at each end of the scanline are computed, namely, % T1 NLLT, NHRT and NHLT. These coefficients are loaded into registers 82, 84, 72 and 74, respectively. NoN MDU 60 generates a quadratic function for N.N, (i.e. the dot product of the normal vector along the scanline, which product is well known in the art, see Tom Duff, OSmoothly Shaded Renderings of Polyhedral Objects.on Raster Displays," Compute Graphics, Volume 13, 1979).
Interp MDU 70 generates a linear interpolation of x from 0 to 1 along the scanline segment of the polygon being rendered. This factor is applied at the ALPHA inputs of AUls 76 and 86. Implementing equation (6a) above In AUls 76 and 86 provides the following results: (14) (15) RES AU 76 = (ALPHA) NH RT + (1 - ALPHA) NH LT RES AU 86 - (ALPHA) NLRT + (1 - ALPHA) NLLT Equations 14 and 15 above represent smooth linear interpolations of N#H and NL respectively. These values are unnormalized in that they no longer represent unit vectors due to the linear interpolation process. Renormalization at each pixel is accomplished by the quadratic function for N.N performed in the N.N MDU 60.
M..
The quadratic function for N&N is generated in the N.N AM 60 and input to look-up table 62 which provides an approximation of the inverse square root. The output of look-up table 62 is provided to the ALPHA inputs of AUls 78 and 88. AUls 78 and 88 perform equation (7a) above. Since the B input of AU 78 is open, the RES output provides (ALPHA) A, which is equal to 11IN_.N [RES AU76] the specular coefficient of equation (13) above. This output is next passed to the x oe function generator 79, where the object specular exponent (the specular power) is applied.
The coefficient of ambient reflecton Ka, is contained in register 87 and provided at the B input of AU 88. Therefore, the RES output of AU 88 is equal to the diffuse coefficient of equation (12) above.
Pattern AMU 90 and pattern address translation function 92 generate a pattern memory address. As previously described with respect to the shading of vectors, the pattern memory Red 102 provides the object color at each pixel. The object color (the red component thereof) is provided to the A input of AU 104. AU 104 performs equation (7a) above, and, since the B input is open, the RES output represents the product of the diffuse coefficient (ALPHA input) and object color (A input). This signal is selected by multiplexor 110 for input to the A input of AU 114. Light color in register 108 is selected by multiplexor 112 for input to the B input of AU 114. The specular coefficient raised to the object specular exponent from function module 794s applied to the ALPHA input of AU 114. AU 114 performs equation (7b) above,thereby providing a complete pixel color expression at the RES output. Processing downstream of AU 114 has already been discussed with respect to curve and vector shadina.
k 31) - As mentioned earlier, the foregoing discussion has been with regard to Duffle approximation of Phong shading, as described in Tom Duff, Osmoothly Shaded Renderings of Polyhedral Objects on Raster Displays," Computer Graphics, Vo lum e 13, 1979. The same circuitry may also implement Gouraud shading. Gouraud shading is commonly used because of its simplicity of computation and speed. It is particularly useful for rough shading. Gouraud shading is implemented as a simple linear interpolation of the color from one point to another across the polygon scanline. Thus, diffuse and specular coefficients are not computed and the color at intermediate pixels along the scan line is given by:
ALPHA (right color) + (1 - ALPHA) (left color).
Gouraud shading is unnormalized, therefore# It is not necessary to Introduce the inverse square root of NoN at AUls 78 and 88. Instead, the ALPHA inputs of AU 78 and 88 are held at unit value. Register 74 is loaded with 0, register 72 is loaded with 1 so that the linear interpolation factor from interp MDU 70 is passed through unmodified to the A input of AU 78. AU 78 performs equation (7d) above, thus passing the A input unmodified through to RES, and thence bypassing the Oe function and to the ALPHA input of AW-114. A right object color value is loaded into register 108 and a left object color value is loaded into register 106. The interpolation coefficients are provided by INTERP AFDU 70 at the ALPHA input of AU 114. Multiplexor 110 selects register 106 and multiplexor 112 selects register 108. AU 114 performs equation (6a) above, thereby providing the Gouraud shading at RES output which passes to the A input of AU 122.
Processing of patches within the shading circuitry Is similar to polygons except that the shading parameters N&L and 1 1 N#H are approximated with bi-cubic functions provided by AFWIs 60 and 70 rather than by a linear interpolation across the scan line. [In Michael Shantz and Sheue-Ling Lien, 0Shading Bi-CUbic Patches," Computer Graphics, , Volume 21, number 4, l987 (unpublished), attached hereto as Appendix A, several mathematical techniques for deriving the above-mentioned approximating bi-cubic functions'are sat forth.) For patch shading, N.N AM 60 generates an approximation of the specular coefficient and INTERP MDU 70 generates an approximation of the diffuse coefficient. The outputs of N.N AM 60 and Interp MU 70 are applied to the ALPHA inputs of AUls 78 and 86 respectively, the specular coefficient passing through look-up table 62 without alteration.
The A input of AU 78 is held at unit value, thereby passing the specular coefficient on to the RES output unaltered. Similarly, the diffuse coefficient is passed through AUls 86 and 88 without alteration. Thereafter, processing proceeds in the same manner as described above with regard to polygons.
Patch and polygon shading proceed from the RES output of AU 114 in the manner as described above for curve and vector shading with respect to depth cueing and transparency. Intermediate results pass unchanged through AU 124 since antialiasing is not performed for patches or polygons.
In Figure 4 there is shown an alternative embodiment of the circuitry shown in Figure 2. Going from right to left in describing the circuitry of Figure 4, MU 400 corresponds to Pattern AM 90 and N.N AM 60 of Figure 2 and performs the same function as previously described with respect to these components. Similarly, QMDU 402 replaces and performs the same functions as AMDU 50 and INTERP AFDU-70 of Figure 2. Address mods 402 and 406 replace and perform the same functions as k pattern translation 92. Image nems 0, 1 and 2 correspond to and perform the same functions as address pattern memories 102, 202 and 302, as well as 1/Bcluare root function 62 and the pixel buffer memories (i.e. 116, 118, 216, etc.). Multplexor 414 selects as an input a desired color constant co which may be NLlt, Ca, Cd or Oc in the above equations, or the output of image memory 0. Multiplexor 416 selects as an Input BE (the modified Bresenhan error factor) or the output of image memory 1 or z, or tc, depending upon the particular function being rendered. Multiplexor 418 selects the output of image memory 1, or the output of image memory 2, or Cl, a desired color constant which may be NLlt, Ca, Cd, Oc or other constant color volume. The selected output of multiplexors 414, 416 and 418 are fed to AUls 420, 422 and 424, which, respectively, replace all red, green and blue AUls of Figure 2, as well as AUls 76, 78, 86 and 88 of Figure 2. CPU 9 controls the circuitry of Figure 4, such that each component performs an appropriate function in order to execute the afore- described functions, the implementation of which has been fully described with respect to Figure 2.
It will be appreciated that the above-described invention may be embodied in other specific forms without departing from the spirit or essential characteristics thereof. in particular, the MDUls can easily be extended to implement higher order functions than cubics. The present embodiments are, therefore. to be considered In all aspects as illustrative and not restrictive, the scope of the invention being indicated by the appended claims rather than by the foregoing description, and all changes which come within the meaning and range of equivalency are, therefore, Intended to be embraced therein.
z

Claims (35)

  1. CLAIMS is 1. An apparatus for shading vectors and curves on a display
    device, said apparatus comprising: means for implementing a first function, said first function comprising T c [PB 1 1 + (1 - T c) X; where T c equals a transparency factor; PB 1 equals a first pixel data fed back from a frame buffer means and where X represents a second function; means for implementing said second function, said second function comprising:
    Be [PB 2 1 + (1 -'Be) v; where Be = a modified Bresenham error function; and PB 2 = a second pixel data fed back from said frame buffer and where Y represents a third function; means for implementing said third function, said third function comprising:
    Z [Cdl + (1 - Z) [PM]: where Z represents depth weight; cd represents haze color, and wherein PM represents intrinsic curve color; means for combining said implementation of said first, second and third functions together, to comprise the implementation of Tc (PB + (1 - Tc) [Be (PB 2)+ (l-Be) [Z(Cd) + 1-Z (PM)]] thereby shading and patterning said curve and said vector.
  2. 2. An apparatus for shading polygons comprising: means for implementing a first function, said first function comprising:
    Te [PB + (1 - Tc)l X; where Tc represents a transparency factor;PB represents pixel data fed back from a frame buffer means; and where X represents a second function; means for implementing said second function, said second function comprising: Z[Cd] + (1 - Z) [diffuse [PM] + specular [Lcl]; where Z represents depth, Cd represents depth cue color or haze, Lc represents a light source color, PM represents a stored cDlor value, and where diffuse and spepular represent third and fourth functions; and means for implementing said third function, said third function comprising, in the case of polygon shading:
    Ka +(1/,/lN.N) [.( NL rt + (l-oO NL it]; means for implementing said fourth function, said fourth function comprising (1/1'N-.N) [.(NH rt + (1-cW.) NH it 1 Oe where N represents the surface normal vector; L represents a unit vector toward a light source; H is a unit vector in the direction of maximum highlight; Ka represents the coefficient of ambient reflection, rt designates a value at a right end of scan line, it designates a value at a left and of a scan line,-'( represents a linear interpolation coefficient, and Oe represents an object specular exponent means for combining said implemented first, second third and fourth functions to thereby comprise: Tc[PB1 + U-Tc) [[z[Cd] + U-z) [diffuse [PM] + specular
  3. 3. An apparatus for shading uniform and nanuniform, rational and non- rational B-splines and other patches comprising: means for implementing a first function; said first function comprising:
    Tc [PB + (1 -Tc)l X; where Tc represents a transparency factor; PB represents pixel data fed back from a frame buffer means; and where X represents a second function; means for implementing said second function, said second function comprising:
    Z[Cd] + (1 - Z) [diffuse [PM] +specular [Lcl]; where Z represents depth, Cd represents depth cue color or haze, Lc represents a light source colar, PM represents a stored color value, and diffuse and specular M_ 1 represent third and fourth functions; and means for implementing said third function, said third function diffuse comprising:
    Ka + N.L/AGN means for implementing said fourth function, said fourth function, comprising:
    [ (1/,,/-N-.N)N.H)Ioe where N represents the surface normal vector; L represents a unit vector toward a light source; H is a unit vector in the direction of maximum highlight; Ka represents the coefficient of ambient reflection, and Oe represents an object specular exponent means for combining said implemented first, second third and fourth functions to thereby comprise:
    Tc[PB1 + U-Tc) [[z[Cd] + (1-z) [diffuse [PM] + specular [LCIII.
  4. 4. The apparatus of claim 1 wherein said first, second and third functions are implemented in arithmetic logic units.
  5. 5. The apparatus of claim 1 further comprising pattern memory means coupled to said means for implementing said third function for storing and selectively retrieving said intrinsic curve color (PM).
  6. 6. The apparatus of claim 5 further comprising function generation means coupled to said pattern memory means for selectively addressing said pattern memory means as a function of a pixel location.
    -1 - 36
  7. 7. The apparatus of claim 6 wherein said function generation means comprises an adaptive forward difference unit (AFDU).
  8. 8. The apparatus of claim 1 wherein said first, second, third and fourth functions are implemented in arithmetic logic units.
  9. 9. The apparatus of claim 2 further comprising pattern memory means coupled to said means for implementing said second function for storing and selectively retrieving said intrinsic curve color (PM).
  10. 10. The apparatus of claim 9 further comprising first function generation means coupled to said pattern memory means for selectively addressing said pattern memory means as a function of a pixel location.
  11. 11. The apparatus of claim 10 wherein said first function generation means comprises an adaptive forward difference unit (AFDU).
  12. 12. The apparatus of claim 2 further comprising second function generation means coupled to said means for implementing said third and fourth functions for performing a linear interpolation of position on a scan line segment of said polygons.
    1.
    37 -
  13. 13. The apparatus of claim 12 wherein said second function generation means comprises an adaptive forward difference unit (AFDU).
  14. 14. The apparatus of claim 2 further comprising third function generation means coupled to said means for implementing said third and fourth functions for providing said l/ N.N term.
  15. 15. The apparatus of claim 14 wherein said third function generation means comprises an adaptive forward difference unit (AFDU) and an inverse square root look-up table.
  16. 16. The apparatus of claim 2 wherein said means for implementing said fourth function comprises an exponential function generator.
  17. 17. The apparatus of claim 3 wherein said first, second, third and fourth functions are implemented in arithmetic logic units.
  18. 18. The apparatus of claim 3 further comprising pattern memory means coupled to said means for implementing said second function for storing and selectively retrieving said intrinsic curve color (PM).
  19. 19. The apparatus of claim 18 further comprising first function generation means coupled to said pattern memory means for selectively addressing said pattern memory means as a function of a pixel location.
    h k
  20. 20. The apparatus of claim 19 wherein said first function generation means comprises an adaptive forward difference unit (AFDU).
  21. 21. The apparatus of claim 3 further comprising second function generation means coupled to said means for implementing said third function for providing said N. L/ 1 No term.
  22. 22. The apparatus of claim 21 wherein said second function generation means comprises an adaptive forward difference unit (AFDU).
  23. 23. The apparatus of claim 3 further comprising third function generation means coupled to said means for implementing said fourth function for providing said N.HI -N.N term.
  24. 24. The apparatus of claim 23 wherein said third function generation means comprises an adaptive forward difference unit (AFDU).
  25. 25. The apparatus of claim 4 wherein said arithmetic logi units are arranged for pipeline processing.
  26. 26. The-apparatus of claim 4 wherein said arithmetic logic units are arranged for recursive processing.
    z - 39
  27. 27. The apparatus of claim a wherein said arithmetic logic units are arranged for pipeline processing.
  28. 28. The apparatus of claim 8 wherein said arithmetic logic units are arranged for recursive processing.
  29. 29. The apparatus of claim 17 wherein said arithmetic logic units are arranged for pipeline processing.
  30. 30. The apparatus of claim 17 wherein said arithmetic logic units are arranged for recursive processing.
    1. -
  31. 31. A method for shading vectors and curves on a display device, said method comprising the steps of: a. implementing a first function, said first function comprising:
    Tc [PB1] + (1 - Tc) X; where Tc represents a transparency factor PB1 represents a first pixel data fed back from a frame buffer means and where X represents a second function; b. implementing said second function, said second function comprising:
    Be [PB21 + (1 - Be) Y; where Be represents a modified Bresenham error function PB2 represents a second pixel data fed back from said frame buffer and where Y represents a third function; c. implementing said third function, said third function comprising:
    Z[Cd) + (1 - Z) [PM] 411 where Z represents depth weight, Cd represents haze color, and where PM represents intrinsic curve color; d. combining results of said first, second and third functions together, to comprise the implementation of Tc (PB1) + (1 - Tc) [Be (PB2) + (1-Be) [Z(Cd) + (1-Z) (PM)]], thereby shading and patterning said curve and said vector.
  32. 32. A method for shading polygons comprising the steps of: a. implementing a first function, said first function comprising:
    Tc [PE + (1-Tc)] X; where Tc represents a transparency factor; PB represents pixel data fed back from a frame buffer means; and where X represents a second function; b. implementing said second function, said second function comprising:
    Z[Cd] + (1 - Z)-[diffuse [PM] + specular [Lc]]; where Z represents depth, Cd represents depth cue color or haze, Lc represents a light source color, PM represents a stored color value and where diffuse and specular represent third and fourth functions; c. implementing said third function, said third function comprising:
    Ka + (l/ 1 N - c,( NLrt + (l- cK) NLlt d. implementing said fourth function, said fourth function comprising:
    (l/ f N. N) [ X NHrt + (l- 01,) NH1t] Oe where N represents a surface normal vector; L represents a unit vector toward a light source; H is a unit vector in the direction of maximum highlight; Ka r t A k - 41 represents a coefficient of ambient reflection, rt designates a value at a right end of a scan line, lt designates a value at a left end of a scan line,c> represents a linear interpolation coefficient, and Oe represents an object specular exponent; e. combining results of said implemented first, second., third and fourth functions to thereby comprise:
    Tc[PB1 + (1-Tc)Jz[Cd] + (1-z) [diffuse [PM] + specular [LC]].
  33. 33. A method for shading uniform and nonuniform, rational and non-rational B-splines and other patches comprising the steps of:
    a. implementing a first function; said first function comprising; Tc [PB + (1 - Tc)] X; where Tc represents a transparency factor; PB represents pixel data fed back from a frame buffer means; and where X represents a second function; b. implementing said second function, said section function comprising; Z[Cd] + (1-Z) [diffuse [PM] + specular (Lc]]; where Z represents depth, Cd represents depth cue Color, or haze, Lc represents a light source color PM represents a stored color value, and diffuse and specular represent third and fourth functions; c. implementing said third function, said third function comprising:
    Ka + Kd (N. L/ 1 N. N d. implementing said fourth function, said fourth function, comprising:
    - 42 [ (l/ 4 N.N) (N.H)]0e where N represents a surface normal vector; L represents a unit vector toward a light source; H is a unit vector in a direction of maximum highlight; Ka represents a coefficient of ambient reflection, and 0e represents an object specular exponent; e. combining results of said implemented first, second, third and fourth functions to thereby comprise: Tc[PB] + (1-Tc) [[z[Cd] + (1-z) [diffuse [PM) + specular [LC]]].
  34. 34. An apparatus for shading vectors and curves an a display device, substantially as hereinbefore described with reference to the accompanying drawings.
  35. 35. A method for shading vectors and curves an a display device, substantially as hereinbefore described.
    Plublished 1988 at The Patent Office. State Hwase- % 7.1 IlIgh. Hclbcrn, London WC1R 4TP. Further roDies may be ob-alned from The Patent Office.
    S al es B ran ch. S: M'z-:-Y Crky. Orp,n g K =-n-- L EJ F rinted by Mjl',. D.ex teChn-1 wU eS 11 St M az-y C -aY, K e= Cc n 1 87-
GB8811392A 1987-07-27 1988-05-13 Method and apparatus for shading images Expired - Fee Related GB2207585B (en)

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
US7779787A 1987-07-27 1987-07-27

Publications (3)

Publication Number Publication Date
GB8811392D0 GB8811392D0 (en) 1988-06-15
GB2207585A true GB2207585A (en) 1989-02-01
GB2207585B GB2207585B (en) 1992-02-12

Family

ID=22140108

Family Applications (1)

Application Number Title Priority Date Filing Date
GB8811392A Expired - Fee Related GB2207585B (en) 1987-07-27 1988-05-13 Method and apparatus for shading images

Country Status (7)

Country Link
JP (1) JP2777577B2 (en)
CA (1) CA1305802C (en)
DE (1) DE3825539C2 (en)
FR (1) FR2622030B1 (en)
GB (1) GB2207585B (en)
HK (1) HK60992A (en)
SG (1) SG52792G (en)

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP0454129A2 (en) * 1990-04-26 1991-10-30 Honeywell Inc. System for generating a texture mapped perspective view
GB2271259A (en) * 1992-10-02 1994-04-06 Canon Res Ct Europe Ltd Processing image data
WO1999049417A1 (en) * 1998-03-25 1999-09-30 Microsoft Corporation Fog simulation for partially transparent objects
EP2709068A1 (en) * 2012-09-12 2014-03-19 Fujitsu Semiconductor Limited Image processing apparatus

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US5253339A (en) * 1990-07-26 1993-10-12 Sun Microsystems, Inc. Method and apparatus for adaptive Phong shading

Family Cites Families (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US4586038A (en) * 1983-12-12 1986-04-29 General Electric Company True-perspective texture/shading processor
JPS60126771A (en) * 1983-12-14 1985-07-06 Hitachi Ltd Display system of free curved face
JPS61103277A (en) * 1984-10-26 1986-05-21 Hitachi Ltd Pattern shading device

Cited By (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP0454129A2 (en) * 1990-04-26 1991-10-30 Honeywell Inc. System for generating a texture mapped perspective view
EP0454129A3 (en) * 1990-04-26 1993-05-19 Honeywell Inc. System for generating a texture mapped perspective view
GB2271259A (en) * 1992-10-02 1994-04-06 Canon Res Ct Europe Ltd Processing image data
WO1999049417A1 (en) * 1998-03-25 1999-09-30 Microsoft Corporation Fog simulation for partially transparent objects
US6184891B1 (en) 1998-03-25 2001-02-06 Microsoft Corporation Fog simulation for partially transparent objects
EP2709068A1 (en) * 2012-09-12 2014-03-19 Fujitsu Semiconductor Limited Image processing apparatus

Also Published As

Publication number Publication date
FR2622030B1 (en) 1994-03-04
HK60992A (en) 1992-08-21
CA1305802C (en) 1992-07-28
GB8811392D0 (en) 1988-06-15
FR2622030A1 (en) 1989-04-21
JPH01120685A (en) 1989-05-12
DE3825539C2 (en) 1997-06-12
SG52792G (en) 1992-12-04
DE3825539A1 (en) 1989-02-09
JP2777577B2 (en) 1998-07-16
GB2207585B (en) 1992-02-12

Similar Documents

Publication Publication Date Title
US5063375A (en) Method and apparatus for shading images
US4901064A (en) Normal vector shading for 3-D graphics display system
US5659671A (en) Method and apparatus for shading graphical images in a data processing system
US5808619A (en) Real-time rendering method of selectively performing bump mapping and phong shading processes and apparatus therefor
US8610729B2 (en) Floating point computer system with fog
US6664963B1 (en) System, method and computer program product for programmable shading using pixel shaders
US5673374A (en) Method and apparatus for non-disturbed specular reflections on textured surfaces
US5369737A (en) Normalization of vectors associated with a display pixels of computer generated images
US5307450A (en) Z-subdivision for improved texture mapping
US5896136A (en) Computer graphics system with improved blending
EP0590980B1 (en) Method for Performing Illumination Calculations for Data Representing Three-Dimensional Objects
US5880736A (en) Method system and computer program product for shading
US5561746A (en) Image synthesizing system with surface data perspective transformation
EP0590981B1 (en) Method for Processing Data Representing Three-Dimensional Graphic Objects
US6342885B1 (en) Method and apparatus for illuminating volume data in a rendering pipeline
US5230039A (en) Texture range controls for improved texture mapping
US5812141A (en) Method and apparatus for an adaptive texture mapping controller
EP0314341A2 (en) Computer graphic apparatus for processing lighting model information
US6806886B1 (en) System, method and article of manufacture for converting color data into floating point numbers in a computer graphics pipeline
GB2246497A (en) Method and apparatus for adaptive phong shading
US5739820A (en) Method and apparatus for specular reflection shading of computer graphic images
US6369816B1 (en) Method for modulating volume samples using gradient magnitudes and complex functions over a range of values
US6219062B1 (en) Three-dimensional graphic display device
US5651106A (en) Method and apparatus for vertex sorting in a computer graphics system
US5740344A (en) Texture filter apparatus for computer graphics system

Legal Events

Date Code Title Description
PCNP Patent ceased through non-payment of renewal fee

Effective date: 20030513