Commit Graph

51 Commits

Author SHA1 Message Date
barry
c75be00094 Revised a couple of Loop shapes to match recent Catmark additions:
- reduced the xord_boundary case from none to four shapes
    - re-ordered the first two shapes in the nonman_edges case
2019-05-08 13:12:04 -07:00
barry
33ff2ec2f5 Added new Catmark shapes:
- added cases for x-ord boundaries and interior to match Loop
    - added cases for valence-2 interior and non-quad faces
    - updated all.h for the new additions
2019-05-08 13:10:33 -07:00
barry
afce970bcf Added new Catmark test shapes to regression/shapes:
- added pair of shapes to better cover non-manifold features
    - added pair of shapes to consolidate variations of creased cubes
    - updated all.h to include new shapes
2019-05-06 12:13:45 -07:00
barry
8cc30d4f0d Added new regression/shapes for Loop meshes with non-manifold topology:
- added two new sets of shapes exhibiting non-manifold vertices and edges
    - updated regression/shapes/all.h for inclusion by clients
2019-05-02 15:28:15 -07:00
barry
3c9673c447 Added more regression/shapes for Loop and updated a couple others:
- updated the edge-only and edge-corner shapes consistent with Catmark
    - moved the existing triangulated cube to loop_cube_asymmetric
    - added new loop_cube with symmetric triangulation and limit surface
    - added semi-sharp and inf-sharp variations of cube and icosahedron
    - added shapes with extra-ordinary interior and boundary vertices
    - added shapes with face-varying features similar to Catmark
2019-01-07 15:54:37 -08:00
barry
42a0be5cb9 Patches and regression shapes for Bilinear scheme:
- Bilinear patches derived from non-quads now correctly created
    - added new regression/shapes for Bilinear (non-planar and non-quad)
2018-12-21 12:35:31 -08:00
barry
e494738e88 Disabled boundary isolation requirement for quads in adaptive refinement:
- turned off internal quad boundary isolation option in adaptive refinement
    - added regression/shape to verify support for multiple boundary features
2018-11-19 10:56:21 -08:00
barry
52fc746bb2 Updated UVs of catmark_torus shape with new topology:
- assigned more regular UVs that don't require adaptive refinement
2018-07-03 12:07:24 -07:00
barry
7b2a0b239d minor improvements to examples/glFVarViewer:
- added detection of shapes without UVs and report fatal error
    - fixed command line parsing of shape file arguments and other options
    - added missing UVs from shapes/catmark_fan
2017-01-27 14:22:54 -08:00
barry
796a2f40a7 Fixed bug with non-manifold face-varying topology causing crash:
- corrected the regular patch assembly in Far::PatchTableFactory
    - updated regression shapes to include the problematic topology
2016-12-15 12:33:36 -08:00
barry
e21b4d902f Added a few more test shapes for face-varying and inf-sharp patches:
- added new shapes to regression/shapes
    - updated shapes/all.h to include them
    - updated init_shapes.h for glViewer and glFVarViewer
2016-10-13 19:59:38 -07:00
barry
154f29c7fe Fixed adaptive refinement of sharp corners with edge-only boundaries
- updated base level tagging to ignore the boundary interpolation option
    - updated regression shape for edge-only to illustrate behavior
    - updated regression shapes to favor default viewng direction of examples
2016-10-12 11:42:37 -07:00
barfowl
ae89b0bb19 Added existing shapes missing from regression/shapes/all.h 2015-07-30 17:31:06 -07:00
barfowl
50e2623b91 Fixed initialization of unconnected vertices in FVar channels
- correctly initialize FVar tag and source entry for unconnected verts
    - added regression/shape with unconnected vertices and fvar data
    - fixed edge-face vector access when unconnected edges are last
2015-07-12 18:30:26 -07:00
barfowl
4378a9ea96 Minor revision to one of the regression/shapes:
- changed the dart in catmark_fvar_bound0 to match bound1
    - the two were intended to only differ in the splitting of the lower region
2015-06-17 14:50:07 -07:00
Takahito Tejima
815e54edd0 Suppress erroneous drawing around valence 2 interior vertex
Although valence 2 gregory patch is not well supported yet, this fix
mitigates artifacts around such a vertex.
Adding a shape catmark_gregory_test8 to see this issue.
2015-06-03 13:56:29 -07:00
Takahito Tejima
2102b4f6b2 Fix screen-space tessellation on single crease patch.
- Rename OsdPerPatchVertexBSpline to OsdPerPatchVertexBezier
- Split OsdGetTessLevels into 3 functions,
  OsdGetTessLevelUniform, OsdGetTessLevelAdaptiveRefinedPoints,
  OsdGetTessLevelAdaptiveLimitPoints.
- Add a regression test shape : catmark_single_crease
2015-05-30 22:41:24 -07:00
Takahito Tejima
89dcea57c2 Fix CMakeLists: make project-relative include path overridable
All examples, regression tests and tutorials directly looked into
opensubdiv source directory to grab the header files. This is somewhat
convenient during development but they can mistakenly access private
header files.

