Under some condition, I see seams between my textures and I’m not sure what causes it. Here is what I’m doing: I’m using geospecific textures, therefore they are tilable. Each textures is applied to one or more polygons, and then there is an adjacent texture next to it on other polygons (like sattelite imagery). If my viewpoint is perpendicular to my polygons, I don’t see a problem (no problem at any distance, so my mipmaps are fine). But if I look at my polygons with an angle, then I see a seam between the textures.
Any idea on why there is a seam there?
P.S. my textured are clamped using GL_CLAMP_TO_EDGE
Using anisotropic filtering fixes my problem and also makes the image sharper (I was expecting only the second consequence). Unfortunately, I can’t afford to use it…
If you have a lot of high-frequency noise in your heightmap, the amount of how much a polygon is facing the viewer can change a lot between adjacent triangles. This may cause adjacent triangles to be textured by a different mimpap level. Trilinear filtering won’t solve this, but anisotropic filtering might, I guess this is what you’re experiencing. The best solution is propably to soften your heightmaps. I doubt that the lost detail makes any difference.
Not sure what you mean by “high-frequency noise in your heightmap”. If you refer to bump mapping, I’m not using it. If you refer to the vertical position of my vertices (like mountains), I’m in a pretty flat area.
I was referring to the y-positions of your vertice. Mountains aren’t a problem, the problem comes from small, random variations between vertice close to each other. You get this easily if you use height data captured from the real word, and most terrain generators do it too.
Nah, there is no crack or overlap in my data… that’s the first thing I checked. Otherwise, using anisotropic filtering wouldn’t help it…
Your seams are there becaususe you need a texture overlap for filtering. The lower the level of MIP the more overlap you need.
Try turning off all filtering (GL_NEAREST only). Granted, this will make things horribly pixelated, but it will solve the problem.
No, you still didn’t get it. It’s not about cracks, it’s about too small detail in the heightmap. Such problems are clearly visible in several demos, including mine until I started applying a soften filter to my heightmaps. I guess it’s kind of hard to see how this affects mipmapping, that must be why am I having such a hard time describing it. Well maybe it’s not what’s causing the problem anyway, perhaps dorbie’s closer to the point.
Yeah, I think orbie is right. But I’m still not sur to understand why it’s necessary. On a 256x256 texture, a 16 texels overlap on eache side seems to fix it.