Compressed lightmap versus standard lightmap (IQ)

The idea is that you just take the function value at the sampling position.

This value should always lie between x - 0.5 and x + 0.5, in the situation you gave (with proper MIP map selection, of course). That is assuming "x" is the coordinate for the closest texel.
 
Btw, while looking around for the exact math for bicubic, I managed to find this page that has some nice images that do a real good job of showing what kinds of problems can be solved by bicubic:

http://www.vrvis.at/vis/research/hq-hw-reco/results.html

And for those interested in the actual math, here's how bicubic can be accomplished:

http://astronomy.swin.edu.au/~pbourke/colour/bicubic/

As a side note, in looking around, I found out that there is an extension in OpenGL that currently supports bicubic filtering: SGIS_texture_filter4. Bicubic filtering is only applied to textures that are magnified with this extension (which should make sense).
 
Bilinear filtering makes the output continuous (even at the "integer borders"), and biqubic can make the gradient continuous (again at "integer borders").

With biquadratic as you said it, the function won't be continuous.


Regarding Quake2, you're right. I was looking at the fireball, and didn't see any filtering errors in it. The lightning on the evironment would be enhanced with cubic filtering.
 
Yeah, I was just thinking about that, Basic, and it has everything to do with how you generate the function. With bicubic, it is possible to make both the function and the first derivative continuous, but with biquadratic it would still only be possible to make the function continuous, though the first derivative would be "closer to continuous" than the bilinear case.

Anyway, what it would require is not finding a quadratic function that goes through the three sample points, but does something different. I'm sure it would be quite challenging trying to find a good system (more challenging than bicubic, actually...), but the best might be to actually just take the algorithm used in bicubic and sort of reduce it to a biquadratic form.

Update:
Speaking of which, I did some thinking, and though no site I've seen yet describes why bicubic uses the function it does, I now find it likely that the method for generating the function is not based upon finding a function that goes through the texel sample points.

Instead, the algorithm is probably based upon making certain that the two borders of where the pixel "switches over" to another set of samples (i.e. instead of using 1-2-3-4, it uses 2-3-4-5), both the function and its first derivative remain continuous.
 
Chalnoth said:
Speaking of which, I did some thinking, and though no site I've seen yet describes why bicubic uses the function it does, I now find it likely that the method for generating the function is not based upon finding a function that goes through the texel sample points.

It does pass through the texel sample points.
 
Luminescent said:
Would a compressed lightmap (such as in ut2003) yield as much visual IQ as a regular lightmap? Just wondering if the extra compression performance would reduce IQ.
The image quality is slightly better with uncompressed lightmaps. Not really visible during normal gameplay but when you switch to "RMODE 7" it becomes obvious. "RMODE 5" is normal rendering.

FWIW, we store both the compressed and uncompressed lightmaps on disk. The uncompressed lightmaps are stored in an internal format (visibility bitmaps) that takes far less memory than the compressed version and are generated on the fly at load time.

-- Daniel, Epic Games Inc.
 
Basic said:
Chalnoth:
What rules would you use to define "biquadratic filtering"?
Basic,
you can use an approximating curve (like a (uniform) BSpline) rather than an interpolating one (Catmull-Rom) to do the 'smoothing'

The downside of using an approximating curve is that the image will be a bit "softer" since you often won't go through the extremes. This may sound bad but you have to remember that an interpolating curve (eg. Cat'rom) doesn't stay inside the convex hull of the points and so you could get clipping of colour values which could look rather nasty.

Bilinear filtering makes the output continuous (even at the "integer borders"), and biqubic can make the gradient continuous (again at "integer borders").With biquadratic as you said it, the function won't be continuous.
It's not difficult to get a C1 curve with quadratics (i.e. having a continuous first derivative). At my last job we used quadratics as the basis for all of our spline work.
 
Back
Top