View Full Version : Texture distortions
10-26-2000, 03:37 AM
This is probably something real easy, but my problem is this: the textures seem to be getting "distorted" and I get this "glistening" effect the larger the viewing distance is or the smaller the view angle to the polygons that have the texture on. When I'm getting closer, the effect is no longer noticeable. I noticed that in games, e.g. the floor is "blurred" in the distance as if to avoid the very problem I'm experiencing.
Now how is it done? What are the common techniques to eliminate that?
10-26-2000, 03:41 AM
I should clarify: the effect is visible only during movement (i.e. first person perspective rotations), and doesn't exist for still scene.
10-26-2000, 04:21 AM
Sorry I dont have time for a detailed response, but just a few pointers.
To solve the problem at a distance, look into mip-mapping your textures.
To solve the problem viewing at an angle, look into anisotropic filtering.
10-26-2000, 05:04 AM
I have mipmapping turned on, however I use
gluBuildMipmaps routine... Is generating mipmaps manually better?
I'll look into anisotropic filtering...
10-26-2000, 11:50 AM
Actually GL_LINEAR for the texture minimize and maximize filters should already get rid of most of the "glistening" effect. Do you have texture filtering enabled at all or is it GL_NEAREST?
The reason for texture distortion you mentioned I can only imagine perspective correction being turned off. Try switching it to GL_NICEST.
10-26-2000, 12:12 PM
The problem you describe, which is known as texture aliasing, is solved by using mipmaps.
Make sure to set your GL_TEXTURE_MIN_FILTER to either GL_LINEAR_MIPMAP_NEAREST (bilinear mipmapping) or GL_LINEAR_MIPMAP_LINEAR (trilinear mipmapping).
If you really have mipmapping turned on, you should not be seeing any texture aliasing. If you are, there must be some other problem.
Almost all modern GL implementations do perspective-correct texturing whether you tell them to or not, so it's unlikely that perspective correction is the problem.
10-26-2000, 11:42 PM
As I said earlier, I have mipmaps on, GL_LINEAR for min and GL_LINEAR_MIPMAP_LINEAR for max...
What can be the other reason for this?
10-27-2000, 12:02 AM
With what depth color is your window initialized? If it is 16bits, try it with 32bits, and see what happens. It may be a problem with the zBuffer.
If it is, you have to use glFrustum to fix it.
10-27-2000, 12:25 AM
GL_LINEAR_MIPMAP_LINEAR for GL_TEXTURE_MIN_FILTER! Now it looks cool!
Sorry mcraighead, didn't notice you were talking about MIN_FILTER, I had LINEAR_MIPMAP_LINEAR turned on only for MAG_FILTER...
The docs in MSDN on this topic are somewhat confusing...
im a stopid ass but having mipmaps for max doesn't make sense does it. now i wanna know is there a program out there that a person can run code through and it'll catch all these stopid errors eg a 'invalid syntax' error ain't that much help is it, well it is but not for us lazy ****s http://www.opengl.org/discussion_boards/ubb/wink.gif
Powered by vBulletin® Version 4.2.3 Copyright © 2017 vBulletin Solutions, Inc. All rights reserved.