PixarAnimationStudios / OpenSubdiv

An Open-Source subdivision surface library.
graphics.pixar.com/opensubdiv
Other
2.88k stars 558 forks source link

example viewers do not produce watertight results #1316

Open Bloodwyn opened 1 year ago

Bloodwyn commented 1 year ago

Given that OSDs example viewers are based on the work of Nießner et al., who spend a whole chapter on watertight evaluation, I was suprised to see that the OSD implementation does not produce watertight results.

My understanding is that an evaluation is not watertight (thus leaky?) if evaluated points lying on the edge between two patches can deviate because of different floating point rounding on either side. This can result in missing pixels:

dxViewer: leakyOSDdx

glViewer leakyOSDgl

Is this an intentional limitation? - Apologies if I missed any information on that topic. Have a nice day!

davidgyu commented 1 year ago

Filed as internal issue #OSD-431

davidgyu commented 1 year ago

Hi! You are correct, the GPU hardware tessellation used by the example viewers is not watertight, and the OpenSubdiv code base does not fully implement the methods to address watertight tessellation as presented in Neissner2012.

You may want to take a look at bfr_tutorial_2_2.cpp which does show how to obtain a topologically watertight tessellation using OpenSubdiv::Bfr. We have some work in progress to incorporate that into the example viewers, but we haven't done so yet.