Take the 2-minute tour ×
Game Development Stack Exchange is a question and answer site for professional and independent game developers. It's 100% free, no registration required.

enter image description here

This is the problem I'm having: where the height has been applied to the vertex, the edge of each face has been pushed apart. I was wondering how I can best deal with this issue?

I read elsewhere that calculating the mean between the two adjacent edge vertices and applying to both will seal the gap, but wouldn't that cause some UV stretching?

Any advice would be great, Caius.

share|improve this question
add comment

1 Answer 1

up vote 2 down vote accepted

It looks like when you apply the displacement map, you're pushing vertices out along the face normal of the underlying mesh? Instead of using the face normal, you should use the smooth vertex normal - which means you will need to interpolate across the face from its vertex normals. Smooth normals will match across edges automatically, so displacements along them should not generate cracks.

For more discussion of this issue, see the GDC talk My Tessellation Has Cracks (pdf).

share|improve this answer
    
Not sure it's worth creating a new question over, but I've applied the technique described within that paper. The results I've had are promising it's closed the large gaps and I completely understand why they were occurring. However I'm now having a smaller cracks issue. It seems as if they occur on the corners of each face, do you have any ideas reading this new problem? Thank you so much for your original answer. –  Caius Eugene Jan 2 '13 at 9:22
1  
@CaiusEugene Assuming there are no cracks in the underlying mesh, cracks at the corners are probably because your domain shader isn't applying exactly the same displacement to the corner vertex when it occurs in different faces. You'll have to go over your shader math and see if you can find what's causing that. –  Nathan Reed Jan 2 '13 at 17:43
    
You were completely right, the problem I was having was down to the heightmap data being 32x32 and each plane I was applying it to was 33x33. Small gaps formed because the data was incorrect. –  Caius Eugene Jan 3 '13 at 14:16
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.