Jump to content

  • Log In with Google      Sign In   
  • Create Account


#Actualunbird

Posted 27 April 2013 - 06:58 AM

Taffy Mountains. Sweet.biggrin.png

Interesting, now I finally get it with that odd/even difference. Seems like even always has some tesselation, since it "starts" at the edges center. See here.

fractional_even with 1.2 for all factors
6e3afa251180131.jpg

fractional_odd with 1.2 for all factors
28f657251180133.jpg
(Oops, should have used a lower resolution, the thumbnails came out black, sorry)

With even, the higher tesselation starts only with factors > 2 it seems. So for your plateaus a odd makes more sense. Shouldn't make a difference with very high tesselation, though.

Backface culling ? You need to give it some bias and you can actually eliminate the patch completely (so it doesn't get rasterized at all) by setting the factors to zero:
// view: view direction from camera to patch 
if(dot(view, faceNormal) < - BackfaceCullBias)
{
    pt.EdgeTess[0] = 0;
    pt.EdgeTess[1] = 0;
    pt.EdgeTess[2] = 0;
    pt.InsideTess  = 0;
    return pt;
}
Here I use a (experimental) bias of 0.3. See how the top of the "cube" still gets rasterized.
0f461e251180100.jpg

The same with a sphere:
8aed3f251180118.jpg

Not sure if this of use for your case, but this "Fresnel term" (dot(view, normal)) can also be used to adaptively tesselate a mesh's contour:
a89f1a251180127.jpg

PS: The distance based factors are deliberately exaggerated here, so I can check the behaviour better.

Edit: Pfff, I got the odd/even mixed up with the triangle. Corrected.

#1unbird

Posted 27 April 2013 - 04:37 AM

Taffy Mountains. Sweet.biggrin.png

Interesting, now I finally get it with that odd/even difference. Seems like even always has some tesselation, since it "starts" at the edges center. See here.

fractional_odd with 1.2 for all factors
6e3afa251180131.jpg

fractional_even with 1.2 for all factors
28f657251180133.jpg
(Oops, should have used a lower resolution, the thumbnails came out black, sorry)

With even, the higher tesselation starts only with factors > 2 it seems. So for your plateaus a odd makes more sense. Shouldn't make a difference with very high tesselation, though.

Backface culling ? You need to give it some bias and you can actually eliminate the patch completely (so it doesn't get rasterized at all) by setting the factors to zero:
// view: view direction from camera to patch 
if(dot(view, faceNormal) < - BackfaceCullBias)
{
    pt.EdgeTess[0] = 0;
    pt.EdgeTess[1] = 0;
    pt.EdgeTess[2] = 0;
    pt.InsideTess  = 0;
    return pt;
}
Here I use a (experimental) bias of 0.3. See how the top of the "cube" still gets rasterized.
0f461e251180100.jpg

The same with a sphere:
8aed3f251180118.jpg

Not sure if this of use for your case, but this "Fresnel term" (dot(view, normal)) can also be used to adaptively tesselate a mesh's contour:
a89f1a251180127.jpg

PS: The distance based factors are deliberately exaggerated here, so I can check the behaviour better.

PARTNERS