Steve Baker (sbaker++at++link.com)
Mon, 12 Oct 1998 12:13:21 -0500 (CDT)
> Steve Baker wrote:
> >
> > The amount of overlap you need increases as you descend the MIPmap
> > levels. There is no "right" amount.
> Is this a linear increment at level 0?.
Well, look at it this way - the texture interpolation process blends
between adjacent texels at whatever level map you are drawing. If it's
at the edge of the map, it'll either blend the edge texel with itself
(if we have GL_CLAMP'ed the texture coordinates) - or with the texel
on the opposite side of the map. Neither is ideal since you want to
blend with a texel from a completely different map - and there is no
way to do that.
So, if you had 256 meter polygons with 256x256 texel maps - then you'd
have to overlap the texture by 1 meter to prevent the blending at the
edge of the polygon from pulling in inappropriate data from "off the edge
of the map".
However, when the polygon goes a bit more edge-on (or further away), the
map drops to a 128x128 - and now you need a 2 meter overlap (er - roughly).
At 64x64, you need a 4m overlap...and so on. In the limit, the 2x2 map
has to be overlaid by 128 meters - and now your texture map is all
overlap and no data.
Ultimately, there is no way to fix that.
Of course in practice, the texels in a 2x2 map are typically all some
kind of brownish mush - so who cares? But in *theory* you should still
care if you want perfection.
So, it's a judgement call. At how much overlap and at what polygon
orientations and size do you judge the mismatch artifacts to be
unimportant? It depends on the application, and the nature of the
data in your texture map. A black and white chequerboard with a 4x4
grid on a 1024x1024 map will be pretty sensitive to error right down
to the lowest mipmaps. A soft cloud texture will hardly show a problem
even without overlap (so long as you remember to GL_CLAMP the texture
coordinates).
However, my point is that there is no use saying "I used 'N' texels of
overlap - and that's OK" - because there is no solid basis for that
advice.
Steve Baker (817)619-2657 (Vox/Vox-Mail)
Raytheon Systems Inc. (817)619-2466 (Fax)
Work: SBaker++at++link.com http://www.hti.com
Home: SJBaker1++at++airmail.net http://web2.airmail.net/sjbaker1
This archive was generated by hypermail 2.0b2 on Mon Oct 12 1998 - 10:14:17 PDT