MipMaps, LOD's some confusion

Could someone clarify the following?

My assumption is that for mipmaps to be generated one of 2 following conditions must be met

  1. Either your texture must be a power of 2 size or ‘Power of Two’ must be checked in the Texture Map settings.
  2. With mipmaps enabled some geometry very close to camera has low res or blurry textures. Why is this happening? Shouldn’t the proper mipmap texture automatically be used?
  3. What is the connection between LOD’s which I assume are mesh specific, and mipmaps?

Thanks for any feedback!

How I understand it is an LOD contains a mipmap of the visuals (meshes, materials, particles, etc) at every level defined in the LODs for those visuals. A mipmap is basically a preset resolution and render quality of the final image, or image before the final. It reduces draw calls and other memory usage / processor using render ‘types’. It’s in the doc pages that the power-of-2 rule is required for LODs / mipmaps, but I don’t know what happens if a texture is not a power of 2 size. And the question I have, among others:

Is the size (in reference to power of 2) of a texture the pixel resolution? or another sizing attribute?

So, as far as I understand it in simple terms:

LOD 0 is the lowest level, having the highest resolution (by default)
LODs 1-n (n being number of LOD levels set and defined via settings) are sequentially lower resolution
Each LOD level maintains a mipmap specifically generated per LOD (possibly more than 1 per LOD too)

The two are completely separated concepts.

LOD (Level-Of-Detail) is related to a mesh ora a material. Depending how far an object is, or how small the object is in percentage of the screen, the proper LOD level of a mesh (or/and the material) is selected. You could not have LOD for meshes and materials, it’s up to you.

Mipmaps are only for textures. Is a way to reduce the minification-magnification issue that happens when the pixels of the render don’t really match in size with the texels (the pixels of the texture). I’ve explained this in a very few words, check for example here to know more. This is not really related to how close you are to the camera, but it depends of the texel ratio to screen. Mipmaps are computed by the graphic API, and if the texture is a power of two, the mipmap chain is more efficiently generated.

As Ale stated, the 2 are unrelated.
lod1 doesn’t necessarily use mip -1

And yes the numbers work differently depending on the material setup.

You can set your material to use a custom mip level or subtract from the mip in order to get lower or higher resolution results.
you should do that on a large mesh to test it out.

this process is most commonly used with transparency when temporalAA is in place.

Why?
Because the low mips will cause the whole material to become fuzzy due to how the texture interpolation.
The texture used as the alpha mask looses quality along with all other textures causing this; it is very common issue with hair cards rendering, grass/leaves, and any “sheet” like material.
In those cases, bumping the mip offset up allows for the maximum (or still higher than default) resolution of the alpha mask to be used for rendering out the mesh with a correct view.

Additionally. If you want to experiment you can set your landscape to use 8k textures, paint it up, and then reduce the texture mip level to see just how much performance is affected (hint. Its drastic on lower end cards).

@op
with mips enabled close geometry has low res?
This one is new to me… the more space on screen an object occupies the closer to the full size texture is used.
Could you share a screenshot of the issue?

2 Likes