[osg-users] Texture not clear in far view
jean-sebastien.guay at cm-labs.com
Mon Sep 8 06:18:36 PDT 2008
> Yes, the DDS format is a good solution to control the mip mapping. But
> now since my texture is JPEG, it seems that I have to let OSG generate
You can change the textures and replace them in your model, or just use
a visitor to replace the textures and re-save your model, or... I don't
see why that would be a problem.
If you can accept the changes in your art pipeline involved by having
someone generate mipmaps and saving textures to a DDS file, using that
file in a model is very easy.
> I find that the default filtering mode is LINEAR_MIPMAP_LINEAR for
> MIN_FILTER. I tried some other filtering modes like LINEAR, and the
> texture performance becomes better in far distance. The texture,
> however, doesn't look very stable and is kind of dithering when you move
> the scene. When you stop, everything is just fine.
> Any hints for the possible reason for this? Thanks a lot.
LINEAR_MIPMAP_LINEAR = mipmapping
LINEAR = no mipmapping
Look up mipmapping on Wikipedia, and you'll find the answer to your
As I said, the GLU functions that generate the mipmaps cause too much
blurring in the textures (which is what you originally asked about). Now
you disabled mipmapping, so you removed this blurring, but of course
then you get the artifacts that are to be expected when mipmapping is
Possible solutions, once again:
1. Generate the mipmaps yourself using better filtering, so that they're
less blurred. Store the resulting texture with mipmaps in a DDS file and
use that on your models at runtime.
2. Tell OpenGL to use a better filtering method at run-time (anisotropic
You haven't tried running your models through the optimizer's texture
visitor to enable anisotropic filtering on their textures. I would
suggest you try that if you really don't want to try creating the
mipmaps yourself and replacing your textures by DDS textures.
Hope this helps,
Jean-Sebastien Guay jean-sebastien.guay at cm-labs.com
More information about the osg-users