PixarAnimationStudios / OpenSubdiv

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

Quality of limit surface when extra-ordinary vertices are present. #1188

Open VadiMysore opened 4 years ago

VadiMysore commented 4 years ago

Hi there, We are setting Subdivision level to 1, for faster processing, when using OpenSubDiv. But this appears to create limit surface patches having tangent discontinuity. The zebra stripes for the case of a very simple cube cage is shown below. As can be seen, there are tangent discontinuities (even G1). Is this expected when extra-ordinary vertices exist as they do in this case(all cube corners are so) and Subdivision level is set to the lowest value(=1)? Subdividing to higher levels appears to solve the issue but it can be slower in case of large models, which we would like to avoid.

image

jilliene commented 4 years ago

Filed as internal issue #OSD-320

VadiMysore commented 4 years ago

Hi there! I have not heard from anyone on this issue thus far. We are using OPenSubDiv to create solid/surface models. The b-spline patches created by OpenSubDiv are not G1 contiguous around the extra-ordinary vertices in the control cage when the subdivision level is set to 1. The zebra stripes indicate so. Some of our customers are very picky about this.

Does OpenSubDiv guarantee G1 continuity at all for the case listed above?

barfowl commented 4 years ago

Tangent continuity (G1) around extraordinary vertices in OpenSubdiv is currently only enforced with the use of Gregory patches.

We've mentioned previously that OpenSubdiv does not use PCCM to generate B-spline patches. The benefits of doing so have been acknowledged and noted and will be considered in future.

VadiMysore commented 4 years ago

@barfowl - Hi Barry! Thanks for the response.

Glad to hear that this issue will be addressed in a future release. Is there a rough idea of when it will be in OpnSubDiv?

Also, will the PCCM method result in uniform, bi-cubic, b-spline patches as does the current algorithm in OpenSubDiv does or will they be NURBs?

As an interim solution, will increasing the number of levels of subdivision ameliorate this issue to some extent?

Thanks!

barfowl commented 4 years ago

I don't have any idea when this improvement will make it in.

We won't use PCCM to generate NURBS -- PCCM will simply be used as a reference for the conditions required to enforce tangent continuity around extraordinary vertices. The end result will be a uniform bicubic B-spline patch that is generated in the same way it is now but with improved continuity. So the clamped control points of PCCM's NURBS solution will be unclamped.

Yes, increasing the number of subdivision levels will reduce the extent and so the visibility of tangent discontinuities.

VadiMysore commented 4 years ago

@barfowl - Thanks again, Barry, for the response.

The PCCM based solution will be very helpful to us going forward. Our product is currently using the 3.4 OpenSubDiv release. We look forward to this solution from Pixar in a future release of OpenSubDiv.

We have experimented with the Subdivision levels and perhaps will choose an appropriate level internally to satisfy some of the customers asking for it. Our only concern, for now, is performance as the number of patches increases, and combining them into one single patch on a per cage face basis consumes more time.