Page 1 of 1

change mipmap distance

Posted: Sat Feb 23, 2008 3:15 pm
by Blade
Hi everyone,

I have a street build out of segments and apply always the same texture on it. Unfortunately the texture gets blurry pretty close to the camera and i think that's because the distance between the mipmap levels is to short. However, i tried anisotropic filtering and the street improved a lot but is still not satisfying. Is there any way to set the distance between the texture mipmap levels in irrlicht?

btw: i want to use the mipmaps and not switch the mipmap creation off!

Posted: Sat Feb 23, 2008 3:56 pm
by JP
I may be wrong but i doubt you can change the distance for mipmaps.

The mipmaps are chosen based on the polygon size so that the best quality texture is chosen for that polygon size.

So if you have a quad that's 256x256 on the screen and your texture is 256x256 then it just chooses the top mipmap level, the 256x256 one.

If the quad is 128x128 on the screen then it would use the next mipmap level so the texture applied is 128x128.

Note that mipmapping only happens when the texture applied needs to be scaled down, so when things are in the distance or at extreme angles to the camera. If you go up close to an object it has to upscale the texture which has nothing to do with mipmapping. So if that's your problem maybe try making the texture larger and higher quality.

Posted: Sat Feb 23, 2008 4:31 pm
by hybrid
You can also influence the mipmaps chosen by changing the lodbias. This is planned for Irrlicht, but not yet supported.

Posted: Sun Feb 24, 2008 3:48 am
by Blade
Thanks for your advices. I think influencing the loadbias would be a good topic for the future, as that would probably improve my streets. But higher resolution for the texture + anisotropic filtering already do a good job now.

The main problem are the lane markings as the streets look pretty good without markings. Thus i think it may be mainly an anisotropical problem.