change mipmap distance

If you are a new Irrlicht Engine user, and have a newbie-question, this is the forum for you. You may also post general programming questions here.
Post Reply
Blade
Posts: 9
Joined: Wed Sep 05, 2007 4:07 pm

change mipmap distance

Post 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!
JP
Posts: 4526
Joined: Tue Sep 13, 2005 2:56 pm
Location: UK
Contact:

Post 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.
Image Image Image
hybrid
Admin
Posts: 14143
Joined: Wed Apr 19, 2006 9:20 pm
Location: Oldenburg(Oldb), Germany
Contact:

Post by hybrid »

You can also influence the mipmaps chosen by changing the lodbias. This is planned for Irrlicht, but not yet supported.
Blade
Posts: 9
Joined: Wed Sep 05, 2007 4:07 pm

Post 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.
Post Reply