Bugs in TexCoords in a tunnel!!!!!!

Started by
11 comments, last by XaOs 22 years, 8 months ago
Hi!! I just wondered if someone could be kind enough to help me find out what i have done wrong here...(see screenshot below)!! !! If any of you wants to take a look at the source...send me a mail and i''ll bring it over as soon as possible!! !! Hope anyone can help me out here!! Thnx!! Take Care! - -- ---[XaOs]--- -- -
- -- ---[XaOs]--- -- -[ Project fy ||| CyberTux ]
Advertisement
There are two possibilites:

a) Your texture is bad. (It isn''t tilable)

b) The vertices along the seam don''t have the same colors if your not using lighting, or if your using lighting then they don''t have the same normals.

I suspect that (b) is the problem in this case. Your doing gourad shading here, and probably averaging the verex normal by using the adjacent triangles. But the vertices along the seam your not taking into acount some of the polygons.

If you imported the model from a modeling program and are using the normals you got from it, then try the equivelent of welding the vertices among the seam in your modeling program before you export. If you generating the geometry through an algorithm in your code, then make sure you calculating the normals correctly as I described in the previous paragraph.
Now that i look at it again, it might be the texture. Can you post a wireframe image, and an image without any lighting(just do glDisable(GL_LIGHTING); and glColor3f(1.0, 1.0, 1.0); for all the vertices.
Hi!! Sorry to dissapoint you....but there is no object here....nor any lighting!! What you see on this picture is a simple grid (array containing points) witch is bend around to form a tunnel!! Then i lay the texture on and manipulate it so it looks like in the picture!! Those things looking like an object (i presume those where the one you where talking about) are just a little effect i bumped into when i was plaing a little with the math involved here!!

If you wan't me to send you the source i can do that...so that you can take a look for yourself!!
(Just reply here or send me a mail before tomorrow afternoon)!!

Take Care!


and btw : The texture is a tile....look around in the tunnel...it is tiled everywhere else but the "bad point"!!


- -- ---[XaOs]--- -- -


Edited by - XaOS on August 13, 2001 1:21:21 PM
- -- ---[XaOs]--- -- -[ Project fy ||| CyberTux ]
Could you post up what just one tile of the texture is supposed to look like (a.k.a. the picture the texture is coming from)? That''d probably help in trying to figure out what''s going wrong...

~ Dragonus
okey....here it is : Click me !!

It''s not big...but it''s a tile!!!


Take Care!

- -- ---[XaOs]--- -- -
- -- ---[XaOs]--- -- -[ Project fy ||| CyberTux ]
You got all of that tunnel on just that one little tile there!? Wow, I''m impressed. ^_~ I was expecting something bigger, hence why I asked for it.

However, here''s a shot in the dark... (Correct me if I''m making the wrong assumption here.)

I asked for the tile so I could see how it fits into the tunnel. The way it appears is that the vertical section (of the 2D tile) runs inwards/outwards in your tunnel, while the horizontal section of the tile goes around the tunnel, supposedly making a circle. I hope I''m correct in thinking this.

Inwards/outwards appears to be no problem. It''s the "round the loop" that you''re having trouble with. For it to be tileable horizontally (or "round the loop"), you have to have an even number of tiles going around. (a.k.a., a whole tile + 1/2 of a tile won''t cut it if you travel around the loop).

Provided I''m on target, your tile has two bright bands. Now looking at your tunnel pic, starting at 3 o''clock (the right) and going clockwise, the 2nd bright band is at 9 o''clock, and thus the first tile going around ends somewhere around 12 o''clock-ish. As you continue to travel around, we hit a THIRD bright band, which indicates that there''s another tile present when going around, which causes your problem area.

The idea is that you have to use the entire texture an integral number of times throughout the 360 degrees of the tunnel. If you don''t, bad things like what you''re showing happen.

Am I anywhere close on this one?

~ Dragonus
Hi!!

You found out whats wrong!! !!!
I have tried to something almost like what you said...(for checking ofcourse)....but i turned just as clueless as i still am!! Are you sure i''m not gonna send you the source?

At least this way you could take a look at it and really see how
i do it!! (It involves some math though...but it shouldn''t be a problem)!!

Let me know what you think.....

Thanks for really trying to help me here!!

Take Care!


- -- ---[XaOs]--- -- -
- -- ---[XaOs]--- -- -[ Project fy ||| CyberTux ]
quote:Original post by XaOs
Are you sure i''m not gonna send you the source?

At least this way you could take a look at it and really see how
i do it!! (It involves some math though...but it shouldn''t be a problem)!!


Send it on over. ^_^ I''ll take a look-see at it as soon as I can.

~ Dragonus :D
k!!

Sending it over rigth now........

- -- ---[XaOs]--- -- -
- -- ---[XaOs]--- -- -[ Project fy ||| CyberTux ]

This topic is closed to new replies.

Advertisement