With this change, when OPENSUBDIV_INCLUDE_DIR is given to cmake,
it will be used as an include search path to build examples etc.
Otherwise it follows the same behavior as before.

Also replaces include references to the files in regression dir
to be relative, and cleanups some copy-paste patterns.
2015-05-28 17:32:33 -07:00
barfowl
05e9c48ea9 Raised maximum valence supported by Vtr and included new test shapes:
- changed Vtr::LocalIndex to 16-bit integer from 8-bit
    - added test shapes including valence 360 vertices
    - disabled new shapes in far/regression until improved accuracy accepted
2015-05-20 23:36:45 -07:00
George ElKoura
7d323517ee Fix for windows build in regression shapes.
MSVC has a 64k limit for string literals.  We should also probably move away from storing shapes in string literals.
2015-04-25 11:53:01 -07:00
asluk
bc316b3f06 Fix bad merge for left/righthanded mesh examples. 2015-04-23 21:35:29 -07:00
asluk
ed07ed6a8f Merge remote-tracking branch 'upstream/dev' into dev 2015-04-23 21:23:29 -07:00
asluk
343e2217f6 Scaled down left/righthanded meshes for regression testing
to avoid precision issues-- thanks to barfowl for
tracking this down.
2015-04-23 21:10:27 -07:00
David G. Yu
acedb6c710 Fixed windows build regressions. 2015-04-17 18:28:38 -07:00
asluk
4752bcdd69 Add support for lefthanded meshes. 2015-04-15 16:13:43 -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
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
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
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
90dd11a5b9 Added two new regression test shapes. 2014-10-24 11:01:46 -07:00
manuelk
64610cacf7 Addng a regression shape to test face-varying boundary interpolation rules 2014-10-06 16:22:10 -07:00
manuelk
43c235b85d Adding 2 regression shapes to exercise face-varying interpolation code paths 2014-10-03 10:35:32 -07:00
manuelk
cab8e0a038 Adding catmark_chaikin2 test shape
- this shape tests for Chakin rule around vertices with multiple incident creased edges
  (shows where Hbr is wrong)
2014-09-17 14:46:10 -07:00
manuelk
c399655dcc Landing 3.0.0.alpha
Sync'ing the 'dev' branch with the 'feature_3.0dev' branch at commit 68c6d11fc36761ae1a5e6cdc3457be16f2e9704a

The branch 'feature_3.0dev' is now locked and preserved for historical purposes.
2014-09-05 15:07:46 -07:00
manuelk
2dc8520938 Fix Chaikin rule
The Chaikin crease interpolation mode seems to be broken:
	   - Catmark / Loop / Bilinear are passing the wrong halfedge vertex to the
	     SubdivideCreaseWeight function which results in sub-edge crease weights
	     being swapped
	   - the loop that iterates over adjacent edges needs to check against both
	     the original edge and its opposite, otherwise it may be incorrectly
	     accumulated into summation of these adjacent edges (with a 0.25 weight)

	   The proposed fix:
	   - Swaps the Dest/Org vertex passed to the SubdivideCreaseWeight (and
	     we probably want Julian to confirm that this the correct fix)
	   - Checks against both the original edge and its opposite in the iteration
	     over adjacent edges
	   - Replaces the std::vector based query with an HbrHalfedgeOperator for
	     better performance (hopefully)

	   The similar fix to OpenSubdiv been reviewed by Tony DeRose.

    Also in the fix:
        - fix "obj" tag parsing of the smooth triangle tag that was incorrectly
          associated with the crease method (and reporting the wrong errors)
        - add regression shapes for both Loop & Catmark schemes to hbr_regression
        - add same shapes to the glViewer
        - improve hbr_regression output to be more readable
        - add command-line argument parsing to hbr_regression
        - add functionality to dump an obj file when regression fails for comparison

fixes #235
2013-11-07 17:06:55 -08:00
manuelk
83d9315e64 Fix Chaikin tag parsing
Also:
- add 2 shape examples with Chaikin rule tag
- add shapes to the glViewer
- add a stub in the documentation

Note: the Chaikin rule currently applied by Hbr appears to be somewhat off...

fixes #236
2013-11-01 11:38:20 -07:00
manuelk
9e9fd5c021 Fix Far to handle disconnected vertices in an Hbr mesh.
Also:
    - change our shape parser to skip non-manifold faces (print a warning)
    - add a 'fan' non-manifold test shape to the glViewer

