- removed obsolete and unused code from GregoryBasis and ProtoBasis
- reorganized computation in ProtoBasis to clarify interdependencies
- separated topological inspection from computation
- made a clearer distinction between interior and boundary cases
- improved clarity/consistency of formulae, particularly wrt sin/cos usage
- added comments, including concerns over consistency and efficiency
- added definition and gathering method to Vtr::Level
- extended Far::EndCap...PatchFactories with VSpan[4] for patch corners
- extended Far::EndCapGregoryPatchFactory to avoid last level assumption
- adapted Far::PatchTableFactory to use above extensions
- extended Far::GregoryBasis to recognize VSpan corners
- simplified Far::GregoryBasis treatement of boundaries
- fixed bug in Far::GregoryBasis related to smooth corners
- instead of accumulating GregoryBasis::Point (fixed size stencils
backed by stackbuffer), pack the stencils into StencilTable as they
are evaluated
- use single integer for varying stencils of patch points, not
a GregoryBasis::Point
- cap the reserved stencil entry size.
- replace std::vector with vtr::StackBuffer in GregoryBasis::Point
- remote getQuadOffsets call from ProtoBasis
- rewrite some inefficient code in the endcap generation.
Note that this is a temporary remedy for the performance issue in 3.0.
We'll fix it again in the later release.
Although valence 2 gregory patch is not well supported yet, this fix
mitigates artifacts around such a vertex.
Adding a shape catmark_gregory_test8 to see this issue.
To encapsulate endcap functions from public API, add methods to
tell the number of patch points needed (GetNumLocalPoints()) and
to compute those patch points as a result of change of basis from
the refined vertices (ComputeLocalPointValues()).
ComputeLocalPointValues takes contiguous source data of all levels
including level0 control vertices.
- rename "Regular end cap" to "BSplineBasis end cap"
- revert templating and add EndCapType into PatchTablesFactory::Options.
- make EndCapFactories internal in PatchTablesFactory.
- move end cap stencils into PatchTables, keep them relative to the max level.
- add a utility StencilTablesFactory::AppendEndCapStencilTables to splice and factorize endcap stencil tables.
This change moves all gregory patch generation from Far::PatchTablesFactory
so that we can construct patch tables without stencil tables as well as client
can chose any end patch strategies (we have 3 options for now: legacy 2.x style
gregory patch, gregory basis patch and experimental regular patch approximation).
Also Far::EndCapGregoryBasisPatchFactory provides index mapping from patch index
to vtr face index, which can be used for single gregory patch evaluation on top
of refined points, without involving heavier stencil tables generation.
PatchTablesFactory fills 20 indices topology into patchtable, and use it for eval and draw.
note: currently screen-space adaptive tessellation of gregory basis patches is
broken and cracks appear around them.
- changed return type of Vtr array empty() to bool
- renamed and adjusted arguments to Vtr gather methods for consistency
- removed lone Vtr gather method that took an explicit offset
- updated usage of revised Vtr gather methods in Far
- fixed warnings redeclaring names of local variables already in use
- extend Far::PatchTables data structures & interfaces to store requisite
information for channels of face-varying bi-cubic patches
- implement gather function in Far::PatchTablesFactory to populate face-varying
channels with adaptive patches
- extend accessor interface in Vtr::Level
- propagate code fall-out throughout OpenSubdiv code base, examples & tutorials
- extend vtrViewer code to visualize tessellated bi-cubic face-varying patches
Const' declared instances of Vtr::Array do not protect the pointer held
privately by the class properly. In order to force the compiler to
protect this pointer, we removed all non-const accessors from Vtr::Array
(now renamed Vtr::ConstArray) and moved them to a child class (Vtr::Array),
which requires const_cast<> operators internally to allow access.
The change & renaming is then propagated to all internal dependencies.
- adding functionality to Far::PatchTablesFactory to generate topology indices
for Gregory basis end-caps (identify and index vertices along basis shared
edges)
- code is currently #ifdef'ed out until further work can be done to bring the
feature along all the way through to Osd::Draw
- adding support for StencilTables creation from a Gregory basis
- fix a bug in the prot-stencil allocator (slow memory pool was not being cleared properly)