Commit Graph

632 Commits

Author SHA1 Message Date
barfowl
43b843e8a7 Fixed bug tranferring new face-weight tag when blending MASKS in Scheme. 2014-11-18 11:51:21 -08:00
manuelk
49848139f4 Fix build warning in Far::PatchTables::Interpolate<>() method 2014-11-18 11:10:13 -08:00
manuelk
6a2b966f6e WIP on end-cap topology generation
- 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
2014-11-18 10:48:37 -08:00
manuelk
0513ef1461 Fix build virtual destructor warning in Vtr::Refinement 2014-11-17 18:14:32 -08:00
manuelk
2b6e8432bd Fix build warning in Sdc::LoopScheme 2014-11-17 18:05:00 -08:00
barfowl
5cb12805ca Added refinement and masks for Loop subdivision:
- added flag to Sdc MASK interface to interpret "face weights"
    - updated Catmark and Bilinear schemes to be aware of new MASK flag
    - added subdivision and limit masks for the Loop scheme
    - subclassed Vtr::Refinement into QuadRefinement and TriRefinement
    - updated tagging of components to be sensitive to applied scheme
    - fixed some quad assumptions in FVar refinement to support N-sided
    - internally generalized ::TopologyRefiner Interpolate() for <SCHEME>
2014-11-17 17:19:30 -08:00
manuelk
ba81be4729 Fix Far::GregoryBasisFactory to check that input is not empty 2014-11-14 12:44:28 -08:00
manuelk
854dfac3ca Fix Far::StencilTablesFactory tables concatenation operator
- stencil sizes were omitted from the copy resulting in unusable tables
2014-11-14 12:41:53 -08:00
manuelk
86b532059e Fix bug in Far::PatchTables::IsFeatureAdaptive()
- now the function properly accounts for tables that only have Gregory-basis type
  of end-cap patches
2014-11-13 18:31:14 -08:00
manuelk
5254fd58e7 Add StencilTables factory for tables concatenation 2014-11-13 14:03:21 -08:00
manuelk
2fbdb976e3 Fix doxygen documentatino for Far::PatchTables 2014-11-13 10:28:31 -08:00
manuelk
9158a430ac Fix Far::PatchTables control vertex indexing to use 4 CVs to represent the 0-ring
- we were allocating 20 CVs for the Gregory basis, but only need 4
 (the 20 CVs are stored in the stencil table)
2014-11-12 13:20:55 -08:00
manuelk
e8210886a8 Extend stencil-driven Gregory basis code support to Osd::EvalLimit (cpu) 2014-11-11 17:35:52 -08:00
manuelk
abae4459e6 Adding support for gregory patches limit interpolation to Far::PatchTables
note: limit interpolation requires stencil-driven Gregory basis CVs
2014-11-11 11:27:25 -08:00
barfowl
dc27d303ac Reorganized/cleaned up Vtr::Refinement in preparation for adding tri-splitting:
- reorganized Refinement methods and pruned excessive comments
    - removed and added assertions related to Catmark scheme
    - added code to support alternate refined vertex ordering
    - updated FVarRefinement to be more independent of vertex ordering
    - updated Far::TopologyRefiner to fix face-varying ordering dependencies
    - fixed a few miscellanous compiler warnings
2014-11-09 13:25:09 -08:00
manuelk
c237ab00fc WIP check-point for Gregory basis factorization
- 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)
2014-11-04 11:14:21 -08:00
barfowl
c2fa2616d2 Fixed bug in retrieval of FVar values for edge pair incident an N-sided face. 2014-11-03 19:56:31 -08:00
barfowl
5ccd94c6d2 Reordered refined face-varying values so those for each vertex are sequential:
- added array accessors to properties of vertex values in vtr::FVarLevel
    - updated construction of base level face-varying topology
    - simplified population of face-varying properties in vtr::FVarRefinement
    - updated Far::TopologyRefiner::Interpolate/LimitFaceVarying() accordingly
2014-11-03 17:31:24 -08:00
manuelk
17c682f055 WIP check-in for Gregory basis
Adding functionality to support the generation of stencils for the 20 CVs
basis of Gregory patches. This is still very rough... expect changes.
2014-10-31 17:07:45 -07:00
manuelk
82a53c4278 Fix bug in cpuEvalLimitKernel.cpp
apparently an offset to a basis vertex was incorrectly set
2014-10-31 17:06:34 -07:00
manuelk
af040c62cc Fix Far::StencilTables batch evaluation bug
Setting start/end values of UpdateValues() produced incorrect primvar interpolation
because the stencil sizes array was not shifted properly to the 'start' location of
the batch.
2014-10-29 15:52:07 -07:00
manuelk
cc2e338ef6 Refactor Far::StencilTables and factories
- minor code cleanup (style consistency)
- move proto-stencil code out of the stencil factory
  in anticipation of Gregory stencils implementation
2014-10-29 10:53:17 -07:00
barfowl
69e6da8fab Fixed face-varying cases where the sharpness of values are inter-dependent:
- added ValueTag indicating sharpness dependency on another value
    - updated base level tagging to identify dependent semi-sharp values
    - updated refinement to consider dependency when reassessing semi-sharpness
    - updated interpolation to use dependent fractional weight when necessary
2014-10-24 16:15:22 -07:00
manuelk
5f810a0f8e Add support for 'hole' faces
- adaptive mode: remove faces tagged as holes from the selection of faces to isolate

- uniform mode: faces tagged as holes are still included in the refinement process,
                however they are removed from patch tables

- future improvements: add a 'selective refinement' code path separate from 'uniform refinement'
  to handle this case without un-necessary subdivision work.
