US6005583AExpiredUtility

Precise gradient calculation system and method for a texture mapping system of a computer graphics system

Assignee: HEWLETT PACKARD COPriority: Apr 30, 1997Filed: Apr 30, 1997Granted: Dec 21, 1999
Est. expiryApr 30, 2017(expired)· nominal 20-yr term from priority
Inventors:Teresa Morrison
G06T 11/40
75
PatentIndex Score
62
Cited by
5
References
30
Claims

Abstract

A gradient calculation system efficiently calculates precise gradients for planar surfaces of primitives in computer graphics systems using exact closed form solutions. The system is particularly suited for calculating gradients to enable selection of an appropriate texture map resolution in a texture mapping system. In architecture, the gradient calculation system can be implemented in software, hardware, or a combination thereof, and is more particularly implemented as follows. A texture mapping system is provided with a plurality of MIP maps with different texel resolutions. A gradient calculation system associated with the texture mapping system computes texel gradients relative to a pixel of a primitive using closed form equations that result in exact gradients. MIP map selection logic associated with the texture mapping system selects an appropriate MIP map for the pixel from the plurality of MIP maps based upon the calculated exact gradients. Optionally, the system may further include a performance optimization feature for assigning the appropriate MIP map to subsequent pixels of, preferably, the entire primitive, or secondarily, to subsequent pixels of a span of the primitive, when certain gradient criteria are met.

Claims

