Sign in to follow this  

Terrain flickering

This topic is 4837 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

You need to be more specific about your problem. I'm guessing that the 'flickering' is due to z-fighting, Geomipmapping (or LOD in general) shouldn't have anything to do with fixing this flickering effect. Make sure your z-buffer is set to 24 bits or higher, and set your near clip plane to >= 1 if it isn't already.

Share this post


Link to post
Share on other sites
The problem is basically that when I have one texture per tile on the terrain, viewed from a distance it will look very much like 'noise'; flickering. If I span one texture over the entire terrain its much better.
Ill have a look at my Z-Buffer options maybe that will help.
But I still think its something else, perhaps too large textures or 'MipMapping'(not too familiar with that either).

Oh and this is just verts, textures, and vert colors.
No materials or lighting could that be the culprit.

-CProgrammer

Share this post


Link to post
Share on other sites
In my engine, the default is to mipmap the texture. In some cases it may be better not to have it (ie: I disable mipmapping for my fonts).

Mipmapping is usually a good thing. It greatly aids visual quality when a texture is viewed at a distance - since mipmapping produces lower resolution versions and the gpu picks the one that would best fit the current needs.

About the "didn't seem to help":

Did you specify: magfilter=minfilter=GL_LINEAR_MIPMAP_LINEAR; for the glTexParameter?

glTexParameteri(GL_TEXTURE_2D,GL_TEXTURE_MAG_FILTER,magfilter);
glTexParameteri(GL_TEXTURE_2D,GL_TEXTURE_MIN_FILTER,minfilter);

Share this post


Link to post
Share on other sites
There are faster options than gluBuild2DMipmaps.

Check out this link

This doc is a bit old. Check out GL_GENERATE_MIPMAP as an alternative to GL_GENERATE_MIPMAP_SGIS. It's in the OpenGL specs. I have used both gluBuild2DMipmaps and GL_GENERATE_MIPMAP. I believe automatic mipmap generation was promoted to the core in OpenGL version 1.4

Share this post


Link to post
Share on other sites

This topic is 4837 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this