0
$\begingroup$

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?

$\endgroup$
5
  • 4
    $\begingroup$ 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? $\endgroup$ Dec 3, 2018 at 1:40
  • $\begingroup$ I've tried reading material on web searches, but can't really seem to get a solid understanding of it. $\endgroup$
    – user9778
    Dec 3, 2018 at 4:21
  • 4
    $\begingroup$ 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. $\endgroup$ Dec 3, 2018 at 4:45
  • 1
    $\begingroup$ @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. $\endgroup$ Dec 3, 2018 at 16:55
  • 1
    $\begingroup$ 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? $\endgroup$
    – Simon F
    Dec 4, 2018 at 9:59

1 Answer 1

1
$\begingroup$

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.

$\endgroup$
1
  • 4
    $\begingroup$ "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. $\endgroup$
    – Simon F
    Dec 4, 2018 at 9:11

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

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