Commit Graph

2137 Commits

Author SHA1 Message Date
barry
9832e11939 A few bug fixes and minor improvements for inf-sharp patches:
- 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
2016-09-26 19:14:42 -07:00
Takahito Tejima
de3a781537 Merge pull request #852 from barfowl/inf_adapt_refine
Extended adaptive refinement for inf-sharp patches and simplified
2016-09-23 17:34:46 -07:00
barry
bbd857f52d Revised adaptive refinement to use inf-sharp tags and feature masks:
- 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
2016-09-23 08:20:36 -07:00
Takahito Tejima
36feeb37df Merge pull request #851 from barfowl/vspan_members
Improved internal span types for support non-manifold cases
2016-09-22 10:30:15 -07:00
barry
c17b241293 Improved internal span types for better non-manifold support:
- 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
2016-09-19 14:18:51 -07:00
George ElKoura
831e2092dd Merge pull request #850 from barfowl/fvar_tags
Minor updates to tags for face-varying and inf-sharp topology
2016-09-16 17:33:15 -07:00
barry
89c1765c73 Minor updates to tags for face-varying and inf-sharp topology:
- 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
2016-09-15 23:03:48 -07:00
Takahito Tejima
d6c2d7c095 Merge pull request #848 from barfowl/inf_sharp_patch
Updated Far::PatchTableFactory to construct infinitely-sharp patches
2016-09-09 18:40:59 -07:00
Takahito Tejima
afda004089 Merge pull request #847 from davidgyu/release_cleanup3
Fixed compile warnings in ptex examples on macOS
2016-09-09 18:40:49 -07:00
barry
d2b6505867 Updated Far::PatchTableFactory to recognize patches along inf-sharp edges:
- updated core patch construction methods to recognize inf-sharp option:
        - updated patch regularity test
        - updated regular patch boundary mask query
        - updated irregular patch corner span query
    - added irregular patch corner query when populating patches
2016-09-08 21:18:11 -07:00
David G Yu
b49d40100d Fixed compile warnings in ptex examples on macOS 2016-09-06 23:24:46 -07:00
George ElKoura
46fac4324d Merge pull request #845 from davidgyu/release_cleanup1
Removed cmake/FindIlmBase.cmake
2016-09-06 18:24:03 -07:00
George ElKoura
6982334140 Merge pull request #846 from davidgyu/release_cleanup2
Removed mayaPolySmooth example
2016-09-06 18:23:36 -07:00
David G Yu
1bf107fc3b Removed cmake/FindIlmBase.cmake
This has been unused within the OpenSubdiv project for a long time.
2016-09-06 17:11:27 -07:00
David G Yu
8babf1e12b Removed mayaPolySmooth example
Also removed the remaining Maya dependencies. These
were most useful during the early days of OpenSubdiv.
Now OpenSubdiv has been integrated directly into Maya
and these examples serve little purpose.
2016-09-06 17:08:05 -07:00
David G Yu
da07d232f3 Merge pull request #841 from barfowl/fvar_gregory
Enabled point sharing for face-varying Gregory patches
2016-09-03 17:41:56 -07:00
barry
2983f1dc2e Enabled point sharing for face-varying Gregory patches:
- added detection of face-varying boundaries in Gregory patch factory
    - re-enabled the "share points" option in PatchTableFactory
