Commit Graph

873 Commits

Author SHA1 Message Date
barfowl
ce223949f2 Introduced StackBuffer class to replace/extend usage of alloca():
- add Vtr::StackBuffer to allocate from heap beyond local arena size
    - replaced usage of alloca() with Vtr
2015-04-26 17:04:18 -07:00
Takahito Tejima
1fab11b2b4 Merge pull request #441 from davidgyu/patch-drawing
Fixed orientation of boundary and corner patches
2015-04-24 23:00:51 -07:00
Takahito Tejima
4d0bd75067 Merge pull request #440 from asluk/dev
retain vertex 0 for lefthanded meshes
2015-04-24 22:27:36 -07:00
George ElKoura
63dd4f7f40 Fix ptex indices computations for loop.
The only method not yet implemented for loop in PtexIndices is GetAdjacency(), fix code accordingly.
2015-04-24 16:08:37 -07:00
David G Yu
f19a41105d Fixed orientation of boundary and corner patches
Now a boundary and corner patch remains
aligned with its underlying parametric
orientation. This simplifies both the
gathering of patch vertices and downstream
evaluation of patches.

Added a method to Vtr::Level which gathers
the 16 patch points for a B-spline patch
even if the patch has boundary or corner
edges.  The undefined patch vertex index
values along boundary and corner edges are
assigned Vtr::INDEX_INVALID.

In order to simplifiy the process of drawing
B-spline patches with boundary or corner
edges, the Far::PatchTablesFactory will
replace any invalid vertex indices with
a known good value, i.e. the index of the
first patch face vertex.

Single-crease patches are still a slightly
special case, which will be resolved later.
2015-04-24 15:33:04 -07:00
barfowl
0608230c7b Completed general limit tangent masks for Catmark:
- added general formulae for both Smooth and Crease tangent masks
    - further documented expectations of tangent masks in sdc/scheme.h
2015-04-24 14:36:38 -07:00
asluk
4e22fe0f69 Fix new off-by-one error in facevarying channels for lefthanded meshes. 2015-04-24 11:42:58 -07:00
asluk
ed07ed6a8f Merge remote-tracking branch 'upstream/dev' into dev 2015-04-23 21:23:29 -07:00
Takahito Tejima
74b78b3d17 Refactor again FarPatchTableFactory.
- rename "Regular end cap" to "BSplineBasis end cap"
- revert templating and add EndCapType into PatchTablesFactory::Options.
- make EndCapFactories internal in PatchTablesFactory.
- move end cap stencils into PatchTables, keep them relative to the max level.
- add a utility StencilTablesFactory::AppendEndCapStencilTables to splice and factorize endcap stencil tables.
2015-04-23 16:58:56 -07:00
asluk
c813d4b3a9 Retain initial vertex when reversing winding order for lefthanded meshes.
Add lefthanded mesh to vtr regression suite.
2015-04-23 12:01:15 -07:00
George ElKoura
0371a3aa5f Renamed methods on Far::PtexIndices.
GetNumPtexFaces() became GetNumFaces()
GetPtexIndex() became GetFaceId()
GetPtexAdjacency() became GetAdjacency()
2015-04-21 22:23:22 -07:00
George ElKoura
bded4cb075 Small clean up to how we validate the refiner when we build a PtexIndices. 2015-04-21 22:08:26 -07:00
George ElKoura
fcc1971767 Added an informative error check when passing in a refiner with an incompatible scheme to build PtexIndices. Also fixed an assert to not check for an explicit scheme type, and use traits instead. 2015-04-21 21:06:52 -07:00
George ElKoura
1ea3ec7958 Fixing comments. 2015-04-21 17:46:55 -07:00
George ElKoura
420473b45b Experiment separating out Ptex from TopologyRefiner.
Remove the ptex-specific code from the Far::TopologyRefiner and instead provide it in a separate class Far::PtexIndices.  Clients who need to use the Ptex API need to first build a Far::PtexIndices object by providing it with a refiner.

This has the advantage of keeping the API on the TopologyRefiner a little cleaner.  The ptex methods were const but were mutating state with const_casts.  The new mechanism still achieves the same lazy initialization behavior by forcing clients to instantiate them exactly when needed.

