Commit Graph

2508 Commits

Author SHA1 Message Date
David G Yu
d468aca0a2
Merge pull request #1053 from barfowl/far_patch_is_adaptive
Fixed Far::PatchDescriptor::IsAdaptive() for legacy Gregory
2019-02-05 13:17:28 -08:00
barry
de29bc897f Fix Far::PatchDescriptor::IsAdaptive() for legacy Gregory patches:
- determine based on patch type ID rather than control point count
2019-02-04 11:04:26 -08:00
David G Yu
480afc0189
Merge pull request #1052 from barfowl/far_tri_ptex_adjacency
Removed triangular restriction in Far Ptex adjacency query
2019-02-03 09:52:22 -08:00
David G Yu
3ba6a1a11c
Merge pull request #1051 from barfowl/examples_headers
Enforced consistent header file inclusion in source for examples
2019-01-31 15:15:44 -08:00
barry
20dcd24b9d Updated all example source for consistent inclusion of header files:
- prepend the opensubdiv directory to all library headers included
    - removed the opensubdiv directory from all declared include paths
2019-01-31 10:49:02 -08:00
David G Yu
e4375aea9e
Merge pull request #1048 from barfowl/glsl_adaptive_tess_levels
Minor refactoring of GLSL functions to compute adaptive tess levels
2019-01-31 00:54:06 -08:00
barry
d1f601ef9b Enabled Far::PtexIndices::GetAdjacency() for triangular refinement 2019-01-30 20:55:18 -08:00
Barry Fowler
0c2f3ee884
Merge pull request #1050 from davidgyu/loop_patches_eval_limit 2019-01-30 20:27:12 -08:00
Barry Fowler
cbbfc5b64b
Merge pull request #1049 from davidgyu/glsl_gregory_tri_varying_fix 2019-01-30 20:10:11 -08:00
barry
e8fdec9f88 Made use of newer GLSL adaptive tess functions in patch shaders:
- replaced use of "LimitPoints" functions in all patch shaders
    - removed the unreleased "LimitPointsTriangle" functions
    - added internal tess functions for processing patch boundaries
    - updated Bezier quad and tri tess evaluation to use boundary functions
2019-01-30 10:25:04 -08:00
barry
e8859cac85 Added GLSL adaptive tess functions to reflect associated patch types:
- renamed core "LimitPoints" functions to reflect the patch type (Bezier)
    - overloaded new functions with the additionally computed tess level
    - preserved stubs of all "LimitPoints" functions for compatibility
2019-01-30 10:12:15 -08:00
David G Yu
62ae245b9a
Merge pull request #1047 from barfowl/far_adapt_refine_options
New method to determine adaptive refinement options from choices for patches
2019-01-29 09:29:46 -08:00
David G Yu
c13a6ba2e4
Merge pull request #1046 from barfowl/glsl_bezier_normal_derivs
Added normal derivatives to GLSL Bezier triangle evaluation
2019-01-29 09:29:28 -08:00
barry
673088637b Added public method to derive adaptive refinement options from patch options:
- PatchTableFactory::Options method returns TopologyRefiner::AdaptiveOptions
    - far/tutorial_6 and 9 updated to illustrate use of the new method
2019-01-28 18:02:12 -08:00
barry
73f4ab5db7 Added normal derivatives to GLSL Bezier triangle evaluation:
- added alternate intermediate calculations for normal derivatives
    - use normal derivates to resolve a degenerate normal
