Difference between revisions of "Mip mapping"

From polycount
Jump to: navigation, search
(WikiName)
(CategoryTextureTechnique, clarifications)
Line 1: Line 1:
 
__NOTOC__
 
__NOTOC__
 
<!-- ## page was renamed from Mip Map -->
 
<!-- ## page was renamed from Mip Map -->
* [[Polycount|Main Page]] > [[Category:Texturing]] > Mip Map
 
 
 
= Mip Map =
 
= Mip Map =
  
 
== What is a Mip Map? ==
 
== What is a Mip Map? ==
 +
A texture is resized multiple times to make "mips," smaller versions of the texture. These smaller versions are swapped or blended with the original texture in order to smooth out the rendering of the surface.
  
Mip maps help reduce aliasing in-game when a textured surface is rendered.
+
Without mips, as unfiltered texture pixels get smaller than screen pixels they will shimmer like crazy, because the pixels are quickly switching from one color to another. This is called "nearest neighbor" filtering. Instead mips are usually used with bilinear, trilinear, or anisotropic filtering.
  
The texture is resized multiple times to make "mips," smaller versions of the texture. These smaller versions are swapped or blended with the original texture in order to keep as close a ratio as possible between screen pixels and texture pixels. When unfiltered texture pixels get smaller than screen pixels, the pixels shimmer like crazy as they change from color to color. Mipping helps solve this problem.
+
The term ''mip'' is based on the Latin phrase ''multum in parvo'', meaning "much in a small space". See the [http://en.wikipedia.org/wiki/Mipmap Wikipedia Mipmap page].
  
 
{| border="1" cellpadding="2" cellspacing="0"
 
{| border="1" cellpadding="2" cellspacing="0"
Line 15: Line 14:
 
|}
 
|}
  
Most game engines will create the mips automatically, if mips don't already exist in the texture file when it's loaded. If you create the mips yourself, you can do some interesting texture tricks, by taking advantage of the fact that the textures are swapped by distance... fogging, sharpening, fading out, etc. If you're using the DDS format the [http://developer.nvidia.com/object/photoshop_dds_plugins.html NVIDIA DDS plugin for Photoshop] is an easy way to edit mips.
+
Most game engines will create the mips automatically, if mips don't already exist in the texture file when it's loaded. If you create the mips yourself, you can do some interesting texture tricks, by taking advantage of the fact that the textures are swapped by distance... fogging, sharpening, fading out, etc.  
  
 
[http://developer.nvidia.com/object/General_FAQ.html#t1 NVIDIA] says: ''"Whether you're using mipmapping or not, you should never use "nearest" filtering, which causes texture swimming artifacts when textures are minified. Using mipmaps allows you to create accurately minified versions of your textures, so that they look as good as possible in the distance. Mipmapped textures only require 33% more memory than their non-mipmapped counterparts, so it is wise to trade off the small amount of extra memory for the vastly improved image quality. In addition, today's GPUs are optimized to handle mipmaps very efficiently, so the performance impact of using mipmaps is minimal."''
 
[http://developer.nvidia.com/object/General_FAQ.html#t1 NVIDIA] says: ''"Whether you're using mipmapping or not, you should never use "nearest" filtering, which causes texture swimming artifacts when textures are minified. Using mipmaps allows you to create accurately minified versions of your textures, so that they look as good as possible in the distance. Mipmapped textures only require 33% more memory than their non-mipmapped counterparts, so it is wise to trade off the small amount of extra memory for the vastly improved image quality. In addition, today's GPUs are optimized to handle mipmaps very efficiently, so the performance impact of using mipmaps is minimal."''
 
+
* NVIDIA whitepaper [[ftp://download.nvidia.com/developer/presentations/2005/Misc/Lets_Get_Small-2005.pdf|Let's Get Small: Understanding MIP Mapping]] by Kevin Bjorke (4MB PDF)<<BR>>Helpful tips on using mips.
NVIDIA whitepaper [[ftp://download.nvidia.com/developer/presentations/2005/Misc/Lets_Get_Small-2005.pdf|Let's Get Small: Understanding MIP Mapping]] by Kevin Bjorke (4MB PDF).
+
  
 
== NVIDIA DDS plugin for Photoshop ==
 
== NVIDIA DDS plugin for Photoshop ==
The [http://developer.nvidia.com/object/photoshop_dds_plugins.html NVIDIA DDS plugin for Photoshop] has a great interface for testing MIP settings.
+
If you're using the [[Category:TextureFormatRuntime|DDS format]] the [http://developer.nvidia.com/object/photoshop_dds_plugins.html NVIDIA DDS plugin for Photoshop] the [http://developer.nvidia.com/object/photoshop_dds_plugins.html NVIDIA DDS plugin for Photoshop] has a great interface for testing mips settings and creating custom mips.
  
 
=== Sharpening Settings window ===
 
=== Sharpening Settings window ===
Line 34: Line 32:
 
The number of boxes you need to adjust depends on how large your original image is. For example a 256x256 map only has nine mip levels: 256,128,64,32,16,8,4,2, and 1 (1x1). So you would only have to adjust the boxes from Image to 8.
 
The number of boxes you need to adjust depends on how large your original image is. For example a 256x256 map only has nine mip levels: 256,128,64,32,16,8,4,2, and 1 (1x1). So you would only have to adjust the boxes from Image to 8.
  
Takes a lot of testing to see what works best. Something that helps is the 3D Preview button, just make sure to adjust the Preview Settings first so it doesn't have to make a ton of different compressions each time you change a setting.
+
It takes some testing to see what works best. Something that helps is the 3D Preview button, just make sure to adjust the Preview Settings first so it doesn't have to make a ton of different compressions each time you change a setting.
  
<<BR>>
 
* [[Polycount|Main Page]] > [[Category:Texturing]] > Mip Map
 
 
----
 
----
[[Category:Texturing]]
+
[[Category:Texturing]] [[Category:TextureTechnique]]

Revision as of 07:03, 8 July 2010

Mip Map

What is a Mip Map?

A texture is resized multiple times to make "mips," smaller versions of the texture. These smaller versions are swapped or blended with the original texture in order to smooth out the rendering of the surface.

Without mips, as unfiltered texture pixels get smaller than screen pixels they will shimmer like crazy, because the pixels are quickly switching from one color to another. This is called "nearest neighbor" filtering. Instead mips are usually used with bilinear, trilinear, or anisotropic filtering.

The term mip is based on the Latin phrase multum in parvo, meaning "much in a small space". See the Wikipedia Mipmap page.

Most game engines will create the mips automatically, if mips don't already exist in the texture file when it's loaded. If you create the mips yourself, you can do some interesting texture tricks, by taking advantage of the fact that the textures are swapped by distance... fogging, sharpening, fading out, etc.

NVIDIA says: "Whether you're using mipmapping or not, you should never use "nearest" filtering, which causes texture swimming artifacts when textures are minified. Using mipmaps allows you to create accurately minified versions of your textures, so that they look as good as possible in the distance. Mipmapped textures only require 33% more memory than their non-mipmapped counterparts, so it is wise to trade off the small amount of extra memory for the vastly improved image quality. In addition, today's GPUs are optimized to handle mipmaps very efficiently, so the performance impact of using mipmaps is minimal."

NVIDIA DDS plugin for Photoshop

If you're using the the NVIDIA DDS plugin for Photoshop the NVIDIA DDS plugin for Photoshop has a great interface for testing mips settings and creating custom mips.

Sharpening Settings window

Each of the numbered boxes at the bottom corresponds to one of the mip levels... "Image" is the top mip level, and they descend from there.

The number of boxes you need to adjust depends on how large your original image is. For example a 256x256 map only has nine mip levels: 256,128,64,32,16,8,4,2, and 1 (1x1). So you would only have to adjust the boxes from Image to 8.

It takes some testing to see what works best. Something that helps is the 3D Preview button, just make sure to adjust the Preview Settings first so it doesn't have to make a ton of different compressions each time you change a setting.


Personal tools
Namespaces

Variants
Actions
Navigation
Tools