Ugly seams

Started by
4 comments, last by Hydrael 18 years, 8 months ago
Hello everyone, I have a little problem with texturing. I use one large texture (2048x2048) tiled up in several small ones to be able to render a scene with one single texturebind. Basically, I don't assign a texture to an object, I assin TexCoords. Works pretty good, but I do get some ugly seams on adjacent quads, which looks like this: and causes following effect: I use mip-mapping with GL_LINEAR_MIPMAP_LINEAR at MAG_FILTER and GL_NEAREST_MIPMAP_NEAREST at MIN_FILTER. Also, I use the texture wrap parameter GL_CLAMP_TO_EDGE at both S and T. Does anyone see anything obivous I could have done wrong? I double checked TexCoords - they should be correct. Thanks for any help in advance Chris
Advertisement
It is the mipmapping that does this, and it can't really be solved by in any other way than keeping the texture in separate places and replacing the GL_CLAMP_TO_EDGE with GL_MIRROR.

One alternative could be to use a 3d texture, but i have not tested it with landscape rendering so i don't know how it will preform.
Isn't there any way to manually tell OpenGL how each mipmap level would look like? Similar to a DDS file for example.
I'd really like to find a way to keep my current implementation of texturing because I expect a massive performance breakdown, if I change it :/
yes there is a way, the second variable in glTexImage2D alows you to set a custom image on any mipmap level.

gluBuild2DMipmaps basicly builds it's own mipmaps and then uses glTexImage2D to put them there.
Ah, thanks a lot. I will give that a try :D
Ok, I got the custom mipmaps working now.
But after trying around a bit I realized that what I'm intending to do really is impossible :/
Even with completly disabled filtering I got seams.
I wonder that this never was an issue. Is it so uncommon to only use certain areas of a texture?

Well, I guess I will go over to use multitexturing. That's gonna be a big load of work since I'll have to rewrite most of my code, but who knows...maybe later on I'll be glad I did that. Maybe things will become easier then when I come up to texture blending or something like that.

But thanks anyway - learned some new things here ;)

This topic is closed to new replies.

Advertisement