TextureFilters question
Blitz3D Forums/Blitz3D Programming/TextureFilters question
| ||
I understand that if I use ClearTextureFilters then I can get rid of the usual middle distance blurring of textures. The sort of blurring I'm refering to is when you look at the white lines in a road texture, and they start to blur at about 20 metres so it suddenly looks as if someone has taken a watercolour brush across them (where the whitelines should stay sharp into the distance). I don't want to use ClearTextureFilters as this effects all textures, and most of them look correct if blurred a little. So how do I not-blur just the road texture? I tried Texture Filters "road",1 (not +8 for mipmap) but it was still blurred. |
| ||
You have to ClearTextureFilters to disable mipmapping on every texture or you will not be able to turn off mipmapping ( or color I think. ) You can then apply a new texture filter to apply mipmapping to all textures but the one you want to leave unblurred, or you can manually set the mipmapping flag when you load each texture. |
| ||
No luck I'm afraid (yes, I've read the manual too). I tried using: ClearTextureFilters() TextureFilter "",1+8 ; restore default TextureFilter "road",1 ; set road But my road texture is still blurred from the middle ground back, as shown: That's fine for the grass, but the white lines should be crisper. Anyone? |
| ||
Use ClearTextureFilters() directly after Graphics3D command. Then load your road with: LoadTexture("road.png",1) You'll have to specify 1+8 for all the other textures loaded though, or use TextureFilters to do it. Maybe TextureFilter "",1+8 ; restore default in your example is also restoring +8 to all? The mipmap blur amount is affected by what settings you have for mipmap quality in your display settings (at least with NVidia cards it is) Example: Lowest & Highest my card does. Though the blurring is still extreme at high quality in my opinion. The textures are 512*512 b.t.w |
| ||
TextureFilter "",1+8 ; restore default Yeah, that's just reimplementing the old texture filter. My fault, I should have explained better. What I meant was to implement a new, different texture filter. Something like "_std" and rename all your textures to include "_std" if you want typical filters. I'm pretty sure that implementing a "" filter, or basically a wildcard filter is applying mipmapping again, regardless of the additional, later filter you add turning it off again. |
| ||
The road texture is part of a model, so it is not loaded separately. So does this mean that because I want clarity on just one texture I have to specify TextureFilters "_std",1+8 and then rename _all_ my other textures? Pretty silly for just one texture, but if that's right then thanks for the help anyway. There again, by the logic above, I should be able to do: TextureFilter "",1+8 ; restore default TextureFilter "road",1 ; set road which as I said, has no effect. |
| ||
TextureFilter has always worked for me, what GFX card & drivers you using John? |
| ||
Hi! I you create the model of the road in 3d studio max just check vidmem in material properties. If not, just use in Blitz Cleartexturefilters and then set: TextureFilter "", 1+256 If texture is in vram it won't be mipmapped at all. |
| ||
The texture was mapped to the mesh in a modeller called Metasequioa (but does it matter?), not 3DS. I don't know if we're having a misunderstanding here (but I appreciate all input).... Quite simpy I want to kill the blurring on _one_ texture only. So I shouldn't have to use ClearTextureFilters at all. I should just be able to do TextureFilters "road",1. Why does this not work? |
| ||
I've told you why that doesn't work. Because you cannot disable the 1 and 8 flags ( color and mipmapping ) without clearing texture filters. If you don't believe me, maybe you'll believe the help file which says : Something to consider when applying texture flags to loaded textures is that the texture may have already had certain flags applied to it via the TextureFilter command. The default for the TextureFilter command is 9 (1+8), which is a coloured, mipmapped texture. This cannot be overridden via the flags parameter of the LoadTexture command - if you wish for the filters to be removed you will need to use the ClearTextureFilters command, which must be done after setting the graphics mode (setting the graphics mode restores the default texture filters). Your wildcard texture filter doesn't work because it puts that filter back on that you just took off by clearing texture filters. You will need to make a texture filter for all the textures you want loaded with the 1+8 flags and rename the textures accordingly in order to be able to load one texture without one or more of those flags. |