2019-01-28 10:20:31 -08:00
David G Yu
c37bb51736 Fixed glViewer and glStencilViewer arg parsing
- Fixed an indexing bug in command line argument processing.
- Changed glStencilViewer mesh initialization to be more consistent
with other viewers.
2019-01-25 19:40:43 -08:00
David G Yu
6ba1d9fcc2 Updated glEvalLimit viewer for Loop patches
- Removed restriction on adaptive refinement for Loop meshes
- Updated internal class used to manage eval locations for triangle patches
- Added command line options to specifiy the Scheme for .obj input files
2019-01-25 19:31:26 -08:00
David G Yu
0545056271 Fixed varying interp for gregory triangle patches
The point indices used to interpolate varying data should
be the points at the outer corners of the patch.
2019-01-25 19:15:45 -08:00
David G Yu
9487545ccd
Merge pull request #1044 from barfowl/far_quartic_gregory
Extended triangular Gregory patch to full quartic
2019-01-24 14:58:33 -08:00
barry
a0e72d80c3 Changed Gregory triangle from cubic/quartic hyrid to full quartic:
- changed Far::PatchDescriptor size for GREGORY_TRIANGLE to 18
    - modified Far::LoopPatchBuilder to construct full quartic Gregory patch
    - fixed Far::LoopPatchBuilder bug related to face points near boundaries
    - updated Far patch basis evaluation for Gregory and Bezier triangles
    - updated Osd patch basis evaluation to match Far
    - updated Osd GLSL patch size for Gregory triangle to 18
    - modified Osd GLSL Gregory triangle eval and tess settings for quartic
2019-01-24 12:56:09 -08:00
David G Yu
ee6097b399
Merge pull request #1043 from barfowl/glsl_quartic_bezier
Changed GLSL conversion of regular Loop patch to quartic Bezier
2019-01-22 12:37:37 -08:00
barry
7ab065a0c4 Changed GLSL conversion of regular Loop patch to quartic Bezier:
- updated sizes for the Box-spline triangle shader to generate 15 points
    - updated conversion of Box-spline from hybrid Bezier to fully quartic
    - added resolution of degenerate normal to Bezier triangle evaluation
    - updated hybrid Gregory triangle conversion to quartic Bezier
    - updated adaptive tessellation of Bezier triangle for quartic boundaries
2019-01-22 09:48:19 -08:00
Barry Fowler
1c35aa435a
Merge pull request #1041 from davidgyu/loop_patches_gl_drawing
Thanks, David!
2019-01-19 14:13:12 -08:00
David G Yu
3757eb120b Updated glStencilViewer for Loop patches
Also, changed sample initialization for triangle refinement to keep sample
locations within base triangles.
2019-01-18 18:21:13 -08:00
David G Yu
06f4a60939 Updated glViewer and glFVarViewer for Loop patches
- Removed Catmark restrictions in the application code and shaders
- Added command line options to specifiy the Scheme for .obj input files
- Added support for Linear end-cap approximation
- Updated GUI labels for end-cap types, i.e. "Linear" instead of "Bilinear"
  and "Regular" instead of "BSpline".
- Added new shading color to glViewer for "Patch Depth"
- Disabled screen-space and fractional tessellation by default
2019-01-18 18:20:21 -08:00
David G Yu
83486cddae Added GLSL support for drawing triangle patches
- Added GLSL patch shaders for BoxSplineTriangle and GregoryTriangle
  patches. These both convert to a hybrid Bezier patch for drawing
  similar to the basis conversion done for quad patches.
- Added evaluation of hybrid Bezier triangle patches and
  GregoryTriangle patches to the common shader source.
- Added OsdGetPatchIsTriangleRotated() to detect rotated triangles.
- Added OsdInterpolatePatchCoordTriangle() for eval of triangle patches.
- Added boundary point extrapolation for BoxSplineTriangle patches.
- Fixed boundary point extrapolation for unisolated BSpline patches.
- Added tess factor and tess evaluation location computation for
  triangle patches.
- Limit surface edge mid points for both quad and triangle patches
  are now computed directly.
2019-01-18 18:18:45 -08:00
David G Yu
494f45605f Moved GLSL tess factor code to separate file
Moved shader code which computes tessellation factors and
tessellation parameterization into a separate source file.
2019-01-18 18:17:38 -08:00
David G Yu
2ccd70fec3 Moved GLSL legacy shader code to separate file
Moved shader code used for evaluation of legacy gregory patches
to a separate source file along with macros which implement
simple linear face-varying interpolation.

These should not be used for new development, but are provided
for backward compatibility.
2019-01-18 18:15:43 -08:00
David G Yu
d855643b80 Fixed osd patch basis typos and macros 2019-01-18 18:14:00 -08:00
David G Yu
f25b7427f9
Merge pull request #1039 from barfowl/loop_regression_shapes
Added more regression shapes for Loop subdivision
2019-01-08 11:18:46 -08:00
Barry Fowler
e8ac8a81f8
Merge pull request #1038 from davidgyu/uniform_eval_limit_example
Thanks, David
2019-01-07 16:04:23 -08: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
David G Yu
ed97ce1b26 Updated glEvalLimitViewer for uniform refinement
Previously, the glEvalLimitViewer was hard coded to
use only adaptive refinement, but this change demostrates
how to evaluate patch locations on the linear patches
resulting from a uniform refinement.

