Take the 2-minute tour ×
Game Development Stack Exchange is a question and answer site for professional and independent game developers. It's 100% free, no registration required.

I have been following this site as an intro to OpenGL.

After going through the model obj loading tutorial, I wanted to create my own .obj (a cube) as well as my own texture. Following this blender tutorial I created and textured the cube, and exported the .obj and .dds which I am loading in the OpenGL tutorial program.

My issue is that in both cases, the original tutorial .obj/.dds and my own custom one created with blender, the texture for each face of the cube has a slight black edge around it.

I can't figure out how to change this, so that I have a "seamless" texture around the cube, with no black or white edges.

I'm not sure if this is something that needs to be adjusted in Blender, or in the c++ application. Any help would be appreciated!

share|improve this question

1 Answer 1

up vote 1 down vote accepted

I'm pretty sure that's just happening because your UV map is spilling over into the black area of the texture. If you just bring your UVs in a bit it should work.

Or you could just do it the lazy way (like me) and paint along the borders of the white/black area to make it impossible to read any background pixels, EG:

enter image description here

share|improve this answer
    
I thought so too at first, however the remaining area of the texture is white. The generated UV .png created by blender has a grey edge around each of the squares, which I've filled with a colour. The issue is that the grey/black edges show up on the cube in opengl. I've tried filling in the edges with each colour, but they overlap and some sides will end up with the other sides colour on it. –  Neophyte Apr 28 '13 at 23:12
    
That's very strange indeed. I've never come across anything like that where the issue wasn't with the actual texture. Can you post a screen shot? –  Lewis Wakeford Apr 29 '13 at 8:51
    
I suspect that the issue is with how the texture and the uvs in the .obj have been generated with blender, so I am going to look into this process further. Thanks for the help! –  Neophyte May 1 '13 at 14:42

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.