Patent US5877771A successfully refreshed from Google Patents.
← Back to Patent Explorer
US5877771A Expired / Lapsed US ⏱️ 0.0 years remaining

Method and apparatus for supersampling based on the local rate of change in texture

Assignee: Microsoft Technology Licensing LLC
•
Filing: 1996-07-12
•
Granted: 1999-03-02
•
Expires: 2016-07-12
📄 Original PDF 🌐 Google Patents 🔄 Sync Now

Abstract

Abstract A method and an apparatus for high quality texture mapping. Multi-resolutional texture data for a destination pixel is supersampled at horizontal and vertical screen space sampling rates based on the local rate of change at a texture coordinate. Two-dimensional and/or three-dimensional multi-resolutional texture data is sampled. The calculated local rates of change in texture can be scaled, independently, to allow the effect of each texture dimension upon the horizontal and vertical screen space sampling rates to be controlled separately. Three examples for calculating screen space sampling rates according to the present invention are provided based on a maximum texture gradient, an optimized maximum texture gradient, or a minimum sampling routine which ensures sampling when footprint area collapses to a line. Unnecessary calculations and delays encountered in supersampling an entire display image uniformly are avoided. An excellent filter is obtained for live video texture mapping in real-time.

Inventors

  • 👤 Robert A. Drebin
  • 👤 Michael Timothy Jones

Bibliographic Details

Application Number —
Jurisdiction US
Data Source google_patents
Last Synchronized 2026-11-05 20:07
CPC Classifications
G; G06; G06T; G06T11/00; G06T11/10

Claims Analysis

