- address indexing inconsistencies with Uniform PatchTables (#737)
- suppress generation of Varying patches and/or their local point stencils
- added suppression of Varying patches to far/tutorial_6
- converted classes for stencils, tables and factories to templates
- added backward compatible class wrappers around new templates
- extended PatchTable to support variable precision stencil tables
- extended PatchTableBuilder to manage PatchTable's new stencil tables
- templated PatchTableBuilder conversion from SparseMatrix to stencils
- extended public PatchTableFactory interface to specify precision
- converted PrimvarRefiner class to template and added wrapper class
Fixed the method signature of the internal limitFVar method to make
the dst argument a reference rather than a pointer to be more consistent
with earlier changes for other primvar classes. This also makes it
easier to use the public template LimitFaceVarying method to operate
on a wider range of primvar container types.
- retained precision of constants in Sdc Catmark scheme
- improved precision of constants & intermediate values in Sdc Loop scheme
- improved precision of constants & intermediate values CatmarkPatchBuilder
- converted all internal Far patch basis evaluation to templates
The issue is that FeatureMask structure has size of an integer, but only
first 11 bytes are initialized, the rest is left non-initialized to a
stack memory of RefineAdaptive(). This will cause issues with IsEmpty()
which check whether any of integer's bits are set, effectively causing
jumps dependent on a non-initialized memory.
- new PatchTableBuilder class now implements PatchTableFactory::Create()
- population of tables now independent of scheme or patch type
- nested LocalPointHelper handles local point sharing and stencils
- new PatchBuilder class encapsulates patch queries and conversions:
- provides patch types associated with schemes and client options
- handles all topological queries about patches in the base class
- subclasses for the three subdivision schemes to support conversions
- conversions encapsulated in new SparseMatrix class for re-use
- removed Far end-cap factory classes and Far::GregoryBasis
- extended adaptive refinement to support Bilinear scheme (not enabled)
- extended Vtr::StackBuffer to avoid compiler inefficiencies
Previously, Far::PatchTableFactory::computePatchParam() was
considering all faces with a face vertex count != 4 as
irregular. This was incorrect for triangle refinement as
was the calculation of the UV subface parametric offsets for
triangle subfaces.
This is foundational work for implementing full support
for Loop scheme patch tables. This fix also allows correct
decoding of the parameter mapping for triangles resulting
from uniform refinement of Loop scheme meshes.
Updated Metal patch shaders to resolve degenerate normals.
This fix was ported from the GLSL patch shader source.
Also, added missing inf sharp test cases to mtlViewer.
Updated HLSL patch shaders to resolve degenerate normals.
This fix was ported from the GLSL patch shader source.
Also, added missing inf sharp test cases to dxViewer.
- corrected assertion to use face-varying index offset instead of vertex
- added missing face-varying conditional when generateAllLevels set
- factored base-level index offsets into local options for clarity
- added Doxygen comments to describe overall indexing behavior
- modified Gregory patch shader to use existing Bezier patch evaluation
- rewrote Bezier patch evaluation to use intermediate bilinear points
- added detection and resolution of degenerate normal
- eval normal partials no longer uses Weingarten eqns (requires N != 0)
- updated normal partials to use differentiation/projection
Updated MtlComputeEvaluator documentation to be
consistent with the documentation for other compute
evaluator implementations and fixed missing or
incorrect doxygen tags.
Also, updated the overloads for the EvalStencils
and EvalPatches methods to account for 1st and
2nd derivative evaluation.
Most GL implementations support a maximum of 4 transform
feedback buffer bindings. With the addition of 1st and 2nd
derivative evaluation up to 6 bindings might be required,
i.e. dst, du, dv, duu, duv, dvv.
This change extends the GLXFB Evaluator interface to allow
a client to specialize the evaluator when it is known that
(at least) the 1st derivative and 2nd derivative outputs
are interleaved together into shared buffers.
When this option is used, the maximum number of transform
feedback buffer bindings can be reduced to 3 instead of 6.
Now that Far::LimitStencilTable and Far::PatchTable
support evaluation of 1st and 2nd derivatives the
Osd Evaluator API for evaluating stencils and patches
has been updated to match.
- added Far::PatchTableFactory::Options::generateLegacySharpCornerPatches
- legacy behavior of sharp patches at smooth corners preserved by default
- added corresponding option bit to Osd::MeshBits
- updated examples/glViewer with option
Noticed a few typos when browsing comments. Proceeded with a "manual
spell check", reading all comments and tweaking spelling, grammar,
punctuation.
Didn't bother with Hbr library.
Comments only, no functional changes.
Extended Far::StencilTableFactory to support the creation
of stencil tables for face-varying channels. We already
use stencil tables to compute local point face-varying values.
These changes allow a stencil table to be created which
refines face-varying primvar data for all refined points.
- extended smooth corner patch approximation to fvar and inf-sharp patches
- fixed assignment and refinement bugs for inf-sharp tags in fvar space
- fixed interpolation bug with Bilinear scheme and LINEAR_NONE option
- added public methods for fvar topology to Far::TopologyRefiner
- updated base level tagging to ignore the boundary interpolation option
- updated regression shape for edge-only to illustrate behavior
- updated regression shapes to favor default viewng direction of examples
The symbol OPENSUBDIV_GREGORY_EVAL_TRUE_DERIVATIVES
determines the method used to compute derivative weights
for Gregory basis patches.
Setting this symbol during CMake configuration (and
hence during C++ and shader compilation) will enable
the use of true derivative weights.
The default behavior is to use a simpler approximation
for consistency with earlier releases.
The methods which return arrays of FVarPatchParam have
been made plural, e.g. GetFVarPatchParams(), for consistency
with the other methods in PatchTable.
Also fixed a missing doxygen tag.
Far::LimitStencilTableFactory computes limit stencils using
patches from a Far::PatchTable, creating one temporarily if
necessary. This change propagates the useInfSharpPatch option
from adaptively refined topologies.
Recent CUDA SDKs no longer support the "compute_11"
gpu architecture. We now fallback to "compute_20"
instead for newer SDK versions. Additionally, this
behavior can be overriden using the new CMake list
variable OSD_CUDA_NVCC_FLAGS so that it is easier
for clients to target newer architectures and specify
additional arguments.
- added new public member to PatchTableFactory::Options
- replaced internal option with new public option
- updated tagging and Gregory conversion for sharp patches
Implemented EvalPatchesVarying and EvalPatchesFaceVarying
methods for Osd::*Evaluator classes, i.e. cpu, omp, tbb,
GLXFB, GLSLCompute, OpenCL, and CUDA.
Also, the GPU Kernel implementations have been updated to use
the common patchBasis implementation instead of re-implementing
methods to compute patch basis weights locally.
This is used to compute patch basis weights for
the Osd::*Evaluator classes that are unable to
use the C++ implementation from far/patchBasis.h,
e.g. the GLSL, HLSL, OpenCL, and CUDA kernels.
Instead of duplicating this code for each different
kernel language, we share a single implementation
which is minimally adapted to accommodate specific
language restrictions and syntax.
This implementation can also be used by client
shader code executed while drawing, e.g. to
compute patch basis weights for evaluating varying
and face-varying patches.
This was an obsolete relic from when PatchDescriptor
was more than a single enum value, but it can cause
problems when sharing patch descriptor values between
devices.
Also, marked the GetNumFVarControlVertices() method as
deprecated.
This reverts most of the recent changes to the
organization of Far::PatchParam. In particular,
the core parameterization is no longer exposed
as a speparate PatchParamBase class.
We'll revisit this again in a later release, but
for now we will stick with a more straight
forward implementation.