Jump to content
  • Advertisement

Archived

This topic is now archived and is closed to further replies.

macross

Texture Mapping Problems

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

folowing problem: after importing geometry and uv data from MAX, i go through the face list and render each triangle in the mesh with its UV-coordinates. Everything looks ok, except the cylindrical Mapping. There is an wrap at the connection point of the mapped texture. I know why it is so, but i have no idea how to solve that problem. I hope someone can help me. http://www.bytelords.de/public-img/mapping_problem01.jpg http://www.bytelords.de/public-img/uvkack.jpg in code: for(int fc=0; fc < g->faceList.size(); fc++) { B3DFace* f = g->faceList[fc]; B3DVec3* vertex; B3DVec2* uv; //-------------------------- vertex = g->vertexList[f->a]; uv = g->texCoordList[f->a]; glTexCoord2f(uv->x, uv->y); glVertex3f(vertex->x, vertex->y, vertex->z); vertex = g->vertexList[f->b]; uv = g->texCoordList[f->b]; glTexCoord2f(uv->x, uv->y); glVertex3f(vertex->x, vertex->y, vertex->z); vertex = g->vertexList[f->c]; uv = g->texCoordList[f->c]; glTexCoord2f(uv->x, uv->y); glVertex3f(vertex->x, vertex->y, vertex->z); }

Share this post


Link to post
Share on other sites
Advertisement
Meanwhile i solved the problem.

I exported the uv-coords per face and not per vertex. It makes it possible for one shared vertex to have different UV-Coords for different faces using that vertex.

However, it works now. :D

Share this post


Link to post
Share on other sites

  • 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!