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.
This change updates the Far::LimitStencilFactory to
to support options to generate 1st and 2nd derivative
limit stencil weights.
For backward compatibility, the option to generate 1st
derivatives defaults to true. While for efficiency,
the option to generate 2nd derivatives defaults to false.
Also, updated the Far::LimitStencil class to expose
computed 1st and 2nd derivative limit stencil weights.
- added flag to consider features in face-varying channels
- added flag to reduce refinement for infinitely sharp patches
- added secondary isolation level to reduce refinement of smooth features
- updated face-varying VTag conversion to set VTag::_corner correctly
- updated adaptive refinement to prevent over-isolation of inf-sharp features
- fixed patch regularity test when inf-sharp and xord features not separated
at level 0 or 1
- generalized BSpline end-cap factory boundary test to defer to Gregory patch
for any non-smooth corner
- extended FeatureMask class with more extensive set of features
- added FeatureMask methods to convert AdaptiveOptions to features
- updated RefineAdaptive() with simplified FeatureMask creation
- extracted core face selection to simple local functions using FeatureMasks
- created separate face selection for face-varying channels
- extracted inf-sharp feature selection for use by vertex and FVar selection
- changed Level::VSpan start member from edge to face local index
- added additional Level::VSpan members for non-manifold cases
- updated existing usage of Level::VSpan for new members and methods
- moved and updated definition of FVarLevel::ValueSpan for clarity
- removed unused tag for inf-sharp features from Vtr::Level::VTag
- added tags for inf-sharp features to Vtr::FVarLevel::ValueTag
- updated the conversion from ValueTag to VTag
- removed awkward and little used tagging methods from Vtr::FVarLevel
- replaced obsolete methods in face-varying adaptive refinement
- changes mainly involve Far::PatchTableFactory
- treatment of patches more clearly separated into regular and irregular
- patch identification now determines regularity and defers classification
- topology inspection specialized for regular vs irregular patches
- face-verying patches re-use patch information when topology matches
- added Vtr::Level methods to improve access to tags for face-varying values
- improved initial tagging of face-varying values in Vtr::FVarLevel
The patches generated for a face-varying channel can be a
mix of regular patches and patches in an alternate basis
for faces that are irregular in face-varying space.
This mix of patches is packed into a single fvar value array
in the patch table using a consistent stride with the individual
patch type determined by the fvar patch param encoding.
- Added Far::PatchParamBase::IsRegular() to designate which
patches are regular.
- Updated Far::PatchTableFactory to gather mixed basis
patches when using the Gregory basis approximation for
irregular patches.
- Fixed Far::PatchTable::EvaluateBasisFaceVarying() to
use the fvar patch param encoding to determine the type
of face-varying patches.
Updated Far::PatchTableFactory to be able to populate patches
for smooth evaluation of face-varying data channels.
- Moved computePatchTag() method to BuilderContext
- Added computeFVarPatchTag() method to BuilderContext
- Use Vtr::Level::VSpan to represent the partial ring
around vertices for face-varying patches.
- Added the option generateFVarLinearPatches (defaults
to true) to support the legacy behavior of generating
linear patches for face-varying data channels regardless
of the underlying face-varying linear interpolation modes.
These methods now compute the patch basis in terms
of Far::PatchParamBase instead of Far::PatchParam
This allows these methods to be more easily reused
for evaluating patches for face-varying data.
This refactoring of Far::PatchParam maintains source
compatibility with earlier releases while allowing the
core patch parameterization to be reused for patches
from face-varying channels.
This introduces a new internal interface class named
Far::PatchParamInterface which provides an interface to
the core patch parameterization and which is implemented
by both Far::PatchParamBase and Far::PatchParam.
Added significant documentation detail to this new
interface class as well as two new methods
MapRefinedToCoarse() and MapCoarseToRefined()
in favor of the now deprecated Normalize().
The parameterization of irregular faces is offset by one level
of refinement from the parameterization of regular faces. This
matches the parameterization used for Ptex texture mapping onto
irregular faces.
This was expressed awkwardly during the assigment of values to
Far::PatchParam, where we pre-decremented the refinement level
for non-quad patches in order to compensate for the incorrect
pre-increment of the refinement depth value stored for non-quad
patches.
In order to support a consistent API for refinement and
evaluation of varying primvar data, Far::PatchTable needs
to provide indices for varying data. This adds support to
Far::PatchTableFactory for generating these indices.
- 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 support for gathering face-varying patch points to
the Far::EndCap*PatchFactory classes. Also, changed these classes
to compute varying stencils optionally, since separate varying
stencils are not needed for face-varying patches.
Also, removed a no longer used stateless factory method from
the EndCapGregoryBasisPatchFactory.
Re-organized the implementation of the patch table factory
in advance of adding support for bicubic face-varying patches.
- Renamed the AdaptiveContext internal class to BuilderContext
since this can be used (eventually) to build patch tables for
uniformly refined topology as well as adaptively refined
topology.
- Added utility methods to gather patch vertices from the
levels (and eventually fvarLevels) of a refiner.
- Replaced the FVarChannelCursor with a simpler array of integer
face-varying channel indices.
- Extracted the topology inspection needed to identify
patches into a computePatchTag() method.
- Simplified the two-pass traversal of the topology into a
single pass traversal of the refined topology followed by
an iteration over the patches that have been identified.
- Replaced internal templated PatchTypes class with simpler
and more direct accounting and patch array building facilities.
- Changed the API of the end cap patch factories to no longer
depend on the patch table factory's PatchFaceTag. This has
been superseded by the specification of appropriate
VSpans at the corners of the end patch.
- added new Vtr::Level::VTag members for inf-sharp features
- updated Vtr::Level::print() to recognize new tags
- explicitly initialized tags for new edge-verts in Vtr::Refinement
- initialized tags for base level verts in Far::TopologyRefinerFactory
This change updates Far::PatchTable to include support for
evaluating varying and face-varying data on patches.
This adds to existing API and follows the existing patterns
used for vertex patches.
This includes data and methods to evaluate varying and
face-varying basis functions as well as methods to compute
local point values for varying and face-varying primvar data.
This is the foundation for updating Far::PatchTableFactory
to generate bicubic patches for face-varying channels.
- removed PatchTableFactory assert that irreg patches exist at last level
- fixed Gregory end cap Factory to accomodate irreg patches at any level
- parameterized adaptive refinement for differing feature sets per level
- 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
An earlier change improved transient memory used during the construction
of end cap stencil tables but could leave unused capacity in the internal
containers of the resulting stencil tables. This change adds an additional
internal factory helper method which trims this storage.