Commit Graph

724 Commits

Author SHA1 Message Date
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