A disadvantage of this approach is that the PatchTablesFactory creates its own PtexIndices and throws it out after the patch tables are created.  This is great if you're never going to need the ptex indices again, but not so great if you will need them again.
2015-04-21 17:34:02 -07:00
David G Yu
7d9dcf8c03 Added a new screen-space adaptive tessellation metric which
computes edge lengths using limit surface points. Made this
the default screen-space metric so that we avoid cracks when
using Gregory Basis or Regular B-spline end caps.

The alternative method which computes edge lengths using the
distance between B-spline control points is still available.

Added a diagram and comments to explain how the control
points and limit points are organized.
2015-04-21 14:17:29 -07:00
Takahito Tejima
43aa2500c4 Refactor far factories.
This change moves all gregory patch generation from Far::PatchTablesFactory
so that we can construct patch tables without stencil tables as well as client
can chose any end patch strategies (we have 3 options for now: legacy 2.x style
gregory patch, gregory basis patch and experimental regular patch approximation).

Also Far::EndCapGregoryBasisPatchFactory provides index mapping from patch index
to vtr face index, which can be used for single gregory patch evaluation on top
of refined points, without involving heavier stencil tables generation.
2015-04-20 18:59:07 -07:00
Jeremy Cowles
2c3f519092 Merge pull request #425 from asluk/dev
Fixed off-by-1 error for lefthanded meshes in facevarying channels.
2015-04-18 21:43:27 -07:00
David G. Yu
9f1da077e8 Updated HLSL shaders for unified patch drawing 2015-04-18 14:08:53 -07:00
David G. Yu
cb689194ab Fixed windows build errors. 2015-04-17 18:29:56 -07:00
asluk
d164fb4650 Fixed off-by-1 error for lefthanded meshes in facevarying channels. 2015-04-17 18:14:59 -07:00
Takahito Tejima
c58e63c8d5 Refactor single crease patch to be in unfined shader. 2015-04-17 16:26:57 -07:00
Takahito Tejima
3d66bd449d Fixed boundary patch rotation flag 2015-04-17 15:43:33 -07:00
Takahito Tejima
aec1f61fb0 Merge pull request #422 from davidgyu/patch-drawing
Unified adaptive patch drawing
2015-04-17 15:39:37 -07:00
David G Yu
336fbb6748 Removed some more obsolete transition patch state
Temporarily disabled fractional tessellation for Gregory patches.
2015-04-17 15:24:48 -07:00
David G Yu
759513d2dc Fixed adaptive tessellation and removed debug code 2015-04-17 12:04:21 -07:00
David G Yu
010a31efc4 Checkpoint changes to unify adaptive patch drawing. 2015-04-17 07:42:53 -07:00
Jeremy Cowles
6efe3e0bce Merge pull request #418 from asluk/dev
osd3 support for lefthanded meshes
2015-04-16 16:59:05 -07:00
George ElKoura
bca5adacc6 Fix incorrect padding of manifold ring
We were incorrectly padding manifoldRing for end boundary vertices.
2015-04-16 12:41:31 -07:00
asluk
df3c856b51 Changed lefthanded flag to isLeftHanded. 2015-04-15 16:15:19 -07:00
asluk
4752bcdd69 Add support for lefthanded meshes. 2015-04-15 16:13:43 -07:00
George ElKoura
b2c77f234c Appease gcc warning about multi-line comments. 2015-04-10 23:21:50 -07:00
Takahito Tejima
0232ff5543 Fixes limit stencil evaluation on gregory basis patch. 2015-04-10 17:45:00 -07:00
Takahito Tejima
3b748e3b8d Fixes a gregory basis evaluation bug. 2015-04-10 17:44:33 -07:00
Takahito Tejima
7b37eb8cd6 #version 410 for XFB kernel and then OSX can run the XFB kernel. 2015-04-10 15:42:25 -07:00
Takahito Tejima
1e9ca564b0 remove subroutines from GLSL kernels. 2015-04-10 15:34:04 -07:00
barfowl
6ba910cd95 Added more functionality missing from stubs for Sdc limit masks:
- modified main LimitMask queries to include subdivision Rule
    - split internal mask assignments into corner, crease and smooth cases
    - adapted all three schemes to the new structure
    - completed limit tangents for Loop
    - update TopologyRefiner Limit methods to pass newly required Rule
2015-04-10 12:29:23 -07:00
Takahito Tejima
1ec0b2b1f2 add includes 2015-04-10 11:09:14 -07:00
Takahito Tejima
24a435da01 avoid lauching stencil kernel and not to allocate device tables if the stencil table is empty. 2015-04-10 11:08:51 -07:00
Takahito Tejima
214e62e67a add a constructor to FarStencilTables to initialze members. 2015-04-10 11:08:41 -07:00
Takahito Tejima
8da827336d Removes FarKernelBatch.
This is the first step to tease off Osd compute controller/contexts
from Far API.
Currently FarStencilTable only creates a kernelbatch for the entire range,
so we can use [0, numStencils) for all cases instead of KernelBatch.
This might not be true if we apply non-factorized level-wise stencils,
then we'll add another modular utility to serve those cases.
2015-04-10 11:08:24 -07:00
David G Yu
ecb824af10 Fixed topologyRefiner.cpp to include error.h 2015-04-10 09:19:08 -07:00
barfowl
bb3552c441 Added error messages to Far::TopologyRefiners main refinment methods 2015-04-09 21:08:26 -07:00
takahito-tejima
f52915227f Fix windows build 2015-04-08 21:10:00 -07:00
Takahito Tejima
24f9dc154b Enable GregoryBasis patch.
PatchTablesFactory fills 20 indices topology into patchtable, and use it for eval and draw.

note: currently screen-space adaptive tessellation of gregory basis patches is
broken and cracks appear around them.
2015-04-08 17:07:10 -07:00
barfowl
36c86b0b68 Correction to previous commit regarding Far vertex ordering options. 2015-04-01 21:00:29 -07:00
barfowl
898d68ae79 Minor additions and revisions to TopologyRefiner interface:
- new Options for Refine() methods for base face and vertex ordering
    - removed ignored/unused "full topology" choice from AdaptiveOptions
    - added base face and vertex ordering logic to Refinement
    - addition of TopologyRefiner members for component counts and max valence
    - refactoring of Level additions to update all new member totals
    - addition of GetMaxValence() to TopologyRefiner
    - updated PatchTablesFactory to user new GetMaxValence() method
    - renaming of "Hole" methods for TopologyRefiner and Vtr::Level
2015-04-01 20:44:33 -07:00
barfowl
9222c9e169 Removed use of "full topology" flag with Far::AdaptiveOptions:
- it was always ignored as full topology is required for PatchTables
    - it will soon be removed from AdaptiveOptions entirely
2015-04-01 14:57:28 -07:00
barfowl
068ea4c7fa Face-varying fixes to support non-manifold features:
- updated original FVar inspection to deal witn non-manifold vertices
    - updated FVar refinement to handle > 2 faces per edge
    - couple of fixes to use parent topology when child not present
2015-03-31 11:50:58 -07:00
George ElKoura
d38d683d0a Make sure to update the _maxEdgeFaces in the child from the parent
level before we do any further population from the parent as that may
further modify the child's _maxEdgeFaces.  When _maxEdgeFaces is incorrect
we may end up with stack corruption problems when
Far::TopologyRefiner::interpolateChildVertsFromEdges() goes to use this data
to allocate some stack space.
2015-03-30 18:49:26 -07:00
barfowl
72e2f8eb2b Added support for patches around non-manifold features:
- regular patches now generated for faces with non-manifold vertices
    - non-manifold features treated as boundary edges and vertices
    - other minor cleanup/improvement in patch identification method
    - commented on approx of smooth x-ordinary corner with regular sharp patch
2015-03-26 10:42:32 -07:00
barfowl
7ebb04bdcb Fixed bugs arising from degenerate edges and triangles:
- avoid repeated edges within the same face on construction
    - corrected degenerate edge detection in tri-split refinement
2015-03-24 17:37:37 -07:00
George ElKoura
9461201b52 Updated usage line for stringify. 2015-03-23 23:53:12 -07:00
barfowl
e583b80271 Completed support for non-manifold topology (degenerate, reversed edges, etc.):
- added edge-face local-indices to Vtr::Level members
    - added internal and public access to edge-face local-indices
    - updated refinement methods to use and populate edge-face local-indices
    - updated refinement methods to be sensitive to degenerate edges
    - added Vtr::VALENCE_LIMIT constant for internal use
    - updated Vtr::Level topology completion to fail on valence overflow
    - simplfied non-manifold edge handling in Vtr::Level topology completion
    - updated warnings for all topology construction failures
    - added detection and warning when passing non-triangles for Loop
2015-03-15 20:22:00 -07:00
jcowles
9529bf45bf Remove internal URL from topologyRefiner header 2015-03-13 23:46:22 -07:00
barfowl
9a41cf59c4 Minor revisions to recent promotion regarding smooth UV's in Far:
- changed return type of Vtr array empty() to bool
    - renamed and adjusted arguments to Vtr gather methods for consistency
    - removed lone Vtr gather method that took an explicit offset
    - updated usage of revised Vtr gather methods in Far
    - fixed warnings redeclaring names of local variables already in use
2015-03-05 13:09:27 -08:00
manuelk
9e25b193ff Fix Win build 2015-02-27 15:52:12 -08:00
manuelk
d0a624f373 Add "smooth UVs" to Far
- extend Far::PatchTables data structures & interfaces to store requisite
  information for channels of face-varying bi-cubic patches
- implement gather function in Far::PatchTablesFactory to populate face-varying
  channels with adaptive patches
- extend accessor interface in Vtr::Level
- propagate code fall-out throughout OpenSubdiv code base, examples & tutorials
- extend vtrViewer code to visualize tessellated bi-cubic face-varying patches
2015-02-26 13:57:47 -08:00
barfowl
4ced1b1461 Revised Level::VTags for semi-sharpness and added corner tag:
- added new tag for sharp corner, now used in isolation
    - split single semi-sharp tag in two for vertex and edge sharpness
    - updated tag propagation and all tests of previous semi-sharp tag
    - added clear() methods for all tags and simplified initialization
2015-02-25 20:02:10 -08:00
barfowl
6cb77507ec Fixed isolation bug with FVar data -- avoid false match with a regular patch. 2015-02-25 17:35:48 -08:00
barfowl
2213d86a59 Fixed bug retrieving and merging tags for FVar values:
- added Vtr::FVarLevel method to resolve correct index in level 0 case
    - updated tag retrieval methods that used face-value array as input
    - changed signatures to accept face-verts when needed and updated usage
2015-02-25 11:02:53 -08:00
barfowl
588c3060b3 Added Vtr::FVarLevel method to merge FVar edge tags with Vtr::Level::Etags 2015-02-17 14:16:35 -08:00
barfowl
7152b1b1bf More support for feature-adaptive consideration of face-varying topology:
- added methods to FVarLevel to combine FVar tags with vertex tags
    - use composite of combined tag to find FVar features needing isolation
    - added more tagging related to the "linear borders" interpolation case
2015-02-11 20:51:00 -08:00
manuelk
b1933194aa Fix data race on static global variable in Far::PatchDescriptor
- statically initialize valid patch descriptor tables
- return a Vtr::Array instead of std::vector
- fix dependencies in Far::PatchTables

fixes #394
2015-02-11 14:25:44 -08:00
rosario
edd1b6a906 Removing cos()/sin() ambiguity 2015-02-11 11:01:57 -08:00
barfowl
5d868200db Introduction of face-varying channels influencing feature adaptive refinement:
- added FVar channel consideration to TopologyRefiner's feature selection
    - added more simple access methods to FVarLevel
    - added _xordinary tag to FVarLevel::ValueTag; initialize and refine
    - added composite tag method for FVarLevel::ValueTag similar to Level::VTag
    - parameterize FVar topology initialization with regular valence
