0
\$\begingroup\$

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!

\$\endgroup\$

1 Answer 1

1
\$\begingroup\$

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

\$\endgroup\$
3
  • \$\begingroup\$ 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. \$\endgroup\$
    – Neophyte
    Apr 28, 2013 at 23:12
  • \$\begingroup\$ 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? \$\endgroup\$ Apr 29, 2013 at 8:51
  • \$\begingroup\$ 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! \$\endgroup\$
    – Neophyte
    May 1, 2013 at 14:42

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .