Commit Graph

614 Commits

Author SHA1 Message Date
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
manuelk
de4564a779 Fix parametric rotation in Far::PatchParam for Gregory Boundary patches (always 0) 2014-09-30 18:13:51 -07:00
barfowl
09e5e5fefa Fixed missing initialization of Vtr::Level::VTag._incomplete. 2014-09-30 17:19:03 -07:00
barfowl
4a11e39f2c Added initialization of Vtr::Level::VTag._incomplete in refiner factory. 2014-09-29 18:48:24 -07:00
barfowl
606e8fc1b9 Added support for face-varying boundary interpolation options:
- "propagate corners" added as new enumeration to Sdc::Options
    - topology tags within FVar channel initialized and propagated
    - face-varying Interpolate() method updated to deal with creases
2014-09-29 18:46:33 -07:00
manuelk
aacd43a09b Add a function to Far::TopologyRefiner to gather ptex adjacency for a given face / quadrant pair
- also refactor Vtr::Array 'FindIndex' functions
2014-09-26 15:10:57 -07:00
manuelk
19ed202965 Pass control vertices by reference to Far::PatchTables::Limit<>() function
This will allow overriding the [] operator and possibly help refactor the far stencil factory code
2014-09-24 15:15:22 -07:00
manuelk
be679dde3f Fix compile warning in Far::StencilTablesFactory 2014-09-24 14:49:51 -07:00
barfowl
99a4b112b7 Fixed ICC warning regarding inline declaration after usage. 2014-09-24 14:06:18 -07:00
barfowl
ab5e2e8d4e Removed dead code from sparse selection and feature adaptive refinement:
- removed old alternative to Catmark feature adaptive selection
    - removed unused methods from Vtr::SparseSelector
    - made use of Level::VTag's new "incomplete" member in both
2014-09-23 18:24:29 -07:00
barfowl
8cb4a1c8ad Fixed issues with refined topology not correctly oriented around vertices:
- Refinement methods to populate relations updated to order correctly
    - updated topology validation method in Level
2014-09-23 17:37:33 -07:00
manuelk
82e7a1bcc5 Minor EvalLimit naming refactor
- also added some additional animation to the glEvalLimit code example
2014-09-22 16:01:43 -07:00
manuelk
788880aeba Minor code cleanup / typo fixes in Far::PatchTables 2014-09-22 13:51:59 -07:00
manuelk
f7b21b941c Add far_tutorial_6 showing how to interpolate primvar data on the surface
limit at arbitrary locations.
2014-09-22 13:51:59 -07:00
barfowl
09789296d9 Modified weighting of sharpness values for Chaikin crease method:
- semi-sharp edges prevented from decreasing by averaging with inf-sharp
    - averaging now includes only semi-sharp edges around the vertex
    - see regression/shapes/catmark_chaikin2
2014-09-18 19:13:55 -07:00
manuelk
d02bfc48d2 WIP on LimitStencilTablesFactory
- added an option to Far::StencilTablesFactory to generate stencils for
  coarse control vertices
- refactored interpolation code out into Far::PatchTables
- corrected tangent interpolation
- code cleanup & comments
2014-09-18 17:48:34 -07:00
manuelk
4dd366593d WIP FarLimitStencilsFactory
- bi-cubic patches should be mostly covered, although portions of the interpolation code
  need to be refactored out into Far::PatchTables as vertex templated functions (following
  patterns established in the Far::TopologyRefiner)

- end-cap patches still have to be done (prob. going to drop Gregory in favor of bilinear)

- Presto needs a fully bilinear code path (no patches) - really ???
2014-09-17 17:53:38 -07:00
Nathan Litke
c355dc1060 Added a comment in PatchTablesFactory::createUniform to explain that options.triangulateQuads may only be set to true for quadrilateral refinement schemes. 2014-09-17 13:51:12 -07:00
manuelk
ad402d3623 Fix inconsistent file access permissions 2014-09-17 13:45:50 -07:00