fixes #233
2013-10-28 10:40:24 -07:00
manuelk
3ae50d1c50 Amending Apache license language & file headers.
New text:

     Copyright 2013 Pixar

     Licensed under the Apache License, Version 2.0 (the "Apache License")
     with the following modification; you may not use this file except in
     compliance with the Apache License and the following modification to it:
     Section 6. Trademarks. is deleted and replaced with:

     6. Trademarks. This License does not grant permission to use the trade
        names, trademarks, service marks, or product names of the Licensor
        and its affiliates, except as required to comply with Section 4(c) of
        the License and to reproduce the content of the NOTICE file.

     You may obtain a copy of the Apache License at

         http://www.apache.org/licenses/LICENSE-2.0

     Unless required by applicable law or agreed to in writing, software
     distributed under the Apache License with the above modification is
     distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
     KIND, either express or implied. See the Apache License for the specific
     language governing permissions and limitations under the Apache License.
2013-09-26 12:04:57 -07:00
Takahito Tejima
51a45b598d Updating EULA 2013-07-18 14:19:50 -07:00
manuelk
7b36b4feed fix incorrect patch generation for patches with 2 non-consecutive boundary edges
add catmark_flap2 shape & baseline to regression suite

fixes #188
2013-07-08 18:13:44 -07:00
Takahito Tejima
a9f028cdc0 Add face varying data to regression shapes. 2013-07-02 10:50:27 -07:00
manuelk
419b6b9716 - add a message to limitEval when trying to display face-varying UVs on shapes
that do not have that type of data

- fix some regression shapes that had "empty" uv values
  (including some minor topo surgery that luckily appears to not break
  regression baselines)
2013-06-07 17:53:23 -07:00
manuelk
20d61cd93c A quad face with 2 non-consecutive boundary edges causes the 4 vertices
of this quad to be tagged as boundary. These vertices will cause the
feature adaptive pass to generate sub-faces where appropriate, however
the face itself will not be identified as "non-patch", which causes the
FarPatchTables factory to mis-identify it and fall-back on an assert.

This fix flags these particular quad faces in the first adaptive pass.

The particular shape that caused the crash has also been addded to our
regression suite.

fixes #159
2013-05-02 19:37:34 -07:00
Takahito Tejima
d026aca006 use std::string instead of char* for regression shapes definition,
to avoid MSVC's literal length limitation on some big shapes.
2013-03-19 14:43:21 -07:00
manuelk
ea1a87441f Add support for hierarchical hole edits.
- add tag parsing for h-hole in shape_utils
- re-create Renderman's test shape from the documentation (catmark_square_hedit.h)
- fix Hbr to correctly pass the hole tag from parent to child face
- fix FarSubdivisionTables to handle disconnected face-vertices without crashing

fixes #75
2013-03-01 18:27:19 -08:00
manuelk
25f79e7ff2 - change adaptive refinement in FarMeshFactory to not refine inside holes,
while retaining a necessary 1-ring on the inside of a hole edge

- add IsInsideHole() function to HbrHalfEdge

- add HasChild() function to HbrVertex and HbrHalfedge

- add a regression shape with adjacent holes and creases (tests dart, crease & boundaries)

Note : this does not address hierarchical edits inside holes or hole tags in hierarchical edits

fixes #78
2013-02-20 14:12:09 -08:00
manuelk
a52c70ab8b First pass implementation of holes :
- make sure HBR passes down the hole tag to children when subdividing faces
- minor API modification : allow to unset the hole flag on a face
- modify uniform / adaptive FarMeshFactory to be aware of the flag
- make the FarSubdivisionTableFactory assert when finding unconnected HBR vertices (as it should)

* Uniform subdivision :
    The refinement scheme only creates faces & vertices necessary
    to maintain the one-ring around the edges of a hole, so this solution
    is quite efficient.

* Adaptive subdivision :
    At the moment we are still performing full topological analysis on holes and
    only skipping patches associated to holes. This is sub-optimal in 2 ways :
        1. the topological analysis can potentially be cranking on a lot of unnecessary
           geometry
        2. even though we may not be drawing the patches, the compute stage is still
           applying kernels on all the control vertices of these patches.
    We will have to revisit feature adaptive subdivision & holes, so keep the issue active.

fixes #78
2013-02-13 14:34:33 -08:00
manuelk
10c687ecd5 Release Candidate 1.0 :
- [Feature Adaptive GPU Rendering of Catmull-Clark Surfaces](http://research.microsoft.com/en-us/um/people/cloop/tog2012.pdf).

- New API architecture : we are planning to lock on to this new framework as the basis for backward compatibility, which we will enforce from Release 1.0 onward. Subsequent releases of OpenSubdiv should not break client code.

- DirectX 11 support

- and much more...
2012-12-10 17:15:13 -08:00
manuelk
a1552cfe82 Siggrpah 2012 - rolling over all of prepro work into beta 1.1 2012-08-03 19:51:27 -07:00
manuelk
f651dea885 * Fixed a while loop that could crash when boundary interpolation
rules are set to "none" (both in Catmark & Loop)

* Amended shape_utils to always set a default boundary interp. rule
  even when no tag was read (ie. don't default to "none")

* Added a regression test for the "dart" shape to test both
  "edge only" and "edge corner" boundary interp. rules.

Closes #2.
2012-06-15 19:13:29 -07:00