turning off far away texture blurring?

Blitz3D Forums/Blitz3D Beginners Area/turning off far away texture blurring?

Cubed Inc.(Posted 2010) [#1]
Sorry for all of my stupd questions guys, but I have one that may be a little intresting.
See, not too long ago, I noticed that in blitz3d, when the camera is far away from an entity, the entity's texture seems to kind of "blur". Now I know that blitz3d does this to make it so that way the texture doesn't have a "static" like effect when you move from a far away distance, but I also noticed with this effect, textures seem to lose there quality from a far away distance. Now other programs, such as milkshape doesn't have this distante texture blur, and if you add a large seamless texture to the model, the texture will retain it's seamless quality, no matter how far away the camera is from it. But when I exported the model into blitz3d, the seamless texture on the model looked all blurry and ugly.

Is there a code to turn off and turn on this distant texture blur effect in blitz3d. I have seen pics i the blitz gallery that seem to not have the blur, so just want to know if it's possible. Sorry for the long explaination.thanks.


Warner(Posted 2010) [#2]
I think you would need to set texturefiltering off.
The links in this thread are down, but it may help as a starting point for your search:
http://www.blitzbasic.com/Community/posts.php?topic=40848


Zethrax(Posted 2010) [#3]
The effect you're talking about is called Mip Mapping. You can read more about it at: http://en.wikipedia.org/wiki/MIP_mapping

It's generally not a good idea to turn this off, as it results in a fairly unpleasant visual effect.

You can see this effect in action by playing the game 'Let the Squashing Begin': http://www.fileplanet.com/87221/80000/fileinfo/Let-the-Squashing-Begin


Cubed Inc.(Posted 2010) [#4]
I downloaded the game(awesome fangame BTW) and it almost showed what I am trying to go for. The game is mip mapped, which is exactly what I was looking for, but it has no texture interpolation, so all the textures are pixalized(which is considerably ugly). In milkshape, the program is mip mapped, and interpolated. I'm bad at explianing things, so if you don't understand my horrible explianations, download the free demo to see what I mean. It was a good example though, just not exactly what I was looking for.


Ross C(Posted 2010) [#5]
you seem to be refering to bilinear filtering?


Pongo(Posted 2010) [#6]
I seem to recall there is a trick you can use with .dds textures so they do not blur as much.

I will try to do some tests here if I get a chance later, or hopefully someone else can remember what I am referring to.


Cubed Inc.(Posted 2010) [#7]
Ross C
Well, if prefer calling it texture interpolation, but yes. Is there any way to mip map without the usage of a dll, becuase dlls never work with me for some reason.
Pongo
If you do test it out, tell me, I am VERY interested.


Pongo(Posted 2010) [#8]
ok, I just tested this and it definitely works.

I just created a simple checker texture to test, and saved it as a .jpg, and then saved as a .dds. When I generated the mipmaps for the .dds, I only generated 2 levels (512x512 and 256x256).

Back in Blitz I put the texture on 2 cubes and rotated it around. The .jpg version gets very blurry when the faces angle away from the camera, but the .dds stays nice and sharp. If I save the .dds and generate all the levels of mipmaps, then it blurs the same as the .jpg does, so the trick is to only generate the higher res mipmaps.

Hope that helps,... I can explain further if you need help.


Warner(Posted 2010) [#9]
I believe you could also disable the default mipmapping by putting TextureFilter "", 1 at the start of your program.


Cubed Inc.(Posted 2010) [#10]
Pongo
I can't try out your teqnique, I don't have any programs that can save in the .dds format.
Warner
I tried it and it didn't work.

Thanks for helping anyway.


Cubed Inc.(Posted 2010) [#11]
Guys, I found what I was looking for by using this code.

ClearTextureFilters()