2015-02-09 17:41:19 -08:00
manuelk
da0fab69fc Fix windows build
- in topologyrefiner.cpp : 'uint' needs to be 'unsigned int'
2015-02-09 14:18:58 -08:00
manuelk
866b88b7c9 Add support for single-crease patches to D3D draw context & controller
- also updated the dxViewer code example

note: dxPtexViewer still needs to be updated
2015-02-08 17:31:55 -08:00
barfowl
86522417d5 Improved feature-adaptive selection tests preceding face-varying considieration. 2015-02-08 15:20:46 -08:00
Jeremy Cowles
fc5ac542cc Fix typo in doc string 2015-02-04 22:33:32 -08:00
Jeremy Cowles
606bd15075 True-up accessor names in topologyRefiner 2015-02-04 22:28:11 -08:00
barfowl
2f69c34c88 Extended Vtr patch gathering methods to access face-varying values:
- renamed and extended gathering methods with fvar channel index
    - renamed usage of gathering methods in far/patchTablesFactory
2015-01-29 21:06:47 -08:00
manuelk
446aa492b7 Add protected accessor to return patch index in Far::PatchTables 2015-01-28 15:50:23 -08:00
manuelk
c646ac2e3c Refactor & cleanup patch interpolation
- move patch interpolation code out of Far::PatchTables into far/interpolate
- add bilinear quad interpolation function with derivatives
- switch OsdCpuEvalLimitController to far/interpolate
- add support for bilinear quad interpolation & clean varying interpolation
2015-01-27 15:38:30 -08:00
manuelk
e637f7d1c8 Fix Far::TopologyrRefinerFactory dropping corner creases on vert index 0
fixes #381
2015-01-16 18:06:16 -08:00
manuelk
fca807f82f Adding <vector> include back to fix MSVC build (because alloca) 2015-01-15 17:05:39 -08:00
barfowl
47a24444e7 Make sure vertex-face relation enabled in Vtr when refining FVar channels. 2015-01-14 16:52:06 -08:00
barfowl
1dcf01b02e Removed unnecessary inclusion of <vector> from sdc/scheme.h 2015-01-14 16:51:30 -08:00
Manuel Kraemer
558733298b Merge pull request #375 from hsdk/gregory_optimizations
Minor gregory patch shader optimizations
2015-01-13 16:03:49 -08:00
Manuel Kraemer
2071123148 Merge pull request #378 from hsdk/FixComputeBoundaryBug
Fix boundary bug of DX/CL kernels.
2015-01-13 09:55:19 -08:00
Henry Schaefer
eb8abc0da6 Optimize GL/DX compute dispatches. 2015-01-13 10:59:06 +01:00
Henry Schaefer
19aad3cd54 Fixing boundary bug of DX/CL kernels. 2015-01-13 10:40:51 +01:00
Takahito Tejima
d1863eea12 fix batching bug of GLSL/GLSLXFB compute controllers. 2015-01-12 17:03:21 -08:00
Takahito Tejima
0178b09a38 fix boundary bug of GLSL/GLSLXFB kernels. 2015-01-12 17:02:54 -08:00
Henry Schaefer
18440e2f08 Fix GLTransformFeedback crash in computeStencil
- changed loop counter names in addWithWeight and readVertex that have overwritten the outer loop counter due to unrolling
2015-01-11 02:55:06 +01:00
Henry Schaefer
1b05cd8ee2 gregory patch shader optimization
- reduces instruction count by ~1/5
 - improves readability
2015-01-10 21:28:54 +01:00
manuelk
974462e3db Fix 'single-crease' crash bug in OsdGLDrawContext
- unset sharpness indices are -1, which should not be used to look up into the sharpness values vector...
2015-01-09 19:50:12 -08:00
manuelk
6c4669e565 Release 3.0.0.beta 2015-01-09 14:00:26 -08:00
manuelk
1c27755564 Change subdivision vertex ordering
- switch to vert-verts first ordering (advantageous as it preserves the index of a parent vertex at all subsequent levels)
2015-01-09 11:38:32 -08:00
Henry Schaefer
7c73cf0128 dxPtexViewer fixes:
- changed ptex layout data types in shaders to match srv format
 - changed ptex srv type to unorm format for uchar data
 - fixed hlsl compiler warning: initialized edgeDistance of OutputVertex struct in domain shader even if we are not in wireframe mode
 - added directx debug device and enabled automatic break points to easily spot dx errors