By default, in a patch table created from a uniform refinement,
the patch indices for vertex patches account for base level indices,
while the patch indices for face-varying patches do not account for base
level indices.

This change also updates the example to set the patch table factory options
so that both kinds of patch indices account for base level indices.
2019-01-07 13:45:20 -08:00
David G Yu
bf38091ac3
Merge pull request #1037 from barfowl/far_stencil_table_ptr
Simplify the private PatchTable::StencilTableHandler class
2019-01-04 16:26:00 -08:00
barry
eb658d757b Removed unnecessary condition from new stencil table initialization method:
- existence of the StencilTable is now a pre-condition
2019-01-04 16:04:19 -08:00
David G Yu
c90c87d011
Merge pull request #1036 from barfowl/vtr_nonman_fvar_tag
Fix construction of face-varying patches around non-manifold vertices
2019-01-04 10:45:54 -08:00
barry
c42482e5c4 Modified initialization of non-manifold bit for face-varying tags:
- face-varying non-manifold status now OR'd with vertex non-manifold
2019-01-03 19:17:17 -08:00
David G Yu
fd78b69cdc
Merge pull request #1035 from barfowl/far_bilinear_patches
Patch construction and more regression shapes for Bilinear scheme
2018-12-21 16:51:56 -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
David G Yu
16cbbe3fd4
Merge pull request #1034 from barfowl/far_tri_inf_sharp_edges
Fixed triangular patches at interior infinitely sharp edges
2018-12-21 11:40:03 -08:00
barry
808069c123 Fixed triangular patches with apex on an interior inf-sharp edge:
- test for presence of inf-sharp edges at corner not inf-sharpness
2018-12-20 11:46:03 -08:00
barry
01648eddbc Simplified PatchTable's private StencilTableHandler class:
- stripped StencilTableHandler down to simpler StencilTablePtr wrapper
    - replaced old convenience methods with direct conditions in PatchTable
    - created new private template methods to simplify PatchTableBuilder
2018-12-18 12:52:20 -08:00
David G Yu
13f4979763
Merge pull request #1033 from barfowl/far_patch_param_regular
Assign Far::PatchParam's regular bit consistent with Osd::PatchArray
2018-12-14 16:32:07 -08:00
David G Yu
8014b3ab08
Merge pull request #1032 from barfowl/far_tri_patch_map_bug
Fixed bug in Far::PatchMap for rotated triangular patches
2018-12-14 09:51:29 -08:00
David G Yu
6d2c3eb630
Merge pull request #1031 from barfowl/far_uniform_limit_stencils
Fix Far::LimitStencilTableFactory issues with uniform refinement
2018-12-14 09:51:16 -08:00
barry
eaaa03b4b2 Enforce consistent assignment of Far::PatchParam's "regular" bit:
- extended PatchBuilder::ComputePatchParam() to specify bit value
    - updated PatchParam construction in PatchTableFactory
2018-12-12 17:59:17 -08:00
barry
a308267af3 Fixed bug in Far::PatchMap for rotated triangular patches:
- cancelled the rotation when in the rotated quadrant of a rotated triangle
2018-12-12 12:27:14 -08:00
barry
9219b0fb00 Fix Far::LimitStencilTableFactory issues with uniform refinement:
- corrected stencil estimates according to the interpolation mode
    - removed the added error checking for the tables provided
    - use uniform vertex patches when varying interpolation specified
2018-12-12 12:03:54 -08:00
David G Yu
27bc5c5495
Merge pull request #1026 from barfowl/far_patch_factory_bug
Fixed PatchTableFactory internal option for uniform tables
2018-11-21 10:28:13 -08:00
barry
82856a410f Fixed PatchTableFactory internal option for uniform tables:
- set non-linear uniform option back to false for linear uniform tables
2018-11-20 14:24:52 -08:00