'gaps' in my terrain?

Started by
2 comments, last by SoaringTortoise 20 years, 11 months ago
I''m building my terrain vertex buffers as triangle lists from a height-map. Each vertex on a triangle shares the exact same x/z co-ords as the adjacent triangle, so I''m certain that there are no gaps in the geometry. However, when I render and the camera is close to horizontal, in the distance I definitely get gaps in the geometry where the background color/skybox shows through. The gaps are only a pixel thick and very intermittent. It looks terrible. I was using a uv offset of 0.001 (i.e. using 0.001 for the min uv and 0.999 as the max... as per spec), and when I increased this to 0.01 a lot of the gaps disappeared, but not all of them. I can''t increase it any more otherwise I get bad texture lines close to the camera. Does this sound like a texture address issue (and if so, how can I solve it), some other software issue, or a driver thing? (using a GeForce4 Ti 4600 with detonator 40.41 drivers) Always prey on the weak, the timid and the stupid. Otherwise you''ll just get your butt kicked
For a tortoise, this is extremely hard to do, but when you get it right... the expression on their faces ...
Always prey on the weak, the timid and the stupid. Otherwise you'll just get your butt kicked
For a tortoise, this is extremely hard to do, but when you get it right... the expression on their faces ...
Advertisement
Regarding the vertices that share the same coordinates.
Are they calculated seperately or do you calculate the position for one vertex and set the other one to the same coordinates?

To avoid cracking i think the coordinates must be EXACTLY equal down to the last decimal or else cracking can occur.
(I read something about that but can''t remember where)

Try dumping the vertexcoordinates to a file and check the values(to be absolutely sure)



<-Sweenie->
Done. They are exactly identical.
Always prey on the weak, the timid and the stupid. Otherwise you'll just get your butt kicked
For a tortoise, this is extremely hard to do, but when you get it right... the expression on their faces ...
OK, I think I figured out what''s happening. I am using a massive texture for my terrain. The texture is split up into 16 rows and 16 columns. Each pair of rows gives me 16 texture variations plus 16 edging textures. This means that my terrain can use a maximum of 8 unique textures (eh?).

Now, the first row of each pair contains solid (no alpha) tiles, but the second row contains semi-transparent tiles that are used for edging.

So... I think that in some circumstances (probably from the automatic mip-map creation), there is bleeding between the tiles, which is causing some of the pixels to be transparent when rendered, even though the UV addressing is correct.

QED. If I turn off mipmapping, the problem goes away.
Always prey on the weak, the timid and the stupid. Otherwise you'll just get your butt kicked
For a tortoise, this is extremely hard to do, but when you get it right... the expression on their faces ...

This topic is closed to new replies.

Advertisement