Page 1 of 1

Gen MipMaps

Posted: Sat Apr 24, 2010 7:56 am
by creavion
There is something I always wanted to know...

when should I use MipMaps if I import textures.

AFAIK I should deactivate MipMaps for import of new Detail textures - for obvious reasons.

on unrealwiki I also did read something about "use Mipmaps for larger textures".

Could anyboy explain me now when I should use it or not, since thats something it has to be decided during the import of the textures (a change would requiere a re-import of the textures)

Re: Gen MipMaps

Posted: Sat Apr 24, 2010 11:37 am
by .:..:
I say if the texture is larger than 256 X 256, then you SHOULD use mipmaps. For smaller ones it not really necessary but helpful for slower systems.

Basically mipmaps are different level of details of the texture (so that game can render low skin detail when set).

Re: Gen MipMaps

Posted: Sun Apr 25, 2010 8:40 pm
by Turboman.
no mipmaps on textures larger then 256x256 crashes the game instantly if i remember (on older versions).

im not sure but, doesnt unticking mipmaps allow mipmapping to be handled by the video card in real time? thus reducing performance drastically?

Re: Gen MipMaps

Posted: Mon Apr 26, 2010 12:01 pm
by Shivaxi
I think you should always have mipmaps on when importing a texture...cause it makes D3D crash if you use it and try to render the texture in game...though nobody really uses D3D anymore :P

Re: Gen MipMaps

Posted: Mon Apr 26, 2010 2:59 pm
by creavion
Tested around so far, nothing bad happened (at least up to 1024² for e.g a skybox cube), also Smirftsch told me, it would not matter.

BTW: Normal D3D would not work anyway afaik, because of DXT textures I am using...

Re: Gen MipMaps

Posted: Mon Apr 26, 2010 4:17 pm
by Smirftsch
actually I can't really tell how much performance difference there is between existing mipmaps or letting the graphics card handle it.
In one case it only needs to be used, while it needs to be processed through the engine, in the other case the graphics card needs to do some additional work but if a recent card is even showing a performance drain can be doubted.
For other cases like SoftDrv where the Engine handles decompressing and mipmapping itself it will be some performance drain for sure, but I'm not sure if its enough to notice it.
So I'd personally would keep it without mips I think.

But maybe someone is willing to do some performance tests with and without?


Re: Gen MipMaps

Posted: Fri May 14, 2010 10:30 am
by SMP Dev
Textures that may be drawn with any significant amount of minification should have mipmaps.  If not, there can be quality and/or performance problems.

If have say a 256x256 texture that covers 32x32 pixels, sampling and blending 64 plus some more edge texels per pixel would be rather costly.  On typical graphics hardware you'd end up with a combination of poor quality and poor performance in a case like this.  Less samples and undersampling for the poor quality part, versus a few samples from the prefiltered mipmap, and for static content can use more expensive high quality filtering to pregenerate nice mipmaps.  Even if not pulling a huge number of samples, still most likely lose performance due to sub-optimal memory access patterns with regards to locality.

For things like low resolution lightmaps, no mipmaps may be better for a few reasons.  Less texture memory required if no mipmaps, but if already something low resolution then this may not matter so much overall.  Low resolution lightmap less likely to be minified, so less chance would get to the point might start using a mipmap if present.  For dynamically generated lightmaps, also have runtime mipmap generation costs to consider, along with texture upload costs in case of dedicated graphics memory.  In the case of many lightmaps, the content may be such that it would be a lot less prone to significant quality problems when undersampled compared to other types of textures.