Re: [Fwd: Seamless texture tiling?]

New Message Reply Date view Thread view Subject view Author view

Angus Dorbie (dorbie++at++sgi.com)
Wed, 21 Oct 1998 13:01:26 -0700


Phil Keslin wrote:
>
> > Just to expand on this a little more there are actually two
> > closely related problems, and only the less significant of
> > these has been discussed so far:
> >
> > Problem 1
> > _________
> > The first problem which produces the most glaring errors
> > is when the levels of MIP are generated, and this may be
> > the problem you are encountering under minification. The problem
> > is not so much overlap as where the samples used by the filter
> > to generate the MIP level are derived from, and the overlap of
> > the filters used to produce the samples ad adjacent tile borders.
> >
> > When generating MIP maps for a sample in a small MIP image (high
> > level of MIP in OpenGL parlance), the 'footprint' of the filter
> > in the original image is quite large and covers many image
> > samples in the base image (level 0 MIP map in OpenGL).
> >
> > If you filter adjacent image tiles independently then the
> > samples used for the border of the tile would and should extend
> > beyond the border of the tile and require data from the adjacent
> > image tiles. However, by processing tiles independently you
> > have no data there and typically average within the available
> > data for the filter.
> >
> > This is the underlying problem. As you can see, the greater the
> > minification the larger the filter footprint and the more missing
> > information you have at the border because it only exists in an
> > adjecent tile. This can lead to obvious image discontinuities
> > at tile edges which increase in significance and scale as the
> > texture image minifies. A high contrast feature near the edge
> > in one tile will at some scale will affect the color of the
> > edge texels in one tile but not in another causing a sharp
> > discontinuity.
> >
> > Because the scale of the problem varies with the level of MIP
> > due to the varying filter size, the problem cannot generally
> > be solved for all situations using a fixed overlap. Infact an
> > overlap is the wrong approach.
>
> So are you saying that overlap between tiles during mipmap generation is
> not the right thing to do? While it is true that the filter footprint
> does grow as to move to lower resolutions if you resample from the base
> image. If, however, you resample from the next higher resolution in the
> pyramid, then the filter support can remain fixed.

Only for the solution to problem 1, there was also a problem 2 I
listed which is what overlap solves. Problem 2 is less
tractable and may be less noticeable if you fix problem 1 but the
suggestions about overlap are a reasonable approach given the
limitations of clamping behaviour. I had nothing to add w.r.t.
to solving problem 2.

It's important to separate sampling from reconstruction which is
effectively the difference between Problem 1 and Problem 2.

On the subject of Problem 1 recursive filtering with MIP maps will
likely work against efforts to improve problem 1.
You have a bad filtering situation with phase aligned filtering
at .5 times the resolution. Almost all filtering will result
in be a 2x2 box filter (or only marginally better) if you filter from
just 1 level higher and a 2x2 box filter will suffer from Problem 1
even if you generate your MIP levels using the whole data set.

Naturally you'd want to use better shaped filters and filter from 2
or 3 levels higher in the MIP pyramid. This would also improve the
frequency response of texturing in the scene.

>
> Processing the image into tiles can easily be affected via borders with
> information drawn from neighbors. Edge tiles can choose whatever border
> filling strategy they want, but reflection provides the best quality.
> There is nothing inherently difficult about border filling tiles prior
> to resampling. In fact, we've been doing it for years and what we are
> doing for clipgen.

Ofourse, but if I understand you that's an implementation detail of
what I've suggested in my first email, filter while considering your
whole data set. Unless youre mixing problem 1 & 2 again.

>
> I'll avoid the second problem, since a possible (and very good) solution
> has already been noted (i.e., clipmapping). Systems without this
> feature, will have to deal with some artifacts without a lot of work.

CLIP mapping solves the problem with a continuous reconstruction filter,
but not all platforms support this. There are conventional clamping
approaches which avoid discontinuous reconstruction filtering resolving
the
issue. As Steve pointed out the problem varies in scale with level of
MIP
so an variable overlap is a solution for this. To really fix the problem
requires a different treatment of the sampling of MIP map levels and
again a recursive filtering approach would be a really bad thing, your
frequency of sampling for MIP levels in this case would be slightly les
than 0.5 and vary as you moved up the MIP pyramid in a really
successfull
solution.

Cheers,Angus.

-- 
"Only the mediocre are always at their best." -- Jean Giraudoux 

For advanced 3D graphics Performer + OpenGL based examples and tutors: http://www.dorbie.com/


New Message Reply Date view Thread view Subject view Author view

This archive was generated by hypermail 2.0b2 on Wed Oct 21 1998 - 13:01:31 PDT

This message has been cleansed for anti-spam protection. Replace '++at++' in any mail addresses with the '@' symbol.