2016-09-03 17:27:50 -07:00
David G Yu
8d23b16b0b Merge pull request #840 from barfowl/fvar_patch_table
PatchTableFactory improvements for face-varying patches
2016-09-02 21:20:18 -07:00
barry
653801588e Improved topology inspection and construction of face-varying patches:
- 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
2016-09-02 20:53:24 -07:00
barfowl
e14485e4a8 Merge pull request #837 from davidgyu/patch_table_fvar_mixed
Improved PatchTableFactory for mixed FVar patches
2016-08-31 14:06:45 -07:00
David G Yu
ab36c3b64f Improved PatchTableFactory for mixed FVar patches
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.
2016-08-31 13:05:55 -07:00
barfowl
a3ef235e94 Merge pull request #836 from davidgyu/patch_fvar
PatchTableFactory changes for smooth FVar patches
2016-08-25 11:45:35 -07:00
barfowl
e8cca70915 Merge pull request #835 from davidgyu/patch_param_base
Refactored Far::PatchParam
2016-08-25 11:33:39 -07:00
barfowl
a1d3879854 Merge pull request #834 from davidgyu/patch_table_varying
Populate varying vertices in Far::PatchTable
2016-08-25 10:43:56 -07:00
David G Yu
7b85c6b7ef PatchTableFactory changes for smooth FVar 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.
2016-08-25 00:14:10 -07:00
David G Yu
30c19bea2c Fixed a typo in TopologyRefiner::RefineAdaptive 2016-08-24 23:57:18 -07:00
David G Yu
da5cf5f7ae Updated EndCapBsplineBasis conversion for fvar
For now, face-varying patch conversion to BSpline
basis for irregular patches will always use the
Gregory basis conversion.
2016-08-24 23:57:11 -07:00
David G Yu
6ae049e79c Updated Far internal patch basis methods
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.
2016-08-24 23:55:49 -07:00
David G Yu
9d787d9af5 Refactored Far::PatchParam for better reuse
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().
2016-08-24 23:55:43 -07:00
David G Yu
8b302f652e Cleaned up Far::PatchParam initialization
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.
2016-08-24 19:51:35 -07:00
David G Yu
aad523a4d7 Populate varying vertices in Far::PatchTable
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.
2016-08-24 19:48:03 -07:00
David G Yu
d3323e8cc7 Merge pull request #833 from barfowl/gregory_patch_cleanup2
Clean up Gregory patch conversion in preparation for future work
2016-08-23 22:14:00 -07:00
barry
60df0a9bdb Fixed int-to-float conversion warning for MSVC 2016-08-23 17:19:55 -07:00
barry
6d5f8fb6b3 Clean up Gregory patch conversion in preparation for further refactoring:
- 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
2016-08-22 10:55:20 -07:00
barfowl
421afbc6e8 Merge pull request #830 from davidgyu/patch_table_fvarendcaps
Updated Far::EndCap*PatchFactory for fvar patches
2016-08-05 19:21:09 -07:00
barfowl
b4694fcf53 Merge pull request #829 from davidgyu/patch_table_builder_fix
Fixed packing of regular patches
2016-08-05 19:10:33 -07:00
David G Yu
53d80e0d2f Updated Far::EndCap*PatchFactory for fvar patches
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.
2016-08-05 19:08:04 -07:00
David G Yu
4c558d34a4 Fixed packing of regular patches
The case where refinement produces no regular
patches was not being accounted for correctly.

Also, fixed the spelling of PatchTupleVector.
2016-08-05 19:03:52 -07:00
barfowl
8b885eeda6 Merge pull request #828 from davidgyu/patch_table_builder
Looks good -- glad to see this taking shape.  I'll leave you to correct the spelling of "PatchTuppleVector" in a later set of changes ;)
2016-08-05 17:54:27 -07:00
David G Yu
35d8519895 Refactored Far::PatchTableFactory
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.
2016-08-05 12:38:05 -07:00
David G Yu
4da88a8503 Merge pull request #826 from barfowl/inf_sharp_tags
Added new vertex tags to identify infinitely sharp features
2016-07-21 09:02:34 -07:00
David G Yu
b63c267888 Merge pull request #825 from barfowl/bspline_factory
Update BSpline end cap factory to detect partial rings at corners
2016-07-20 20:35:43 -07:00
barry
a9ecd79c32 Added new VTags for inf-sharp features:
- 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
2016-07-20 16:16:52 -07:00
barry
47934add68 Update BSpline end cap factory to inspect partial neighborhoods at corners
- any partial neighborhood at a corner warrants use of Gregory patch
    - make use of corner tags for other tests rather than revisiting topology
2016-07-20 15:55:17 -07:00
Takahito Tejima
1e625e690e Merge pull request #824 from davidgyu/patch_table_api
Updated PatchTable for Varying and Face-Varying
2016-07-20 11:40:24 -07:00
David G Yu
fc12816d97 Updated PatchTable for Varying and Face-Varying
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.
2016-07-20 10:44:45 -07:00
David G Yu
d96c0964cd Merge pull request #823 from barfowl/xord_isolation_level
Add internal support for separate levels of refinement for different features
2016-07-19 17:23:22 -07:00
barry
20d7ed5d79 Fixed MSVC warning regarding int to bool conversion 2016-07-19 10:53:17 -07:00
barry
61aedddd3e Added support for separate isolation levels of adaptive refinement:
- 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
2016-07-19 10:05:15 -07:00
David G Yu
559de9a9c1 Merge pull request #760 from dcclyde/subdcloth
Teach the LimitStencilTable to compute 2nd partial derivatives
2016-07-18 16:16:21 -07:00