Commit Graph

2491 Commits

Author SHA1 Message Date
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
David G Yu
c16cdefc1d
Merge pull request #1025 from barfowl/far_quad_boundaries
Remove boundary isolation requirement for quads in adaptive refinement
2018-11-20 10:59:36 -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
David G Yu
7a8243f9d0
Merge pull request #1024 from barfowl/far_uniform_patch_table
Added internal support for non-linear uniform PatchTables
2018-11-17 10:53:57 -08:00
David G Yu
d8c85d5b7d
Merge pull request #1023 from barfowl/far_patch_descriptor
Updated Far::PatchDescriptor methods involving "adaptive" patch types
2018-11-17 10:53:47 -08:00
David G Yu
f5b674e089
Merge pull request #1022 from barfowl/far_gregory_boundaries
Minor fixes to PatchBuilders related to boundary isolation assumptions
2018-11-17 10:53:22 -08:00
barry
def63b301e Added internal support for non-linear uniform PatchTables:
- added internal option to generate polygons vs patches when uniform
    - updated PatchTableFactory to identify patches at a specified level
    - renamed internal symbols to remove obsolete references to Adaptive
2018-11-16 17:51:22 -08:00
Barry Fowler
d7e0449fb2
Merge pull request #1021 from davidgyu/osd_patch_eval
This is great, David. Thanks
2018-11-16 17:14:14 -08:00
barry
0b61b20ec6 Minor fixes to PatchBuilders related to boundary isolation assumptions:
- updated Catmark builder to use edge-point boundary tags like Loop
    - fixed Gregory face point reliance on boundary isolation assumptions
    - added comments to PatchBuilder base class to clarify intention and usage
2018-11-16 16:53:10 -08:00
David G Yu
ff34c514f5 Improved patch basis eval for Osd to match Far
This updates the patch basis evaluation functions in Osd
to match recent changes to far/patchBasis.

This also exposes a common facility for dealing with PatchCoord,
PatchArray, and PatchParam. These are exposed as global functions
operating on struct data, since C++ style class methods are not
supported by all of the Osd shader and kernel execution envirionments.

Changes:
    - Merged far/patchBasis.cpp to osd/patchBasisCommon{,Types,Eval}.h
    - Exposed PatchCoord, PatchArray, and PatchParam to Osd kernels
    - exposed OsdEvaluatePatchBasis and OsdEvaluatePatchBasisNormalized
    - Updated CPU, TBB, Omp, CUDA, OpenCL, GLSL, HLSL, and Metal evaluators
    - Updated glFVarViewer
2018-11-15 17:11:50 -08:00
barry
9206ab0f21 Updated Far::PatchDescriptor methods involving "adaptive" patch types:
- modified IsAdaptive() method to better identify non-linear types
    - updated comments to better reflect current use of patches
2018-11-13 18:36:28 -08:00
David G Yu
63c189b5e6
Merge pull request #1020 from barfowl/far_patch_map
Improve Far::PatchMap for sparse and triangular patch tables
2018-11-12 14:05:59 -08:00
barry
4e0a96f964 Improve Far::PatchMap to better support sparse and triangular PatchTables:
- identify the subrange of originating patch faces while assigning handles
    - limit queries and memory allocation to the identified subrange of faces
    - separate quadtree construction for quad and triangular patches
2018-11-12 10:51:47 -08:00
David G Yu
f512d71777
Merge pull request #1019 from barfowl/irregular_face_bug
Fixed adaptive refinement regression with recent irregular face changes
2018-11-08 13:48:35 -08:00
barry
d95f49b5ca Fixed bug in adaptive refinement related to irregular faces:
- reject irregular faces before combining and testing the composite tag
2018-11-08 12:36:43 -08:00
David G Yu
bf570cd019
Merge pull request #1017 from barfowl/patch_table_query
Fixed Far::PatchTable::IsFeatureAdaptive() to work for all schemes
2018-11-07 19:14:09 -08:00
David G Yu
2520bed85f
Merge pull request #1016 from barfowl/far_irregular_faces
Extended Far topology tagging to better handle irregular faces
2018-11-07 19:13:12 -08:00
barry
78e5badc72 Fixed Far::PatchTable::IsFeatureAdaptive() to work with all schemes:
- added new PatchTable member to indicate uniform (linear) construction
    - initialize new member in PatchTableFactory
    - use new member to determine result of IsFeatureAdaptive() query
2018-11-07 16:51:10 -08:00