Total Claims: 28
Claim 1
Independent Claim 328 words
A computer-implemented texture sampling method for supersampling multi-resolutional texture data to provide texture for an image to be displayed on a display screen in real-time, said multi-resolution texture data comprising a texture pattern and at least one reduced resolution texture pattern, said multi-resolution texture data being defined in each texture dimension of texture space by texture coordinates, and said image being represented by pixel data defined in screen space dimensions by screen space coordinates (x,y), said texture sampling method comprising the steps of: (a) determining a destination sample position in screen space; (b) determining texture coordinates in texture space corresponding to said destination sample position; (c) calculating local rates of change of said texture coordinates corresponding to said destination sample position; further comprising, prior to step (d), the step of scaling said local rate of change of at least one texture coordinate calculated in step (c), wherein each local rate of change for each texture coordinate is scaled independently; (d) determining first horizontal and vertical screen space sampling rates (sampX, sampY) based on said local rates of change in texture calculated in step (c) and independently scaled in said scaling step; (e) reducing said first horizontal and vertical screen space sampling rates (sampX, sampY) to second horizontal and vertical screen space sampling rates (newSampX, newSampY) corresponding to a reduced resolution texture image when said first horizontal and vertical screen space sampling rates are each greater than or equal to 2; and (f) sampling said texture data at a number of positions distributed according to said second horizontal and vertical screen space sampling rates to approximate a footprint corresponding to said destination sample position wherein said texture space comprises horizontal and vertical texture dimensions corresponding to horizontal and vertical texture coordinates (s,t), said texture pattern being provided as a video image, and wherein said scaling step scales local rates of change along said horizontal and vertical texture coordinates by different amounts to compensate for oversampling in said video image.
Claim 2
Dependent Claim 328 words
A computer-implemented texture sampling method for supersampling multi-resolutional texture data to provide texture for an image to be displayed on a display screen in real-time, said multi-resolution texture data comprising a texture pattern and at least one reduced resolution texture pattern, said multi-resolution texture data being defined in each texture dimension of texture space by texture coordinates, and said image being represented by pixel data defined in screen space dimensions by screen space coordinates (x,y), said texture sampling method comprising the steps of: (a) determining a destination sample position in screen space; (b) determining texture coordinates in texture space corresponding to said destination sample position; (c) calculating local rates of change of said texture coordinates corresponding to said destination sample position; further comprising, prior to step (d), the step of scaling said local rate of change of at least one texture coordinate calculated in step (c), wherein each local rate of change for each texture coordinate is scaled independently; (d) determining first horizontal and vertical screen space sampling rates (sampX, sampY) based on said local rates of change in texture calculated in step (c) and independently scaled in said scaling step; (e) reducing said first horizontal and vertical screen space sampling rates (sampX, sampY) to second horizontal and vertical screen space sampling rates (newSampX, newSampY) corresponding to a reduced resolution texture image when said first horizontal and vertical screen space sampling rates are each greater than or equal to 2; and (f) sampling said texture data at a number of positions distributed according to said second horizontal and vertical screen space sampling rates to approximate a footprint corresponding to said destination sample position wherein said texture space comprises horizontal and vertical texture dimensions corresponding to horizontal and vertical texture coordinates (s,t), said texture pattern being provided as a video image, and wherein said scaling step scales local rates of change along said horizontal and vertical texture coordinates by different amounts to compensate for oversampling in said video image.
Claim 3
Dependent Claim 50 words
The method of claim 1, wherein said scaling step comprises multiplying said local rate of change of at least one texture coordinate by a corresponding, predetermined scaling factor approximately equal to twice the Nyquist frequency limit for said video image divided by an actual sampling rate of said video image.
Claim 4
Dependent Claim 267 words
A computer-implemented texture sampling method for supersampling multi-resolutional texture data to provide texture for an image to be displayed on a display screen in real-time, said multi-resolution texture data comprising a texture pattern and at least one reduced resolution texture pattern, said multi-resolution texture data being defined in each texture dimension of texture space by texture coordinates, and said image being represented by pixel data defined in screen space dimensions by screen space coordinates (x,y), said texture sampling method comprising the steps of: (a) determining a destination sample position in screen space; (b) determining texture coordinates in texture space corresponding to said destination sample position; (c) calculating local rates of change of said texture coordinates corresponding to said destination sample position; (d) determining first horizontal and vertical screen space sampling rates (sampX, sampY) based on said local rates of change in texture calculated in step (c); (e) reducing said first horizontal and vertical screen space sampling rates (sampX, sampY) to second horizontal and vertical screen space sampling rates (newSampX, newSampY) corresponding to a reduced resolution texture image when said first horizontal and vertical screen space sampling rates are each greater than or equal to 2; and (f) sampling said texture data at a number of positions distributed according to said second horizontal and vertical screen space sampling rates to approximate a footprint corresponding to said destination sample position, wherein said step (c) includes the step of: calculating a set of texture gradients (ds/dx, ds/dy, dt/dx, dt/dy) representing local rates of change in said texture coordinates (s,t) along horizontal and vertical screen space coordinates (x,y) through the footprint.
Claim 5
Dependent Claim 267 words
A computer-implemented texture sampling method for supersampling multi-resolutional texture data to provide texture for an image to be displayed on a display screen in real-time, said multi-resolution texture data comprising a texture pattern and at least one reduced resolution texture pattern, said multi-resolution texture data being defined in each texture dimension of texture space by texture coordinates, and said image being represented by pixel data defined in screen space dimensions by screen space coordinates (x,y), said texture sampling method comprising the steps of: (a) determining a destination sample position in screen space; (b) determining texture coordinates in texture space corresponding to said destination sample position; (c) calculating local rates of change of said texture coordinates corresponding to said destination sample position; (d) determining first horizontal and vertical screen space sampling rates (sampX, sampY) based on said local rates of change in texture calculated in step (c); (e) reducing said first horizontal and vertical screen space sampling rates (sampX, sampY) to second horizontal and vertical screen space sampling rates (newSampX, newSampY) corresponding to a reduced resolution texture image when said first horizontal and vertical screen space sampling rates are each greater than or equal to 2; and (f) sampling said texture data at a number of positions distributed according to said second horizontal and vertical screen space sampling rates to approximate a footprint corresponding to said destination sample position, wherein said step (c) includes the step of: calculating a set of texture gradients (ds/dx, ds/dy, dt/dx, dt/dy) representing local rates of change in said texture coordinates (s,t) along horizontal and vertical screen space coordinates (x,y) through the footprint.
Claim 6
Dependent Claim 72 words
The method of claim 3, wherein said step (d) comprises the steps of: determining a first horizontal screen space sampling rate (sampX) based on the maximum change across the pixel in s and t texture coordinates along the x screen space coordinate; and determining a first vertical screen space sampling rate (sampY) based on the maximum change across the pixel in s and t texture coordinates along the y screen space coordinate.
Claim 7
Dependent Claim 122 words
The method of claim 4, wherein sampX is defined as: sampX=power -- of -- 2 -- ceil(LENGTH(LODSX, LODTX), where LODSX equals a ds/dx texture gradient, LODTX equals a dt/dx texture gradient, LENGTH represents a distance function which approximates the square root of the quantity (LODSX) 2 +(LODTX) 2 !, and power-of-2-ceil represents a rounding function which rounds to the next nearest power of two; and sampY is defined as: sampY=power -- of -- 2 -- ceil(LENGTH(LODSY,LODTY), where LODSY equals a ds/dy texture gradient, LODTY equals a dt/dy texture gradient, LENGTH represents a distance function which approximates the square root of the quantity (LODSY) 2 +(LODTY) 2 !, and power-of-2-ceil represents a rounding function which rounds to the next nearest power of two.
Claim 8
Dependent Claim 98 words
The method of claim 5, wherein step (d) further comprises the steps of: calculating a footprint area A F based on a set of texture gradients ds/dx, dt/dy, ds/dy, and dt/dx where A F =ABS (ds/dx*dt/dy-ds/dy*dt/dx), ABS denotes an absolute value function; modifying A F when the pixel footprint area collapses to approximate a line, said modifying step consisting of setting A F to equal the maximum of ABS (ds/dx*dt/dy-ds/dy*dt/dx) and SampX+SampY; and calculating a final vertical screen space sampling rate (sampY) based on the ratio of A F , as determined after said modifying step, and SampX.
Claim 9
Dependent Claim 48 words
The method of claim 6, wherein said final vertical screen space sampling rate, SampY is defined as: sampY=power -- of -- 2 -- ceil (A F /SampX) where power -- of -- 2 -- ceil represents a rounding function which rounds to the next nearest power of two.
Claim 10
Dependent Claim 90 words
The method of claim 3, wherein said step (d) comprises the steps of: calculating a footprint area A F based on a set of texture gradients ds/dx, dt/dy, ds/dy, and dt/dx where A F =ABS (ds/dx*dt/dy-ds/dy*dt/dx), ABS denotes an absolute value function; determining a first horizontal screen space sampling rate (sampX) based on the maximum change across the pixel in s and t texture coordinates along the x screen space coordinate; and determining a first vertical screen space sampling rate (sampY) based on the ratio of A F and SampX.
Claim 11
Dependent Claim 104 words
The method of claim 8, wherein in said step (d): sampX is defined as: sampX=power -- of -- 2 -- ceil(LENGTH(LODSX, LODTX), where LODSX equals ds/dx, LODTX equals dt/dx, LENGTH represents a distance function which approximates the square root of the quantity (LODSX) 2 +(LODTX) 2 !, and power -- of -- 2 -- ceil represents a rounding function which rounds to the next nearest power of two; and sampY is defined as: sampY=power -- of -- 2 -- ceil (A F /SampX) where power -- of -- 2 -- ceil represents a rounding function which rounds to the next nearest power of two.
Claim 12
Dependent Claim 21 words
The method of claim 3, wherein said texture data comprises at least one of two-dimensional texture data and three-dimensional texture data.
Claim 13
Dependent Claim 364 words
A computer graphics rasterizer system for supersampling multi-resolutional texture data to provide texture for an image to be displayed on a display screen in real-time, said multi-resolution texture data comprising a texture pattern and at least one reduced resolution texture pattern, said multi-resolution texture data being defined in each texture dimension of texture space by texture coordinates, and said image being represented by pixel data defined in screen space dimensions by screen space coordinates (x,y), said rasterizer system comprising: destination sample position determining means for determining a destination sample position in screen space; texture coordinate determining means for determining texture coordinates in texture space corresponding to said destination sample position; local texture rate of change calculating means for calculating local rates of change of said texture coordinates corresponding to said destination sample position; screen space sampling rate determining means for determining first horizontal and vertical screen space sampling rates (sampX, sampY) based on said local rates of change in texture calculated by said local texture rate of change calculating means and reducing said first horizontal and vertical screen space sampling rates (sampX, sampY) to second horizontal and vertical screen space sampling rates (newSampX, newSampY) corresponding to a reduced resolution texture image when said first horizontal and vertical screen space sampling rates are each greater than or equal to 2; and sampling means for sampling said texture data at a number of positions distributed according to said second horizontal and vertical screen space sampling rates to approximate a footprint corresponding to said destination sample position; further comprising scaling means for scaling said local rate of change of at least one texture coordinate calculated in said local texture rate of change calculating means, wherein each local rate of change for each texture coordinate is scaled independently to allow independent control over said second horizontal and vertical screen space sampling rates; wherein said texture space comprises horizontal and vertical texture dimensions corresponding to horizontal and vertical texture coordinates (s,t), said texture pattern being provided as a video image, and wherein said scaling means comprises means for scaling said local rates of change along each texture coordinate by different amounts to compensate for oversampling in said video image.
Claim 14
Dependent Claim 364 words
A computer graphics rasterizer system for supersampling multi-resolutional texture data to provide texture for an image to be displayed on a display screen in real-time, said multi-resolution texture data comprising a texture pattern and at least one reduced resolution texture pattern, said multi-resolution texture data being defined in each texture dimension of texture space by texture coordinates, and said image being represented by pixel data defined in screen space dimensions by screen space coordinates (x,y), said rasterizer system comprising: destination sample position determining means for determining a destination sample position in screen space; texture coordinate determining means for determining texture coordinates in texture space corresponding to said destination sample position; local texture rate of change calculating means for calculating local rates of change of said texture coordinates corresponding to said destination sample position; screen space sampling rate determining means for determining first horizontal and vertical screen space sampling rates (sampX, sampY) based on said local rates of change in texture calculated by said local texture rate of change calculating means and reducing said first horizontal and vertical screen space sampling rates (sampX, sampY) to second horizontal and vertical screen space sampling rates (newSampX, newSampY) corresponding to a reduced resolution texture image when said first horizontal and vertical screen space sampling rates are each greater than or equal to 2; and sampling means for sampling said texture data at a number of positions distributed according to said second horizontal and vertical screen space sampling rates to approximate a footprint corresponding to said destination sample position; further comprising scaling means for scaling said local rate of change of at least one texture coordinate calculated in said local texture rate of change calculating means, wherein each local rate of change for each texture coordinate is scaled independently to allow independent control over said second horizontal and vertical screen space sampling rates; wherein said texture space comprises horizontal and vertical texture dimensions corresponding to horizontal and vertical texture coordinates (s,t), said texture pattern being provided as a video image, and wherein said scaling means comprises means for scaling said local rates of change along each texture coordinate by different amounts to compensate for oversampling in said video image.
Claim 15
Dependent Claim 55 words
The rasterizer system of claim 11, wherein said scaling means further comprises multiplying means for multiplying said local rate of change of at least one texture coordinate by a corresponding, predetermined scaling factor approximately equal to twice the Nyquist frequency limit for said video image divided by an actual sampling rate of said video image.
Claim 16
Dependent Claim 300 words
A computer graphics rasterizer system for supersampling multi-resolutional texture data to provide texture for an image to be displayed on a display screen in real-time, said multi-resolution texture data comprising a texture pattern and at least one reduced resolution texture pattern said multi-resolution texture data being defined in each texture dimension of texture space by texture coordinates, and said image being represented by pixel data defined in screen space dimensions by screen space coordinates (x,y), said rasterizer system comprising: destination sample position determining means for determining a destination sample position in screen space; texture coordinate determining means for determining texture coordinates in texture space corresponding to said destination sample position; local texture rate of change calculating means for calculating local rates of change of said texture coordinates corresponding to said destination sample position; screen space sampling rate determining means for determining first horizontal and vertical screen space sampling rates (sampX, sampY) based on said local rates of change in texture calculated by said local texture rate of change calculating means and reducing said first horizontal and vertical screen space sampling rates (sampX, sampY) to second horizontal and vertical screen space sampling rates (newSampX, newSampY) corresponding to a reduced resolution texture image when said first horizontal and vertical screen space sampling rates are each greater than or equal to 2; and sampling means for sampling said texture data at a number of positions distributed according to said second horizontal and vertical screen space sampling rates to approximate a footprint corresponding to said destination sample position, wherein said local texture rate of change calculating means comprises texture gradient set calculating means for calculating a set of texture gradients (ds/dx, ds/dy, dt/dx,dt/dy) representing local rates of change in said texture coordinates (s,t) along horizontal and vertical screen space coordinates (x,y) through the footprint.
Claim 17
Dependent Claim 300 words
A computer graphics rasterizer system for supersampling multi-resolutional texture data to provide texture for an image to be displayed on a display screen in real-time, said multi-resolution texture data comprising a texture pattern and at least one reduced resolution texture pattern said multi-resolution texture data being defined in each texture dimension of texture space by texture coordinates, and said image being represented by pixel data defined in screen space dimensions by screen space coordinates (x,y), said rasterizer system comprising: destination sample position determining means for determining a destination sample position in screen space; texture coordinate determining means for determining texture coordinates in texture space corresponding to said destination sample position; local texture rate of change calculating means for calculating local rates of change of said texture coordinates corresponding to said destination sample position; screen space sampling rate determining means for determining first horizontal and vertical screen space sampling rates (sampX, sampY) based on said local rates of change in texture calculated by said local texture rate of change calculating means and reducing said first horizontal and vertical screen space sampling rates (sampX, sampY) to second horizontal and vertical screen space sampling rates (newSampX, newSampY) corresponding to a reduced resolution texture image when said first horizontal and vertical screen space sampling rates are each greater than or equal to 2; and sampling means for sampling said texture data at a number of positions distributed according to said second horizontal and vertical screen space sampling rates to approximate a footprint corresponding to said destination sample position, wherein said local texture rate of change calculating means comprises texture gradient set calculating means for calculating a set of texture gradients (ds/dx, ds/dy, dt/dx,dt/dy) representing local rates of change in said texture coordinates (s,t) along horizontal and vertical screen space coordinates (x,y) through the footprint.
Claim 18
Dependent Claim 78 words
The rasterizer system of claim 13, wherein said screen space sampling rate determining means comprises: means for determining a first horizontal screen space sampling rate (sampX) based on the maximum change across the pixel in s and t texture coordinates along the x screen space coordinate; and means for determining a first vertical screen space sampling rate (sampY) based on the maximum change across the pixel in s and t texture coordinates along the y screen space coordinate.
Claim 19
Dependent Claim 122 words
The rasterizer system of claim 14, wherein sampX is defined as: sampX=power -- of -- 2 -- ceil(LENGTH(LODSX,LODTX), where LODSX equals a ds/dx texture gradient, LODTX equals a dt/dx texture gradient, LENGTH represents a distance function which approximates the square root of the quantity (LODSX) 2 +(LODTX) 2 !, and power-of-2-ceil represents a rounding function which rounds to the next nearest power of two; and sampY is defined as: sampY=power -- of -- 2 -- ceil(LENGTH(LODSY,LODTY), where LODSY equals a ds/dy texture gradient, LODTY equals a dt/dy texture gradient, LENGTH represents a distance function which approximates the square root of the quantity (LODSY) 2 +(LODTY) 2 !, and power-of-2-ceil represents a rounding function which rounds to the next nearest power of two.
Claim 20
Dependent Claim 106 words
The rasterizer system of claim 14, wherein said screen space sampling rate determining means comprises: means for calculating a footprint area A F based on a set of texture gradients ds/dx, dt/dy, ds/dy, and dt/dx where A F =ABS (ds/dx*dt/dy-ds/dy*dt/dx), ABS denotes an absolute value function; means for modifying A F when the pixel footprint area collapses to approximate a line, said modifying step consisting of setting A F to equal the maximum of ABS (ds/dx*dt/dy-ds/dy*dt/dx) and SampX+SampY; and means for calculating a final vertical screen space sampling rate (sampY) based on the ratio of A F , as determined by said modifying means, and SampX.
Claim 21
Dependent Claim 49 words
The rasterizer system of claim 16, wherein said final vertical screen space sampling rate, SampY, is defined as: sampY=power -- of -- 2 -- ceil (A F /SampX) where power -- of -- 2 -- ceil represents a rounding function which rounds to the next nearest power of two.
Claim 22
Dependent Claim 98 words
The rasterizer system of claim 13, wherein said screen space sampling rate determining means comprises: means for calculating a footprint area A F based on a set of texture gradients ds/dx, dt/dy, ds/dy, and dt/dx where A F =ABS (ds/dx*dt/dy-ds/dy*dt/dx), ABS denotes an absolute value function; means for determining a first horizontal screen space sampling rate (sampX) based on the maximum change across the pixel in s and t texture coordinates along the x screen space coordinate; and means for determining a first vertical screen space sampling rate (sampY) based on the ratio of A F and SampX.
Claim 23
Dependent Claim 101 words
The rasterizer system of claim 18, wherein sampX is defined as: sampX=power -- of -- 2 -- ceil(LENGTH(LODSX, LODTX), where LODSX equals ds/dx, LODTX equals dt/dx, LENGTH represents a distance function which approximates the square root of the quantity (LODSX) 2 +(LODTX) 2 !, and power -- of -- 2 -- ceil represents a rounding function which rounds to the next nearest power of two; and sampY is defined as: sampY=power -- of -- 2 -- ceil (A F /SampX) where power -- of -- 2 -- ceil represents a rounding function which rounds to the next nearest power of two.
Claim 24
Dependent Claim 22 words
The rasterizer system of claim 13, wherein said texture data comprises at least one of two-dimensional texture data and three-dimensional texture data.
Claim 25
Dependent Claim 25 words
The rasterizer system of claim 13, wherein said multi-resolutional data comprises an image pyramid of reduced resolution images progressively filtered by a power of two.
Claim 26
Dependent Claim 207 words
A computer-implemented texture processing method for mapping texture data corresponding to a texture pattern comprising the steps of: (a) determining a destination sample position in screen space for a pixel; (b) determining texture coordinates in texture space corresponding to said destination sample position; (c) calculating local rates of change of said texture coordinates corresponding to said destination sample position; (d) independently scaling said local rates of change for each texture coordinate calculated in step (c); and (e) calculating a level-of-detail for texture data to be mapped from a pixel footprint in texture space to cover a pixel at said destination sample position in screen space pixel, said level-of-detail being calculated based on said independently scaled local rates of change in texture coordinates; whereby, an anisotropic texture level-of-detail compensation is provided which allows independent control of the effect of each texture coordinate on the level-of-detail of texture data chosen to be mapped to a pixel; wherein said texture space comprises horizontal and vertical texture dimensions corresponding to horizontal and vertical texture coordinates (s,t), said texture pattern being provided as a video image, and wherein said scaling step (d) scales local rates of change along each texture coordinate by different amounts to compensate for oversampling in said video image.
Claim 27
Dependent Claim 207 words
A computer-implemented texture processing method for mapping texture data corresponding to a texture pattern comprising the steps of: (a) determining a destination sample position in screen space for a pixel; (b) determining texture coordinates in texture space corresponding to said destination sample position; (c) calculating local rates of change of said texture coordinates corresponding to said destination sample position; (d) independently scaling said local rates of change for each texture coordinate calculated in step (c); and (e) calculating a level-of-detail for texture data to be mapped from a pixel footprint in texture space to cover a pixel at said destination sample position in screen space pixel, said level-of-detail being calculated based on said independently scaled local rates of change in texture coordinates; whereby, an anisotropic texture level-of-detail compensation is provided which allows independent control of the effect of each texture coordinate on the level-of-detail of texture data chosen to be mapped to a pixel; wherein said texture space comprises horizontal and vertical texture dimensions corresponding to horizontal and vertical texture coordinates (s,t), said texture pattern being provided as a video image, and wherein said scaling step (d) scales local rates of change along each texture coordinate by different amounts to compensate for oversampling in said video image.
Claim 28
Dependent Claim 52 words
The method of claim 22, wherein said scaling step (d) further comprises multiplying said local rate of change of at least one texture coordinate by a corresponding, predetermined scaling factor approximately equal to twice the Nyquist frequency limit for said video image divided by an actual sampling rate of said video image.

References Cited (Backward Citations)

US4727365A Cited
US4727365B1 Cited
US5548709A Cited

USPTO Annuity & Maintenance Windows

Annuity Stage Window Opens Payment Deadline Surcharge Period Until Estimated Fee Status
3.5 Years (Year 4) 2002-03-01 2002-08-31 2003-03-02 $2000.00 Window Closed / Lapsed
7.5 Years (Year 8) 2006-03-01 2006-08-31 2007-03-02 $3760.00 Window Closed / Lapsed
11.5 Years (Year 12) 2010-03-01 2010-08-31 2011-03-02 $7700.00 Window Closed / Lapsed

Assigned Categories & Tags

No categories assigned to this patent yet.

Assign Category Tag