Game Development Community

Mip mapping in normal map textures

by Renzo Sanchez · in General Discussion · 07/04/2007 (8:50 am) · 5 replies

Hello,

I would like to know whats are the disadvantages of not using mip maps aside of distortion. Specifically I would like to know if there is a penalty performance if I don't use any mip maps. I've read many times through the forum that there is a performance penalty if I don't use mip maps, but I think that this assumption is wrong, because anyway the texture and all its mip maps will be in the video card.

This is what I am doing, I have all my textures in dds with all mip maps, but I am using .tga format just for my normal maps when my game has turn the "high quality" option on. So, I don't have distortion when I don't use mip maps in my normal map .tga textures, but instead I have a better quality image. I would like to not use the mip maps for my normal .tga textures, but I have to be 100% sure that I will not have any performance penalty.

Thanks.

#1
07/05/2007 (4:25 am)
The mip maps will be in video card memory (and/or system memory) only if you create or load a texture with mip maps. A complete mipmap chain adds and extra 33% to the memory used by your texture, but it's generally worth it.
There is a performance penalty for texture fetch operations if you don't use mipmaps (how much that is really depends on your particular video card model), because by using mipmaps you access texture memory in a more coherent way, and therefore you make a much better use of your video memory cache.
There is a helpful paper by Cem Cebenoyan with numbers rather than words, but i don't remember the exact title. Testing pipeline performance, or something like that. Anyway, it's not a negligible penalty.
In my experience Nvidia cards would suffer this performance hit a bit more than ATI's, but obviously i haven't tried every single card :)
#2
07/05/2007 (6:29 am)
How do you make a mip map
#3
07/05/2007 (7:02 am)
Hey,

Thank you, I got it know and I am using mip maps even in my normal maps textures. I've just found that I have a distorcion when I don't use mip maps when I am too far from my object.

Quote:How do you make a mip map
The mip maps are smaller texture version of your original texture. For example if you have a 128x128 texture, your mip maps are 64x64, 32x32, 8x8.
If you use a dds format (actually you have to use .dds textures because this format is compressed in your video card, so it is faster than any other format) all the mip maps are included by default.
You could find tools and plugins for photoshop and dds in the NVidia web.

developer.nvidia.com/object/nv_texture_tools.html
#4
07/05/2007 (7:35 am)
Thank you. This a great help
#5
07/05/2007 (8:39 am)
@ Renzo

This is why when you have Normal Map it is generally best to regenerate the Normal Map for each Mip Map level you have and not allow the game engine or an application like Photoshop to manually generate it for you (since both will cause the pixel data to blend together via the sampling that it does, distoring the normal map results).

@ Morrie

In Torque, mip map generation is generally handled on the fly. But you can specify Mip Map levels with a DDS texture.