2014-10-24 13:52:40 -07:00
David G Yu
68ce13eeec Fixed rotation for patches with 3 transitional edges. 2014-10-24 11:03:55 -07:00
David G Yu
1e00056d8a Improved stability on OSX drivers by not declaring unused shader in/out vars. 2014-10-23 15:59:05 -07:00
David G. Yu
b11d5e22f0 Fixed d3d11 and gl mesh wrappers to be
consistent wrt the MeshInterface API.
2014-10-23 13:45:57 -07:00
David G. Yu
6cc24d32fd Fixed missing namespace closing brace. 2014-10-23 13:43:45 -07:00
David G. Yu
fce3dcca00 Fixed vec array initializer. 2014-10-23 13:41:27 -07:00
manuelk
f4c2f8d9e1 Fix Windows build of Osd OMP CPU kernel
note: we #include <vector> instead malloc.h for portability
2014-10-23 12:07:12 -07:00
manuelk
f1ac01ca84 Fix Far::StencilTablesFactory introduced in re-factor
- big stencil initialization was incorrect
2014-10-22 11:57:49 -07:00
manuelk
f145f70fd2 Refactor Far::StencilTablesFactory
- re-implement the pool allocator
    - use templates to remove code redundancy between regular & limit stencils
    - leverage [] operator overloading to simplify stencil factorization
    - add the ability to treat subdivision levels independently (see below)

- refactor Far::TopologyRefiner::Interpolate<>() methods to pass buffers by reference
  (allows overloading of [] operator)

- rename some of the stencil factory options
- propagate changes to Osd / examples / tutorials...
2014-10-21 16:36:26 -07:00
manuelk
a16d558a3e Fix GLSL compute code version defintion
- remove #version declaration from the kernel code
- move it in front of shader sources before compiling to prevent some drivers from throwing errors

fixes #360
2014-10-20 18:09:30 -07:00
barfowl
adefbb62b5 More adjustments in TopologyRefiner for levels and refiments as ptrs:
- now incrementally allocates and appends during refinement
    - updated a few more access of member vectors
2014-10-15 11:22:32 -07:00
manuelk
cb68da95cc Fix TopologyRefiner crash bug
Cause: std::vector.resize() function invalidates Vtr::Level pointers held by FVarLevel

Fix: switch std::vector<Vtr::Level> to std::vector<Vtr::Level *> and cycle through
the vector with appropriate new/delete.
2014-10-14 18:59:05 -07:00
barfowl
df23812759 Added proper fractional weighting for semi-sharp FVar boundaries:
- semi-sharp edges interior to FVar regions now properly recognized
    - added clear() method to FVar tags and reworked their initialization
2014-10-13 12:17:25 -07:00
Takahito Tejima
16746f1a0c Fix bad uv rotations on single-crease patch 2014-10-13 10:33:34 -07:00
Takahito Tejima
c0907c7bc1 Introduces 'single-crease patch' : implements "Efficient Evaluation of Semi-Smooth Creases in
Catmull-Clark Subdivision Surfaces", Niessner et al, Eurographics 2012.

This change includes;
-topology identification for single-crease patch during adaptive refinement.
-patch array population (similar to boundary)
-sharpness buffer generation
-glsl shader

Eval stuffs will be coming.
2014-10-13 08:52:09 -07:00
barfowl
4d84dfd7be Redefined face varying "boundary interpolation" to "linear interpolation":
- redefined and documented Sdc::Options::FVarLinearInterpolation
    - included "corners only" mode not possible with Hbr
    - updated usage within Vtr::FVarLevel
2014-10-09 19:36:25 -07:00
manuelk
cea1dd1880 Change FarStencilTables indices from 'unsigned int' to Far::Index type 2014-10-09 16:36:23 -07:00
manuelk
a79832b3a1 Far::PatchTables re-factor & clean-up
- remove Descriptor iterators
- switch 'unsigned int' indices to typed Far::Index

We aren't done yet... but its a step in the right direction
2014-10-09 14:48:50 -07:00
barfowl
62b76d9c2e Fixed improperly initialized ValueTags in FVarLevel. 2014-10-06 17:18:00 -07:00
barfowl
f706062ab1 Added support for semi-sharp features along face-varying boundaries:
- added semi-sharp tag to FVar ValueTags and applied in base FVarLevel
    - re-assess status of tagged semi-sharp values in each FVarRefinement
    - detect and apply fractional weighting in InterpolateFaceVarying()
2014-10-06 12:07:44 -07:00
manuelk
639788abbe Fix vec array initialization in GLSL & HLSL (should fix some DX compiler problems)
Fixes #354
2014-10-04 16:22:43 -07:00
manuelk
3fc60389cd Fix build warning in Far::StencilTablesFactory (MVSC) 2014-10-03 17:54:30 -07:00
manuelk
d3fa91deaa Fix incorrect assert in Osd::DrawContext 2014-10-03 10:35:00 -07:00
barfowl
75ee14e974 Minor improvements to TopologyRefiner's Interpolate() and Limit methods():
- rearranged weight application in all to improve precision
    - added LimitFaceVarying()
2014-10-03 10:07:05 -07:00
manuelk
43493bb9ae Add support for bilinear stencils to the FarLimitStencilsFactory
- also update glSencilViewer code example to visualize the new stencil type
2014-10-02 16:09:17 -07:00
barfowl
34f397c52b Checking in work-in-progress on face-varying boundary interpolation:
- added more recognition of Hbr behavior
    - refactored smooth boundaries to identify continuous spans
    - mark spans as sharp corners if interrupted by internal dart edge
2014-10-02 14:32:54 -07:00
manuelk
b48da0d6c6 Fix doxy build warning on the new ptex adjacency function 2014-09-30 18:53:14 -07:00