weird see-thru tiles

I have this terrain editor that I made and it’s based off triangle tiles right, so when you look at it from one direction and when u look at it from the back all the tiles are see thru, sort of, i took a picture… here is from the back, which is f’d up: http://members.cox.net/evilremy/q1.jpg
and here is from the front which is perfectly fine: http://members.cox.net/evilremy/q2.jpg

if anyone knows why it’s doing this I would greatly appreciate it, thanks.

Most likely your Z-buffer is not being set up correctly (or at all).

no real idea, but are you sure that all your tris are oriented the same, meaning counterclockwise (or clockwise) ?
i think you did take care of that, but i have no other idea at the moment, sorry

perhaps some more details will help
what does it look like in wireframe or without texture?

Thanks for replying… Jambolo, I did set the z-buffer, or why would it work when you look from one direction and not the other? And here are some more pics for you to ponder over, first set looking from back to front, second set looking from front to back with the same map…
http://members.cox.net/evilremy/p1.jpg
http://members.cox.net/evilremy/p2.jpg
http://members.cox.net/evilremy/p3.jpg

<a href=“http://members.cox.net/evilremy/p4.jpg” target=“_blank”>http://members.cox.net/evilremy/p4.jpg
</a> http://members.cox.net/evilremy/p5.jpg
http://members.cox.net/evilremy/p6.jpg

Anyone have a clue?

[This message has been edited by Xero_Tolerance (edited 05-27-2002).]

[This message has been edited by Xero_Tolerance (edited 05-27-2002).]

[This message has been edited by Xero_Tolerance (edited 05-27-2002).]

[This message has been edited by Xero_Tolerance (edited 05-27-2002).]

Still looks an awful lot like a z problem. Make sure, you
a)Have a z buffer
b)Have z writes enabled (sanity check: glDepthMask(true); )
c)Have z test enabled (glEnable(GL_DEPTH_TEST);, glDepthFunc(GL_LEQUAL) :wink:
d)Clear z every frame (glClear(GL_COLOR_BUFFER_BIT|GL_DEPTH_BUFFER_BIT) :wink:
e)Clear z to a sane value (best not to call glClearDepth at all …)

Also try enabling backface culling.

And last but not least, your screen shots are nice, but it’s kinda hard to see anything. I’d like to see a demonstration shot (of the problem) with as few polys as possible.

PS: Please don’t crosspost, you won’t make many friends around here by doing that.

[This message has been edited by zeckensack (edited 05-27-2002).]

yeah that worked, i guess at some point i had glDisable(GL_DEPTH_TEST). Anyway, thanks for the help, now the only problem I have is the menu disapears under the terrain when I go down too low, anyone know why that happens?

Originally posted by Xero_Tolerance:
yeah that worked, i guess at some point i had glDisable(GL_DEPTH_TEST). Anyway, thanks for the help, now the only problem I have is the menu disapears under the terrain when I go down too low, anyone know why that happens?
Hmm, maybe the depth test again? Just disable the test before rendering the menus and reenable it before rendering the terrain.

Or just make sure your menu is perfectly aligned with your near plane, then you won’t have to fiddle around with the depth test