When downsampling textures for a mipmap, people typically use standard image processing techniques that are inappropriate for a 3D model. We show how to correctly account for the parameterization of a surface when downsampling and also how to correctly optimize mipmaps for trilinear filtering used by a GPU.
Ammended: Fixed editing mistake in text.
download preprint
@article{Manson:2012:PAM, author = {Josiah Manson and Scott Schaefer}, title = {Parameterization-Aware MIP-Mapping}, journal = {Computer Graphics Forum (Proceedings of Eurographics Symposium on Rendering)}, year = {2012}, volume = {31}, number = {4}, pages = {1455--1463}, }
We present a method of generating mipmaps that takes into account the distortions due to the parameterization of a surface. Existing algorithms for generating mipmaps assume that the texture is isometrically mapped to the surface and ignore the actual surface parameterization. Our method correctly downsamples warped textures by assigning texels weights proportional to their area on a surface. We also provide a least-squares approach to filtering over these warped domains that takes into account the postfilter used by the GPU. Our method improves texture filtering for most models but only modifies mipmap generation, requires no modification of art assets or rasterization algorithms, and does not affect run-time performance.
I provide two executables for calculating mipmaps: one optimizes for texture boundaries that wrap (GL_REPEAT), and one optimizes for boundaries that clamp (GL_CLAMP_TO_EDGE). Simply specify the model, the texture, and which filter to use and the mipmap images will be written. Run the program with no arguments or read README.txt for more information. If you run out of memory, try reducing the number of threads.
pam_src.zipSource code for my parameterization-aware mipmapping implementation.
SPM2013-PAM.pptxThe slides for Solid and Physical Modelling 2013.
EGSR2012-PAM.pptxThe slides that I used for my presentation at the Eurographics Symposium on Rendering 2012.
times.xlsxErrata containing the timing information from tests on several computers. These timings were performed after publication to test the performance of the improved programs that I have available on my website.
PAM_poster.pptxA poster presenting Parameterization-Aware MIP-Mapping
The images, executables, and code supplied are from the web page http://josiahmanson.com. These materials are free to use for non-commercial purposes. Any works that use materials from this web page should acknowledge Josiah Manson and the paper Parameterization-Aware MIP-Mapping. For commercial use, please contact Josiah Manson (josiahmanson@gmail.com).