I know OpenGL likes the texel resolution of textures be some power of 2 in each direction because of mipmapping. (They say that this is not a totally stringent condition, but it is preferred)

Can someone explain what is mipmapping and what is it for?

  • 3
    Honestly, this is a topic where you can find plenty of reading material with a few web searches, for instance this or this. Do you have a more focused question about mipmaps? – Nathan Reed Dec 3 at 1:40
  • I've tried reading material on web searches, but can't really seem to get a solid understanding of it. – user9778 Dec 3 at 4:21
  • 3
    Can you be more specific about what you do and don't understand already? Right now, if I were writing an answer there wouldn't be much I could do besides reiterate what those articles say. – Nathan Reed Dec 3 at 4:45
  • 1
    @user9778: "can't really seem to get a solid understanding of it." Then ask about what you don't understand. Not the general subject as a whole, but the specific part that you're having trouble with. – Nicol Bolas Dec 3 at 16:55
  • 1
    Perhaps you need to come at this from a different direction. Do you know, for example, what "aliasing" is? i.e. insufficiently sampling a signal making it seem like it's something else? E.g. in the spatial domain, a diagonal edge of a triangle appearing like a staircase or, in the temporal domain, the "wagon wheels" in a film seemingly turning backwards? – Simon F Dec 4 at 9:59
up vote 2 down vote accepted

Mipmapping is a pre-computed texture scheme that tries to solve the problem of texturemap aliasing. When a screen pixel from a textured polygon covers many texture pixels, the pixel should be sampled more than only once (nearest neighbor or bilinearly) to get a "correct" average color. So instead of having a regular texture a mipmap is created. The mipmap level is chosen from the objects distance to the camera, and can be per pixel, per object, bi- or trilinearly interpolated, etc. Mipmapping in its nature does not take perspective projection into account.

The 1-channel mipmap texture usually is divided into four parts, holding Red, Green, Blue in the first three, while the last is divided into four parts, holding the downsampled 2x2 average of R, G and B, and so on recursively until a pres-elected depth. I'm sure google has pictures of this.

  • 4
    "The 1-channel mipmap texture usually is divided into four parts, holding Red, Green, Blue in the first three" It should be noted that a MIP mapped texture in hardware will not actually be done like this (at least not on any of the Hardware I've helped develop) . This scheme (as described in Williams' "Pyramidal Parametrics" paper, would be poor from a caching/page-break perspective. It should also be noted that others published the idea of pre-filtered texture maps (e.g. Dungan) prior to Williams but the latter introduced Trilinear filtering. – Simon F Dec 4 at 9:11

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Not the answer you're looking for? Browse other questions tagged or ask your own question.