• Advertisement
Sign in to follow this  

Connecting texture coordinates of smooth-shaded cylinder at first face and last face?

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

I am having trouble properly connecting the texture coordinates (example: cylinder with 16 segments) at index 0 and index 15.  I just give each face the texture coordinate corresponding to the segment number, so the first face has texture coordinates (0, 0), (1, 0), (0, 1), (1, 1), the second face has (1, 0), (2, 0), (1, 1), (2, 1), etc.  The last face has (15, 0), (0, 0), (15, 1), (0, 1).

 

I am fairly certain the problem is that the last face has to connect to the 0th coordinate, but I can't figure out a way around this without duplicating the vertices.

 

I also tried to give all even-numbered segments the texture x-coordinate 0, and odd-numbered segments with texture x-coordinate 1, but that still didn't seem to fix it.

 

EDIT:  Nevermind.  It was an unrelated bug.  Sorry.  Alternating 1 and 0 does work, the other method does not.

Edited by Vexal

Share this post


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

  • Advertisement