Jump to content
  • Advertisement
Sign in to follow this  
Hydrael

Ugly seams

This topic is 4866 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

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

Share this post


Link to post
Share on other sites
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.

Share this post


Link to post
Share on other sites
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 :/

Share this post


Link to post
Share on other sites
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.

Share this post


Link to post
Share on other sites
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 ;)

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!