Sign in to follow this  
filousnt

T-Junctions, degenerate triangles & pixel artifacts

Recommended Posts

Hi, I draw grids of different sizes for a terrain algorithm and i get T-Junction that i remove by drawing a triangle list on the borders but i have pixel artifacts. So i was wondering if i did the triangle list correctly or not (check images). Image Hosted by ImageShack.us Image Hosted by ImageShack.us As you can see in the screenshot above, the pixel in the middle is a T-Junction. T-junctions seems to be removed when i drawn the triangle list but there is the other two artifacts. They act like T-Junctions but are in the middle of a grid (they can't be T-Junctions, don't know why i have those artifacts). The grids are triangle strips.

Share this post


Link to post
Share on other sites
Here are some ways to avoid T-junctions and cracks:
  1. Neutral background: Draw a neutral-colored background behind the terrain so that any holes in the terrain are not as noticeable.
  2. Skirts: Skirts are triangle strips that hang down from the edges of each patch to cover any cracks. This technique is very simple and very fast; however, it is kind of a hack and the other techniques have a slightly higher visual quality. All-in-all though, it is a very effective technique.
  3. Pre-computed index buffers: In this technique, LODs of adjacent patches only allowed to differ by 1. You create 16 index buffers. Each index buffer has edges that are designed to fit one of the 16 combinations of adjacent patches. When rendering, you simply select the appropriate index buffer. This technique is a little more complicated because adjacent patches can only be off by 1 and you have to create and manage the 16 index buffers. But it is generally faster than the next alternative.
  4. Stitching: In this technique, you modify the index buffer on-the-fly to match the edges of the patch to the adjacent patches. You do this for every patch. The performance costs are higher than the other two methods, but the visual quality is the best and it is a little simpler than the previous technique.

Share this post


Link to post
Share on other sites
thx, didn't know all those techniques but i finally remove T-Junctions with a string of degenerate triangles ( zero area triangles ).

When I remove all drawing call that have T-Junction i still have pixel artifacts ( the other two bright blue pixels ). Seems like a texturing problem but i don't know what it really is. Grids have 64x64 vertices, all have same size.

Image Hosted by ImageShack.us

Edit : The other two pixel artefacts are MipFilter artefacts, i set MipFilter to none and it works now.

[Edited by - filousnt on March 4, 2007 5:44:04 AM]

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this