2015-01-09 02:03:42 +01:00
barfowl
4dc96b2520 Minor improvements to Far::TopologyRefinerFactory:
- all Factory<MESH> methods to specialize now return bool
    - added topology validation of base level as indicated by option
    - added populateBaseLevel() back to simplify premature failure
2015-01-07 21:33:48 -08:00
barfowl
0817488b0d Merge branch 'dev' of github.com:PixarAnimationStudios/OpenSubdiv into dev 2015-01-06 17:41:54 -08:00
barfowl
9bb98a94fd Renaming of a few Sdc types and constants:
- renamed Sdc::Type to SchemeType and TypeTraits to SchemeTypeTraits
    - renamed TYPE_ prefix to SCHEME_
    - updated all usage within core library
    - updated all usage in examples, tutorials, etc.
2015-01-06 17:40:11 -08:00
manuelk
32139c40e1 Remove duplicate header 2015-01-06 16:26:32 -08:00
barfowl
f8e7549d1b Removed old to COMPUTE_MASK_WEIGHTS and store them within a Refinement. 2015-01-06 16:08:11 -08:00
barfowl
6115eb9c4d Moved <sdc/type.h> to <sdc/types.h> 2015-01-06 14:26:20 -08:00
manuelk
e1b6434968 Fix build warnings (icc -w3) 2015-01-06 10:56:29 -08:00
barfowl
865fe5591f Modified Far::TopologyRefinerFactory<>::Create() take new Options as argument
- update examples, tutorials, regressions, etc. accordingly
2015-01-06 00:03:21 -08:00
barfowl
513dc96405 Removed unused (and unusable) Clear() method from Far::TopologyRefiner. 2015-01-05 19:41:41 -08:00
barfowl
f9a7e08d44 Cleaned up internal Factory construction of TopologyRefiner. 2015-01-05 19:34:47 -08:00
barfowl
6b71744a26 Minor changes to address warnings and remarks issues by ICC. 2015-01-05 18:56:24 -08:00
manuelk
36b7551a63 Fix Windows build 2015-01-05 12:44:29 -08:00
barfowl
127152a511 Cleaned up protected access to TopologyRefiner from its Factories:
- fixed naming consistency of protected methods used by Factory
    - removed other unused and/or redundant protected methods
    - update Far Factories to reflect changes to Refiner methods
    - updated usage in tutorials and regression
2015-01-04 16:33:18 -08:00
barfowl
5c9b373e44 Fixed Bezier-related typo in internal PatchTables methods. 2015-01-03 16:33:53 -08:00
barfowl
877b09d668 Minor internal cleanup of Far::TopologyRefinerFactory 2015-01-03 12:26:02 -08:00
barfowl
be7c8fdfd1 Sdc::TypeTraits now parameterized by Sdc::Scheme at runtime:
- changed template parameter to runtime method parameter
    - added traits as static methods of all schemes
    - constructed internal table of traits from all schemes
2015-01-02 14:57:04 -08:00
barfowl
881ff6c1e9 Added public methods for setting non-manifold tags in TopologyRefinerFactory 2015-01-02 14:22:03 -08:00
manuelk
bfbd868fe2 Modify Far::TopologyRefiner refinement options
- move level of refinement / isolation into the Options structs
- fix splash damage in rest of the code

note 1: this is less than ideal, because most compilers accept the previous
        call to these functions with an incorrect parameter list (ie. passing
        the level instead of the struct issues no warnings and compiles...)
        caveat emptor...

note 2: the level parameter names may not be final for adaptive modes
        as we will likely want independent controls over crease vs.
        extraordinary vertex isolation.
2014-12-30 14:07:24 -08:00
manuelk
7954fbab37 Fix tangents in Osd::EvalLimitController
- don't rotate (s,t) coordinates but rotate the patch instead !

