Next Patent: Method and system for displaying an image
Next Patent: Method and system for displaying an image
[0001] The present invention is related generally to the field of sampled imagery, and more particularly, a system and method for generating anti-aliased sampled images and sampling images by computation or acquisition while reducing aliasing.
[0002] In computer graphics, input geometry or the like is typically used to represent a scene from which a sampled image is created. A sampled image is a grid, or “raster,” of discrete samples referred to as pixels. The pixels are generally arranged along two perpendicular axes corresponding to the horizontal and vertical axes of the image. Rendering a scene is the process of creating such an image of the scene. This process is also called rasterization. The value of a pixel is determined by calculating a sample value from the scene. The rasterized image, represented by the grid of pixels, is typically displayed visually, such as being printed or displayed upon a computer display monitor. The number of pixels and number of colors or values used in rendering a graphics image limit, to some extent, the quality, accuracy, and various characteristics of the image displayed, (for example, the image sampling accuracy, smoothness, detail, and resolution). A great amount of effort has been devoted to developing sophisticated graphics processing, rendering, and sampling methods for improving image quality. Rendering sampled images, however, produces unwanted artifacts. This production is called “aliasing.” An “anti-aliased” rendering method aims to reduce objectionable artifacts.
[0003] In addition to higher quality static images, rendering high-quality animation depicting visual effects of motion is also desirable. The illusion of motion is created by quickly displaying related images in a sequence in which an object changes appearance slightly. Although the animation of the object may appear to be continuous, each frame of the sequence is a separate image that is displayed momentarily. Thus, the quality of each frame impacts the quality of the overall animation or illusion of motion. Depending upon the method by which the sequence of images is sampled, the resulting representation of motion may result in the creation of motion artifacts. The more noticeable effects include “crawling” and “popping” of pixels on an edge of an object having a color that contrasts sharply with a different colored background.
[0004] For example, consider an object of a first color having a straight edge, that appears to be moving across a background of a second color. As the edge of the object moves across the boundary of a pixel, at some point there must be a determination as to how and when the color of the pixel changes from the color of the background to the color of the object. If the value of the pixel is taken from a single sample point, then when the edge of the object passes the sample point of the pixel, the color of the pixel is changed. The location of a single sample point is typically in the center of the pixel, and consequently, the color of a pixel is determined by the color at the center of the pixel. As a result the edge of the object may be well within the region defined by the pixel, but the pixel may still have the color of the background because the edge has not reached the center (i.e., the sample point) of the pixel.
[0005] When multiple frames of images are displayed in sequence to provide the illusion of an object in motion, the effect of pixels along the edge of the object “popping” from one color or value to another can be distracting for a viewer. The relative motion of an object with respect to the orientation of the sampling grid of the image may be such that pixels along the edge of the object pop values in a manner and with a regularity that create a visual crawling effect along the edge of the object.
[0006] There have been many different approaches to addressing the issue of such aliasing artifacts, including motion artifacts and “staircasing.” One such approach is to increase the resolution, or the number of pixels used to represent an image. For example, the available resolution of computer graphics has increased dramatically since the first monochrome computer monitors were developed, and undoubtedly will continue to do so. Similarly, printing devices have ever increasing resolution as well. However, there are practical limitations on the manufacturing of displays and other devices used for recreating an image. Computational limitations must also be considered because there are practical limitations with respect to the amount of data that can be processed in rendering an image. Moreover, no matter how high a resolution is used to represent a graphics image, the image is still nevertheless sampled at discrete intervals, and consequently, subject to some degree of aliasing, including motion artifacts.
[0007] Another approach has been to increase the number of values computed for each pixel. More specifically in constructing an image, multi-sampling anti-aliasing systems might use sample values from multiple samples taken at different locations within a pixel in determining the final value of a pixel. As a result, as the edge of a moving object first passes over one of a pixel's sample points, the pixel may take on a different value that is a compromise between the value of the object and that of the disparate background. For example, the pixel might change its value each time the object covers another sample point of the pixel, until all of the sample points share the color of the object, the pixel finally taking on the color of the object, assuming the size, shape, and motion of the object's result in the object gradually and completely covering the pixel.
[0008] The multiple samples for each pixel are typically arranged in an ordered pattern, such as in a rectangular grid where the sides of a rectangle defined by the positioned samples are parallel to the axes of the pixels. Previous approaches have also positioned the samples in a (pseudo)-random fashion. Random multi-sampling per pixel generally requires a considerable amount of computational power. As a result, some anti-aliasing algorithms employ sampling patterns which attempt to simulate a random sampling pattern. However, these patterns may require nearly the same computing power as for random multiple sampling per pixel.
[0009] Although conventional, multi-sample, full-scene anti-aliasing methods generally do reduce motion artifacts and edge effects, in some situations motion artifacts remain. Full-scene anti-aliasing is antialiased rendering of substantially a fill frame. For example, when an object has an edge parallel to an axis of the sampling pattern and is moving in a direction perpendicular to the edge, a popping effect may be created when the edge of the object passes through multiple sample points simultaneously. Taking more samples per pixel may reduce the severity of multi-sampling motion artifacts, but processing overhead and economic considerations will place practical limits on the maximum number of samples that can be reasonably taken per pixel.
[0010] Therefore, there is a need for an alternative system and method for rendering an image from a representation of a scene, while reducing aliasing, such as motion artifacts and edge effects.
[0011] The present invention relates to a method and system for rendering a two- or three-dimensional scene, producing a sampled image, while minimizing aliasing. A scene is rasterized or sampled at a first angle relative to a first coordinate system. The resultant raster, comprising a plurality of pixels, is then rotated at a second angle equal to the inverse of the first angle. An image of the scene is then formed by sampling the pixels in the raster, producing an image that is properly oriented with respect to the first coordinate system. The second rotation may be performed by first applying the pixels to a polygon surface. The pixels may be first converted to a texture map and applied to the polygon surface as a texture. Then this polygon is rotated and rendered. The anti-aliasing technique may also include a super-sampling process, rasterizing the scene to produce a temporary surplus of pixels. To down-sample the number of pixels applied to the polygon surface, bilinear filtering may also be applied, when converting pixels to texels to form a texture map to be applied to the polygon surface. Such anti-aliased rendering may also be repeated on the scene, using two or more different initial angles, rendering two or more separate images that are ultimately combined, to produce a final resultant image. The result of multiple steps described above may be computed in a single step.
[0012]
[0013]
[0014]
[0015]
[0016]
[0017]
[0018]
[0019] Embodiments of the present invention render anti-aliased images while reducing artifacts in static images and/or in motion/animation. The systems and methods described herein rasterize a scene at an angle and apply the pixel values from the rasterization to a polygon rendered at the inverse of the angle at which the scene was first rasterized. Embodiments of the invention may be called “rotate-unrotate” rendering. It will be appreciated that the terms “pixel,” “pixel value,” and “value” will be used herein interchangeably. When the terms are to convey different meanings, it will be apparent from the context. Certain details are set forth below to provide a sufficient understanding of the invention. However, it will be clear to one skilled in the art that the invention may be practiced without these particular details. In other instances, well-known circuits, control signals, timing protocols, and software operations have not been shown in detail in order to avoid unnecessarily obscuring the invention.
[0020]
[0021] The computer system
[0022]
[0023] A pixel engine
[0024] A memory controller
[0025] Although the texture engine circuitry
[0026] A portion of a pixel processing pipeline
[0027] As mentioned previously, well-known circuits, control signals, timing protocols, and software operations have not been shown in detail in order to avoid unnecessarily obscuring the invention. However, it will be appreciated that the texture map buffer
[0028] It will be further appreciated that the sample values calculated during rasterization and applied to the polygon surface may represent values such as color or grayscale at a sample location, and that the sample values for the samples may consist of several different components. For example, a sample value may represent colors which are the combination of red, green, and blue color components. Another example includes sample values representing colors which are the combination of luma and chroma components. Consequently, because it is well understood in the art, although circuitry to perform graphics operation for each of the components is not expressly shown or described herein, embodiments of the present invention include circuitry, control signals, and the like necessary to perform anti-aliased rendering of each component for multi-component sample values.
[0029] Embodiments of the present invention can use conventional rendering circuitry/software to perform its operation. The operation of the graphics processing system
[0030] Possibly after format conversion and/or up sampling, the rasterized pixel values are then treated as texel values of a texture map such that the rasterized scene is a texture that may be applied to the surface of a polygon. The texture map is provided to the texture map buffer
[0031] The texture application engine
[0032] It will be further appreciated that the angle θ can be selected in various manners without departing from the scope of the present invention. For example, the angle θ can be preprogrammed to a certain value. Alternatively, the angle θ can be selected from a preselected set of angles. The selection may be made in an ordered fashion or in a random or pseudo-random fashion as well. The preselected angles can be a fixed set of angles or positions calculated in advance, so that choosing an angle from a group of preselected angles will mean that a table of angles is constructed in advance, and then selections from the table are made during anti-aliased rendering. However, it will be further appreciated that, as an alternative, angles or positions could be generated in a constrained or controlled manner, to accomplish a similar result. For example, angles could be generated randomly or pseudo-randomly, and then transformed such that a useful subset of these become the set of preselected angles.
[0033] The anti-aliased rendering by embodiments of the present invention reduce polygon popping and other aliasing which might result along the vertical and horizontal axis. When the scene is initially rasterized at the angle θ, the sampling is oriented at an angle with respect to the desired image and the pixels from the rasterization represent an image of the rotated scene. Thus, horizontal and vertical lines in the original scene are now de-emphasized rather than being accentuated by the orientation of the scanlines. The scene is resampled during the rendering of the polygon rotated at an inverse angle of the initial rasterization angle to reorient the image.
[0034] Another embodiment of the present invention is described in the flow diagram of
[0035] In a similar vein, illustrated in
[0036] Although not shown in
[0037] Another embodiment of the present invention is shown in
[0038] The values of the two respective rendered polygons can be combined in a variety of methods. For example, in one method of combining the values of the rendered polygons, the values of the first and second renderings are averaged to provide values for the pixels of the resultant image. Thus, an aliasing artifact at one location in the first image may be due to the angle in that the second image at the second angle may contain less aliasing at that same location. The averaging minimizes the degree of aliasing at such locations.
[0039] Another approach to combining the rendered images is to use an alpha-blending technique, where the pixels of the rendered polygons are overlaid and the respective opacity or alpha values are adjusted to yield composites for the pixels of the resultant image. In the case where the pixels are alpha-blended, the values of correspondingly located pixels are scaled by their respective alpha values, and then the scaled values are summed together to yield a resulting value for each pixel. However, other alpha- or opacity-blending techniques may be applied as well.
[0040] Still another method of combining the rendered images is to interlace or display in an alternating sequence the rendered images. Video interlacing can be used to effect a blending of multiple frame buffers. In conventional NTSC television, each interlaced video frame consists of two images called “fields.” Each field is the even or odd lines of the image. When displaying video, the television updates each field every {fraction (1/60)}
[0041] Combining pixels of n framebuffers: the values are combined by summing the respective values, each having been multiplied by a respective weight. The set of weights comprises one weight for each of the images, each typically rendered at a different angle. This sum can be expressed by the following formula:
[0042] where w
[0043] In general, it is expected that the filter is normalized. That is, the sum of the set of weights should be equal to one (sometimes referred to as “unity”). It is possible, however, that some applications will use weights that sum to less than one, or greater than one, as in a special effect. Although this technique appears very similar to the mathematical construction of alpha blending, with alpha blending, the term alpha is conceptually used to refer to the “coverage” of the pixel.
[0044] Another blending or combining technique uses logic operators. In this blending method, values are combined by the use of a logical expression. The logical expression is applied to each bit of the value of a pixel. This has the effect that individual portions of the pixel value may be selected or masked on a per-bit basis. This particular method will have applications where image mattes are used. For example,
[0045] It will be appreciated that the techniques described herein for combining the multiple rendered images are exemplary, and do not provide a comprehensive recitation of all possible combining alternatives. Consequently, the particular technique for combining the multiple rendered images should not be interpreted as limiting the scope of the present invention, except to the extent the limitation is recited in the claims appended hereto.
[0046] As previously described, in the embodiment of the invention illustrated in
[0047] In contrast, rasterizing at the two angles at different instants is intended to mean that the scene has changed from when the rasterization at the first angle occurs and when the rasterization at the second angle occurs. In this manner, a sequence of frames can be created and blended together. After two initial frames are rasterized and blended, a subsequent rasterized frame can be blended with the previous, single, non-composite image, thus, two consecutive frames are blended together for each output frame. As a result, when scene geometry moves at high speeds, the motion will tend to appear smoother, while motion at lower speeds will yield more anti-aliasing.
[0048] Although the embodiments of the invention described with respect to
[0049] It will be further appreciated that multiple frames of texels and pixels may be combined using various alternative techniques to form a resultant image and still remain within the scope of the present invention. For example, the embodiment shown in
[0050] Embodiments of the present invention have been described to this point as separate variations of embodiments of the present invention. It will be appreciated, however, that the various embodiments so described can be combined to provide additional alternative embodiments of the present invention. For example, anti-aliased rendering according to embodiments of the present invention can include super-sampling during the initial rasterization of the scene as well as bilinear filtering when converting pixels to a texture map. Similarly, bilinear filtering and rasterization at multiple angles can be combined to produce another embodiment. Thus, embodiments resulting from the combination of the embodiments particularly described herein remain within the scope of the present invention.
[0051] From the foregoing it will be appreciated that, although specific embodiments of the invention have been described herein for purposes of illustration, various modifications may be made without deviating from the spirit and scope of the invention. For example, embodiments of the present invention have been described as being implemented in portions of the pixel engine