Method and apparatus for effective level of detail selection
First Claim
1. A method for mapping texture information from a texture space to a computer generated object represented as one or more pixel coordinates (x,y) in a computer image display screen space, said texture space including a plurality of texture maps, with each map having texture information associated with a predefined level of detail, said texture information to be mapped in the form of texels, with each texel represented by a texture address coordinate (u,v), said method comprising:
- defining a grid of a predetermined number of pixels, said grid extending in both horizontal and vertical dimensions;
for each of a group of the pixels, 1) calculating a perspectively correct texture address for the pixel, and 2) determining a rate of change of texture addresses, at the pixel, in both the horizontal and vertical directions; and
for each of a defined set of pixels, 1) using linear interpolation techniques and using the calculated texture addresses to determine an approximate rate of change of texture addresses, at said each pixel, in both the horizontal and vertical directions, 2) utilizing the determined approximate rate of changes to compute a level of detail index value, and 3) selecting one of the texture maps based on said computed level of detail index value, and utilizing the calculated texture address for the pixel to select one or more texels in the selected texture map for the pixel;
wherein said calculating step includes calculating at least one perspectively corrected texture value for a pixel located on one corner of said grid, and calculating two more perspectively corrected texture addresses (Uq,r, Vq,r) for pixels located outside said grid adjacent remaining corners of said grid.
2 Assignments
0 Petitions
Accused Products
Abstract
Method and apparatus for rendering texture to an object to be displayed on a pixel screen display. This technique makes use of linear interpolation between perspectively correct texture address to calculate rates of change of individual texture addresses components to determine a selection of the correct LOD map to use and intermediate texture addresses for pixels of the object between the perspectively correct addresses. The method first determines perspectively correct texture address values associated with four corners of a predefined span or grid of pixels. Then, a linear interpolation technique is implemented to calculate a rate of change of texture address components in the screen x and y directions for pixels between the perspectively bound span corners. This linear interpolation technique is performed in both screen directions to thereby create a potentially unique level of detail value for each pixel, which is then used as an index to select the correct pre-filtered LOD texture map. When mapping an individually determined LOD value per pixel, the effect of producing undesirable artifacts that may appear if a single LOD for an entire span or polygon is used, is obviated.
-
Citations
14 Claims
-
1. A method for mapping texture information from a texture space to a computer generated object represented as one or more pixel coordinates (x,y) in a computer image display screen space, said texture space including a plurality of texture maps, with each map having texture information associated with a predefined level of detail, said texture information to be mapped in the form of texels, with each texel represented by a texture address coordinate (u,v), said method comprising:
-
defining a grid of a predetermined number of pixels, said grid extending in both horizontal and vertical dimensions;
for each of a group of the pixels, 1) calculating a perspectively correct texture address for the pixel, and 2) determining a rate of change of texture addresses, at the pixel, in both the horizontal and vertical directions; and
for each of a defined set of pixels, 1) using linear interpolation techniques and using the calculated texture addresses to determine an approximate rate of change of texture addresses, at said each pixel, in both the horizontal and vertical directions, 2) utilizing the determined approximate rate of changes to compute a level of detail index value, and 3) selecting one of the texture maps based on said computed level of detail index value, and utilizing the calculated texture address for the pixel to select one or more texels in the selected texture map for the pixel;
wherein said calculating step includes calculating at least one perspectively corrected texture value for a pixel located on one corner of said grid, and calculating two more perspectively corrected texture addresses (Uq,r, Vq,r) for pixels located outside said grid adjacent remaining corners of said grid. - View Dependent Claims (2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14)
the step of calculating perspectively correct texture addresses includes the steps of calculating perspectively correct texture addresses for two pixels that define a first vertical edge associated with said grid, and for two other pixels that define a second vertical edge associated with said grids and the step of using linear interpolation techniques includes the steps of 1) performing a first interpolation to obtain a u and v rate of texture address change with respect to a vertical dimension and intermediate u and v texture addresses along said first vertical edge of said grid, 2) performing a second interpolation to obtain a u and v rate of texture address change with respect to a vertical dimension and intermediate u and v texture addresses along said second vertical edge of said grid, 3) for a given row of said grid, performing a third interpolation to obtain a u and v unit rate of texture address change in a vertical dimension for each intermediate pixel between said first edge and said second edge, and 4) for a given row of said grid, performing a fourth interpolation to obtain a u and v unit rate of texture address change in a horizontal dimension and the intermediate u and v texture addresses between said first edge and said second edge.
-
-
3. The method according to claim 2, wherein said step c) of performing a first interpolation includes the steps of calculating a difference between two u, v coordinate values of two perspectively corrected texture addresses Ur,q,Vr,q associated with two pixels located along said first vertical edge of said grid, and, for a pixel to be mapped, dividing said calculated difference by a value based on a number of intermediate pixels along said first edge to obtain a said rate of change value of a texture address with respect to a unit pixel change in screen space in said vertical dimension for u and v.
-
4. The method according to claim 3, wherein said dividing step includes dividing by a value based on a number of intermediate pixels along said first edge plus one.
-
5. The method according to claim 2, wherein said step of performing a second interpolation includes the steps of calculating a difference between two u, v coordinate values of two perspectively corrected texture addresses Ur,q,Vr,q associated with two pixels located along said second vertical edge of said grid, and, for a pixel to be mapped, dividing said calculated difference by a value based on a number of intermediate pixels along said second edge to obtain a said rate of change value of a texture address with respect to a unit pixel change in screen space in said vertical dimension for u and v.
-
6. The method according to claim 5, wherein said dividing step includes dividing by a value based on a number of intermediate pixels along said first edge plus one.
-
7. The method according to claim 2, wherein said e) of performing a third interpolation includes the step of:
-
calculating a difference between a rate of change value of a texture address for a pixel located on said first vertical edge and a rate of change value of a texture address for a pixel located on said second vertical edge, and dividing said difference by a value based on a number of intermediate pixels between said first and second vertical edges to obtain a rate of change value of the vertical texture address rate of change value for each pixel located along a horizontal dimension.
-
-
8. The method according to claim 2, wherein said step of performing a fourth interpolation includes the step of:
-
calculating a difference between a u, v coordinate associated with a pixel located on said row along first vertical edge and a u, v coordinate associated with a pixel located on a row of said second vertical edge; and
dividing said difference by a value based on a number of intermediate pixels in said grid located along said horizontal dimension between said first vertical edge and second vertical edge to obtain a u and v rate of change of texture addresses for pixel locations on said first vertical edge and intermediate of said first vertical edge and second vertical edge in said grid, said rate of change of said texture address calculated with respect to a horizontal dimension.
-
-
9. The method according to claim 2, wherein for a pixel in said grid, said interpolated rate of change value of texture address with respect to said vertical dimension approximates au/ay representing a rate of change of said texture address coordinate u with respect to said vertical direction, and ∂
- v/∂
y representing a rate of change of said texture coordinate v with respect to said vertical direction, and said interpolated rate of change value of texture address with respect to said horizontal dimension approximates ∂
u/∂
x representing a rate of change of said texture address coordinate u with respect to said horizontal direction, and ∂
v/∂
x representing a rate of change of said texture address coordinate v with respect to said horizontal direction.
- v/∂
-
10. The method according to claim 9, wherein said step of utilizing the determined rate of chances to compute a level of detail index value includes utilizing said
-
u ∂ x , ∂ u ∂ y , ∂ v ∂ x , ∂ v ∂ y values to solve an equation where LOD is a level of detail index for said pixel coordinate.
-
-
11. The method according to claim 2, wherein the defining step includes the steps of defining a first and having the predetermined number of pixels, and defining a new grid of contiguous pixels in said pixel space and having one or more object pixel coordinates located therein, said new grid located adjacent said first grid;
- and further including the steps of
computing two new perspectively corrected texture addresses (Uq,r,Vq,r) corresponding to one or more pixels at predefined locations associated with corners of said new grid;
and repeating the using step, the utilizing step, and the selecting step to generate texture address coordinate corresponding to each pixel coordinate to be texture mapped in said object to be displayed, said texture information selected from a said texture map according to a level of detail index value and u, v addresses computed for a pixel.
- and further including the steps of
-
12. The method according to claim 11, wherein one or both said defining and calculating steps further includes utilizing two previously computed perspectively corrected texture addresses (Ur,q,Vq,r) corresponding to said first grid and two new perspectively corrected texture addresses (Uq,r,Vq,r) associated with said new grid, said two previously computed perspectively corrected texture values being determined by corners common to both a previous grid and said new grid.
-
13. The method according to claim 11, wherein the defining, computing and retaining steps are successively repeated to determine texture address coordinates and LOD index for every pixel of an object to be displayed in pixel space, with each texture address coordinate selected from a said texture map according to a level of detail index value for a pixel.
-
14. The method according to claim 1, wherein said step of calculating perspectively corrected texture addresses (U,V), includes the step of calculating S, T and W−
- 1 values representing attribute data associated with an object pixel coordinate X,Y in three dimensional space, said S, T and W−
1 values defined according to equations;
- 1 values representing attribute data associated with an object pixel coordinate X,Y in three dimensional space, said S, T and W−
Specification