- refactor osd/cpuEvalLimitKernels to share Far::PatchTables cubic spline
  interpolation functions : this replaces tensor product formulation with
  weight matrices, which does not really impact performance here, but would
  have to be replaced when implementing regular gridding functions.

- fix OsdCpuEvalLimitController to not rotate coordinates and pass the rotation bitfields

- expose Far::PatchTables spline interpolation API (protected -> public)

- fix glEvalLimit tangent buffers (remove empty padding - see below)

- change policy for tangent buffers : the output buffer descriptor is
  **NO LONGER APPLIED** to tangent output buffers. Tangent primvar data
  buffers are no longer applying the offset and stride from the descriptor
  (because it doesn't make sense to share it). If more flexiblity is
  required, we will consider adding independent descriptors for the tangent
  buffers. This change will impact existing code that generates tangents
  with the EvalLimit controller.

fixes #370
2014-12-25 13:22:27 -08:00
manuelk
5944ada0f9 Add Options structs to Far::TopologyRefiner refinement methods
- fix all splash damage to tutorials / examples...
2014-12-23 10:07:24 -08:00
barfowl
13f148aac8 Minor code cleanup:
- removed Vtr::Sharpness typedef within Vtr
    - culled obsolete comments from Sdc headers
2014-12-23 00:09:26 -08:00
manuelk
13e9136b63 Remove Hbr from doxygen docs 2014-12-22 11:50:41 -08:00
manuelk
8d86a2c6bd WIP doxyfication of Sdc 2014-12-22 11:29:15 -08:00
manuelk
d02fce995b Remove obsolete code path in Far::TopologyRefiner (_VTR_COMPUTE_MASK_WEIGHTS_ENABLED) 2014-12-22 10:34:51 -08:00
manuelk
d70fc5a72c Fix doxy comments in Far::TopologyRefiner 2014-12-22 09:40:14 -08:00
manuelk
227ed072c2 Remove outdated OVERVIEW.txt files
- contents have been moved to ReST documentation
2014-12-22 09:24:35 -08:00
manuelk
15b4135cfb Fix infinitely sharp edges isolation
- change topology refiner to check for edge sharpnesses when selecting faces for isolation
- add face-aggregator for edge tags to Vtr::Level
- fix logic in Far::PatchTablesFactory to correctly tag single-crease patches along infinitely sharp edges

note : this fix is a bit of a cludge - barfowl confirms that the vertex crease tags (VTags) are intended to
carry neighborhood information, which they currently do not. we will revisit this shortly and fix the tags,
which will allow us to simplify the traversal logic when isolating topology features.

fixes #369
2014-12-19 18:18:13 -08:00
manuelk
dbfbf893fc Fix typo in sdc/options.h 2014-12-19 11:31:59 -08:00
manuelk
4b6db70539 Fix Windows build 2014-12-15 11:24:45 -08:00
manuelk
48cf4b6528 Refactor Vtr::Array for better "const" safety
Const' declared instances of Vtr::Array do not protect the pointer held
privately by the class properly. In order to force the compiler to
protect this pointer, we removed all non-const accessors from Vtr::Array
(now renamed Vtr::ConstArray) and moved them to a child class (Vtr::Array),
which requires const_cast<> operators internally to allow access.

The change & renaming is then propagated to all internal dependencies.
2014-12-15 10:23:13 -08:00
manuelk
9a3a88546d Rename some members of Far::TopologyRefinerFactory::TopologyDescriptor for consistency
- propagate changes to tutorials / examples
2014-12-12 11:19:24 -08:00
manuelk
ce55f56d50 Rename Sdc::Options vertex boundary interpolation rule enums
- VVarBoundaryInterpolation is now VtxBoundaryInterpolation
- enum prefix change from VVAR to VTX
- generel cleanup / doxyfication
- update of beta / release notes
2014-12-12 11:10:17 -08:00
manuelk
81d971966d Fix error string conversion to use swtich statement (safer) 2014-12-11 09:20:45 -08:00
manuelk
544213b3f0 Fix smooth triangles catmark weights
- rename enums in sdc/options
- add support for "smoothtriangles" tag in Shapes
- add 2 test shapes to glViewer
2014-12-11 09:19:41 -08:00
barfowl
4a3184684f Enabled the "triangle smoothing" option for Catmark edge vertices. 2014-12-10 19:20:03 -08:00
manuelk
6c6993f5b0 Removing non-manifold options : the feature is not ready yet for Beta evaluation 2014-12-10 14:30:36 -08:00
Henry Schäfer
106f74a148 fixed code style of stencil leak fix 2014-12-10 20:09:18 +01:00
Henry Schaefer
02a7373a75 Fixing ProtoStencil mem leak 2014-12-10 13:10:04 +01:00
manuelk
a6e0330805 Remove Hbr compatibility from Sdc::Options
full backward compatibility is assumed to not be possible any-more
2014-12-09 15:03:37 -08:00
manuelk
b53df4b766 WIP on error reporting system
- add error reporting callback to Vtr::Level::validateTopology
- switch printfs to callback
- add error code enums to Vtr::Level
- route Far::TopologyRefinerFactory::reportInvalidTopology through Vtr::Level callback

note:
- Vtr::Level::validateTopology needs to check creaase tag indices
- topology validation should be client-code driver in TopologyRefinerFactory (turned off in the code at the moment)
2014-12-08 17:24:54 -08:00
manuelk
6d9cdf90a3 Fix accumulation of stencil derivatives
this time without a typo

fixes #364
2014-12-05 13:56:36 -08:00
manuelk
f7ed90e898 Minor optimization for Far::PatchTables cubic spline tensor computation 2014-12-04 16:46:02 -08:00
manuelk
e330b4513f Fix accumulation of stencil derivatives
- make sure not to skip CVs that have 0.0 weight because derivative may be contributing (non 0 tangent weight)

fixes #364
2014-12-04 16:15:13 -08:00
manuelk
0ff7b15711 Fix Win build
- make sure we don't get conflicting enums (CODE_ERROR)
- fix template specialization for Far::TopologyRefinerFactory in regression/common/vtr_utils
- fix remaining error reporting code around osd
2014-12-03 20:04:35 -08:00
manuelk
cc6c0925a3 Refactor error reporting system
- change error codes from situational to general (fatal / coding / run-time...)
- pull error functions from Osd into Far
- add a templated topology validation reporting system to Far::TopologyRefinerFactory
- fix fallout on rest of code-base
2014-12-03 17:19:07 -08:00
manuelk
538c13f394 Fix Windows build 2014-11-25 14:14:59 -08:00
manuelk
b27b55e4a8 Refactor Far::PatchTables
- split Far::PatchDescriptor into its own class (mirrors Far::PatchParam)
- hide PatchArray as a private internal structure
- add public accessors patterned after Far::TopologyRefiner (returning Vtr::Arrays)
- propagate new API to all dependent code

note: some direct table accessors have not been removed *yet* - see code for details
2014-11-25 12:41:19 -08:00
manuelk
a9c32d6705 Add opensubdiv/version.cpp
This empty cpp file is added to address some cmake dependency resolution issues
with XCode project-based build generation.

I may add some functionality to version.cpp in the future

Thanks stopiccot for investigating the issue and doing most of the leg-work.

fixes #356
2014-11-25 12:37:03 -08:00
manuelk
c2e8148efc Fix a Far::StencilTablesFactory crash bug on 'perfect' topology
Torii (and other planar topologies) are made entirely of regular b-spline patches and do not
generate sub-patches through adaptive isolation: we need to make sure that we construct
stencil tables with singular stencils for the coarse vertices instead of returning empty
tables (and crash in the limit stencils factory)
2014-11-25 11:48:49 -08:00
barfowl
5c99660f47 Generalized limit functions to support all schemes:
- added detection of sharp corners in generic scheme limit mask query
    - tweaked Loop limit mask to simplify the regular case
    - updated TopologyRefiner::Limit() methods to support all schemes
2014-11-21 16:19:21 -08:00
barfowl
eb3f35ba74 Added methods to Vtr::Level to gather triangular patches for future use. 2014-11-20 14:10:46 -08:00
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