exact text as granted — not AI-modified
Now, therefore, the following is claimed: 
     
       1. A system for accurately establishing texture resolution in a texture mapping system associated with a computer graphics system, comprising: a plurality of MIP maps with different texel resolutions;   gradient calculation logic configured to compute a mathematical closed form solution for texel gradients of one of said MIP maps relative to a pixel of a primitive, said mathematical closed form solution resulting in computation of exact gradients for said texel gradients; and   MIP map selection logic configured to select an appropriate MIP map for said pixel from said plurality of MIP maps based upon said gradients.   
     
     
       2. The system of claim 1, wherein said gradient calculation logic is configured to compute first and second texel gradients ∂(s/q)/∂x and ∂(t/q)/∂y associated with each of said MIP maps at said pixel of a primitive based upon the following expressions:   ∂(s/q)/∂x=∂(S/Q)/∂x=1/Q[∂S/∂x-(S/Q)(∂Q/∂x)]     and     ∂(t/q)/∂y=∂(T/Q)/∂y=1/Q[∂T/∂y-(T/Q)(∂Q/∂y)],     where S is s/w, T is t/w, Q is q/w, w is a spatial perspective parameter and corresponds to each MIP map, s and t are texel coordinates, x and y are screen coordinates, and q is a homogeneous texture effect parameter associated with each texel.   
     
     
       3. The system of claim 1, further comprising logic configured to assign said appropriate MIP map to subsequent pixels of a span of said primitive when dQ/dx and dQ/dy are zero at said pixel. 
     
     
       4. The system of claim 1, further comprising logic configured to assign said appropriate MIP map to subsequent pixels of said primitive when ∂Q/∂x and ∂Q/∂y are zero at said pixel. 
     
     
       5. The system of claim 1, wherein said gradient calculation logic and said MIP map selection logic are implemented in hardware in a rasterizer of said computer graphics system. 
     
     
       6. The system of claim 1, wherein said gradient computation logic and said MIP map selection logic are implemented in software that is stored in memory and executed by a processor that is interfaced with said computer graphics system. 
     
     
       7. The system of claim 2, wherein said MIP map selection logic further comprises: logic configured to scale said gradients to each MIP map as follows: ∂u/∂x=∂(S/Q)/∂x*(texture width); and   ∂v/∂y=∂(S/T)/∂y*(texture height); where u and v are scaled texture coordinates;       logic configured to compute a level λ for each MIP map as follows:   λ=log.sub.2 [ρ(x,y)},     where ρ=max {max [|∂u/∂x|, |∂u/∂y|], max [|∂v/∂x|, |∂v/∂y|]}; and     logic configured to select said appropriate MIP map for said pixel from said plurality of MIP maps based upon said level λ.   
     
     
       8. A system for accurately establishing texture resolution in a texture mapping system associated with a computer graphics system, comprising: a plurality of MIP maps with different texel resolutions;   gradient calculation means for computing first and second texel gradients ∂(s/q)/∂x and ∂(t/q)/∂y associated with each of said MIP maps at a pixel of a primitive based upon the following expressions:   ∂(s/q)/∂x=∂(S/Q)/∂x=1/Q[∂S/∂x-(S/Q)(∂Q/∂x)]     and     ∂(t/q)/∂y=∂(T/Q)/∂y=1/Q[∂T/∂y-(T/Q)(∂Q/∂y)],     where S is s/w, T is t/w, Q is q/w, w is a spatial perspective parameter and corresponds to each MIP map, s and t are texel coordinates, x and y are screen coordinates, and q is a homogeneous texture effect parameter associated with each texel; and     MIP map selection means for selecting an appropriate MIP map for said pixel from said plurality of MIP maps based upon said gradients.   
     
     
       9. The system of claim 8, further comprising a means for assigning said appropriate MIP map to subsequent pixels of a span of said primitive when dQ/dx and dQ/dy are zero at said pixel. 
     
     
       10. The system of claim 8, further comprising a means for assigning said appropriate MIP map to subsequent pixels of said primitive when dQ/dx and dQ/dy are zero at said pixel. 
     
     
       11. The system of claim 8, wherein said gradient calculation means and said MIP map selection means are implemented in hardware in a rasterizer of said computer graphics system. 
     
     
       12. The system of claim 8, wherein said gradient computation means and said MIP map selection means are implemented in software that is stored in memory and executed by a processor that is interfaced with said computer graphics system. 
     
     
       13. The system of claim 8, wherein said MIP map selection means further comprises: first means for scaling said gradients to each MIP map as follows: ∂u/∂x=∂(S/Q)/∂x*(texture width); and   ∂v/∂y=∂(S/Q)/∂y*(texture height); where u and v are scaled texture coordinates;       second means for computing a level λ for each MIP map as follows:   λ=log.sub.2 [ρ(x,y)[}]],     where ρ=max {max [|∂u/∂x|, |∂u/∂y|], max [|∂v/∂x|, |∂v/∂y|]}; and     third means for selecting said appropriate MIP map for said pixel from said plurality of MIP maps based upon said level λ.   
     
     
       14. A computer readable medium having a program for accurately establishing texture resolution in a texture mapping system associated with a computer graphics system, comprising: a plurality of MIP maps with different texel resolutions;   logic for computing a mathematical closed form solution for texel gradients of one of said MIP maps relative to a pixel of a primitive, said mathematical closed form solution resulting in computation of exact gradients for said texel gradients; and logic for selecting an appropriate MIP map for said pixel from said plurality of MIP maps based upon said gradients.     
     
     
       15. A method for accurately establishing texture resolution in a texture mapping system associated with a computer graphics system, comprising the steps of: providing a plurality of MIP maps with different texel resolutions;   computing a mathematical closed form solution for texel gradients of one of said MIP maps relative to a pixel of a primitive, said mathematical closed form solution resulting in computation of exact gradients for said texel gradients; and   selecting an appropriate MIP map for said pixel from said plurality of MIP maps based upon said gradients.   
     
     
       16. The method of claim 15, further comprising the step of computing first and second texel gradients ∂(s/q)/∂x and ∂(t/q)/∂y associated with each of said MIP maps at said pixel of said primitive based upon the following expressions:   ∂(s/q)/∂x=∂(S/Q)/∂x=1/Q[∂S/∂x-(S/Q)(∂Q/∂x)]     and     ∂(t/q)/∂y=∂(T/Q)/∂y=1/Q[∂T/∂y-(T/Q)(∂Q/∂y)],     where S is s/w, T is t/w, Q is q/w, w is a spatial perspective parameter and corresponds to each MIP map, s and t are texel coordinates, x and y are screen coordinates, and q is a homogeneous texture effect parameter associated with each texel.   
     
     
       17. The method of claim 15, further comprising the step of assigning said appropriate MIP map to subsequent pixels of a span of said primitive when dQ/dx and dQ/dy are zero at said pixel. 
     
     
       18. The method of claim 15, further comprising the step of assigning said appropriate MIP map to subsequent pixels of said primitive when ∂Q/∂x and ∂Q/∂y are zero at said pixel. 
     
     
       19. The method of claim 15, further comprising the step of computing said gradients and selecting said appropriate MIP map using hardware in a rasterizer of said computer graphics system. 
     
     
       20. The method of claim 15, further comprising the step of computing said gradients and selecting said appropriate MIP map using software that is stored in memory and executed by a processor that is interfaced with said computer graphics system. 
     
     
       21. The method of claim 16, further comprising the steps of: scaling said gradients to each MIP map as follows: ∂u/∂x=∂(S/Q)/∂x*(texture width); and   ∂v/∂y=∂(S/Q)/∂y*(texture height); where u and v are scaled texture coordinates,       computing a level λ for each MIP map as follows:   λ=log.sub.2 [ρ(x,y)},     where ρ=max {max [|∂u/∂x|, |∂u/∂y|], max [|∂v/∂x|, |∂v/∂y|]}; and     selecting said appropriate MIP map for said pixel from said plurality of MIP maps based upon said level λ.   
     
     
       22. A system for accurately establishing texture resolution in a texture mapping system associated with a computer graphics system, comprising: a plurality of MIP maps with different texel resolutions;   gradient calculation logic configured to compute a mathematical closed form solution for texel gradients of one of said MIP maps relative to a pixel; and   MIP map selection logic configured to select an appropriate MIP map for said pixel from said plurality of MIP maps based upon said gradients,   wherein said gradient calculation logic is configured to compute first and second texel gradients ∂(s/q)/∂x and ∂(t/q)/∂y associated with each of said MIP maps at said pixel of a primitive based upon the following expressions:   ∂(s/q)/∂x=∂(S/Q)/∂x=1/Q[∂S/∂x-(S/Q)(∂Q/∂x)]     and     ∂(t/q)/∂y=∂(T/Q)/∂y=1/Q[∂T/∂y-(T/Q)(∂Q/∂y)],       where S is s/w, T is t/w, Q is q/w, w is a spatial perspective parameter and corresponds to each MIP map, s and t are texel coordinates, x and y are screen coordinates, and q is a homogeneous texture effect parameter associated with each texel.   
     
     
       23. The system of claim 22, wherein said MIP map selection logic further comprises: logic configured to scale said gradients to each MIP map as follows: ∂u/∂x=∂(S/Q)/∂x*(texture width); and   ∂v/∂y=∂(S/T)/∂y*(texture height); where u and v are scaled texture coordinates;       logic configured to compute a level λ for each MIP map as follows:   λ=log.sub.2 [ρ(x,y)],     where ρ=max {max [|∂u/∂x|, |∂u/∂y|], max [|∂v/∂x|, |∂v/∂y|]}; and     logic configured to select said appropriate MIP map for said pixel from said plurality of MIP maps based upon said level λ.   
     
     
       24. A system for accurately establishing texture resolution in a texture mapping system associated with a computer graphics system, comprising: a plurality of MIP maps with different texel resolutions;   gradient calculation means for computing first and second texel gradients ∂(s/q)/∂x and ∂(t/q)/∂y associated with each of said MIP maps at a pixel of a primitive based upon the following expressions:   ∂(s/q)/∂x=∂(S/Q)/∂x=1/Q[∂S/∂x-(S/Q)(∂Q/∂x)]     and     ∂(t/q)/∂y=∂(T/Q)/∂y=1/Q[∂T/∂y-(T/Q)(∂Q/∂y)],       where S is s/w, T is t/w, Q is q/w, w is a spatial perspective parameter and corresponds to each MIP map, s and t are texel coordinates, x and y are screen coordinates, and q is a homogeneous texture effect parameter associated with each texel;   MIP map selection means for selecting an appropriate MIP map for said pixel from said plurality of MIP maps based upon said gradients; and   means for assigning said appropriate MIP map to subsequent pixels of a span of said primitive when dQ/dx and dQ/dy are zero at said pixel.   
     
     
       25. A system for accurately establishing texture resolution in a texture mapping system associated with a computer graphics system, comprising: a plurality of MIP maps with different texel resolutions;   gradient calculation means for computing first and second texel gradients ∂(s/q)/∂x and ∂(t/q)/∂y associated with each of said MIP maps at a pixel of a primitive based upon the following expressions:   ∂(s/q)/∂x=∂(S/Q)/∂x=1/Q[∂S/∂x-(S/Q)(∂Q/∂x)]     and     ∂(t/q)/∂y=∂(T/Q)/∂y=1/Q[∂T/∂y-(T/Q)(∂Q/∂y)],       where S is s/w, T is t/w, Q is q/w, w is a spatial perspective parameter and corresponds to each MIP map, s and t are texel coordinates, x and y are screen coordinates, and q is a homogeneous texture effect parameter associated with each texel;   MIP map selection means for selecting an appropriate MIP map for said pixel from said plurality of MIP maps based upon said gradients; and   means for assigning said appropriate MIP map to subsequent pixels of said primitive when dQ/dx and dQ/dy are zero at said pixel.   
     
     
       26. A system for accurately establishing texture resolution in a texture mapping system associated with a computer graphics system, comprising: a plurality of MIP maps with different texel resolutions;   gradient calculation means for computing first and second texel gradients ∂(s/q)/∂x and ∂(t/q)/∂y associated with each of said MIP maps at a pixel of said primitive based upon the following expressions:   ∂(s/q)/∂x=∂(S/Q)/∂x=1/Q[∂S/∂x-(S/Q)(∂Q/∂x)]     and     ∂(t/q)/∂y=∂(T/Q)/∂y=1/Q[∂T/∂y-(T/Q)(∂Q/∂y)],       where S is s/w, T is t/w, Q is q/w, w is a spatial perspective parameter and corresponds to each MIP map, s and t are texel coordinates, x and y are screen coordinates, and q is a homogeneous texture effect parameter associated with each texel;   MIP map selection means for selecting an appropriate MIP map for said pixel from said plurality of MIP maps based upon said gradients; and   wherein said gradient calculation means and said MIP map selection means are implemented in hardware in a rasterizer of said computer graphics system.   
     
     
       27. A system for accurately establishing texture resolution in a texture mapping system associated with a computer graphics system, comprising: a plurality of MIP maps with different texel resolutions;   gradient calculation means for computing first and second texel gradients ∂(s/q)/∂x and ∂(t/q)/∂y associated with each of said MIP maps at a pixel of said primitive based upon the following expressions:   ∂(s/q)/∂x=∂(S/Q)/∂x=1/Q[∂S/∂x-(S/Q)(∂Q/∂x)]     and     ∂(t/q)/∂y=∂(T/Q)/∂y=1/Q[∂T/∂y-(T/Q)(∂Q/∂y)],       where S is s/w, T is t/w, Q is q/w, w is a spatial perspective parameter and corresponds to each MIP map, s and t are texel coordinates, x and y are screen coordinates, and q is a homogeneous texture effect parameter associated with each texel;   MIP map selection means for selecting an appropriate MIP map for said pixel from said plurality of MIP maps based upon said gradients; and   wherein said gradient computation means and said MIP map selection means are implemented in software that is stored in memory and executed by a processor that is interfaced with said computer graphics system.   
     
     
       28. A system for accurately establishing texture resolution in a texture mapping system associated with a computer graphics system, comprising: a plurality of MIP maps with different texel resolutions;   gradient calculation means for computing first and second texel gradients ∂(s/q)/∂x and ∂(t/q)/∂y associated with each of said MIP maps at a pixel of a primitive based upon the following expressions:   ∂(s/q)/∂x=∂(S/Q)/∂x=1/Q[∂S/∂x-(S/Q)(∂Q/∂x)]     and     ∂(t/q)/∂y=∂(T/Q)/∂y=1/Q[∂T/∂y-(T/Q)(∂Q/∂y)],       where S is s/w, T is t/w, Q is q/w, w is a spatial perspective parameter and corresponds to each MIP map, s and t are texel coordinates, x and y are screen coordinates, and q is a homogeneous texture effect parameter associated with each texel;   MIP map selection means for selecting an appropriate MIP map for said pixel from said plurality of MIP maps based upon said gradients; and   wherein said MIP map selection means comprises a first means for scaling said gradients to each MIP map as follows: ∂u/∂x=∂(S/Q)/∂x*(texture width); and   ∂v/∂y=∂(S/Q)/∂y*(texture height);     where u and v are scaled texture coordinates, and a second means for computing a level λ for each MIP map as follows:   λ=log.sub.2 [ρ(x,y)},       where ρ=max {max [|∂u/∂x|, |∂u/∂y|], max [|∂v/∂x|, |∂v/∂y|]}; and a third means for selecting said appropriate MIP map for said pixel from said plurality of MIP maps based upon said level λ.   
     
     
       29. A method for accurately establishing texture resolution in a texture mapping system associated with a computer graphics system, comprising the steps of: providing a plurality of MIP maps with different texel resolutions;   computing a mathematical closed form solution for texel gradients of one of said MIP maps relative to a pixel;   selecting an appropriate MIP map for said pixel from said plurality of MIP maps based upon said gradients; and   computing first and second texel gradients ∂(s/q)/∂x and ∂(t/q)/∂y associated with each of said MIP maps at said pixel of a primitive based upon the following expressions:   ∂(s/q)/∂x=∂(S/Q)/∂x=1/Q[∂S/∂x-(S/Q)(∂Q/∂x)]     and     ∂(t/q)/∂y=∂(T/Q)/∂y=1/Q[∂T/∂y-(T/Q)(∂Q/∂y)],       where S is s/w, T is t/w, Q is q/w, w is a spatial perspective parameter and corresponds to each MIP map, s and t are texel coordinates, x and y are screen coordinates, and q is a homogeneous texture effect parameter associated with each texel.   
     
     
       30. The method of claim 29, further comprising the steps of: scaling said gradients to each MIP map as follows: ∂u/∂x=∂(S/Q)/∂x*(texture width); and   ∂v/∂y=∂(S/Q)/∂y*(texture height); where u and v are scaled texture coordinates,       computing a level λ for each MIP map as follows:   λ=log.sub.2 [ρ(x,y)},     where     ρ=max {max [|∂u/∂x|, |∂u/∂y|], max [|∂v/∂x|, |∂v/∂y|]}; and   selecting said appropriate MIP map for said pixel from said plurality of MIP maps based upon said level λ.

Join the waitlist — get patent alerts

Track US6005583A — get alerts on status changes and closely related new filings.

We store only your email — no account needed. See our privacy policy.