Commit Graph

652 Commits

Author SHA1 Message Date
George ElKoura
39844f807b Mostly cosmetic clean up to the Metal example apps
- Renamed the default "NewApplication" in menus to the real name of the app
- Fixed copyright information in the "About" dialog.
2019-03-09 23:17:23 -08:00
barry
aa46fd3d6d Added UI options to examples/glFVarViewer consistent with glViewer:
- added the smooth corner, single crease and inf-sharp patch options
    - added a missing shape illustrating inf-sharp patches
2019-02-06 18:45:02 -08:00
barry
5595255858 Several minor updates to the GL examples:
- addition of new shapes -- mainly Loop and Bilinear
    - removal of redundant shapes and those not suited to a particular example
    - enforced consistent "Patch Type" coloring where provided
    - enforced consistent command line usage for common options and Obj input
    - enforced consistent default settings on initialization
    - added errors and/or assertions where legitimate limitations remain
    - improved error handling (OSD errors not being flushed before termination)
2019-02-05 17:22:10 -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
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
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
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
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
5c2191f89c Added more common utilities to support Shapes with non-Catmark schemes:
- added conversions Shape and Sdc scheme types
    - extended ObjAnim to take a scheme type on construction
    - updated far/tutorial_9 to make use of new functionality
2018-10-19 13:05:23 -07:00
barry
c424594625 Major step towards consistent use of include paths in source files:
- changed the main OPENSUBDIV_INCLUDE_DIR to exclude ./opensubdiv
    - updated CMakeLists.txt files in non-examples to use only this path
    - updated CMakeLists.txt files in examples to append ./opensubdiv to path
    - updated source in regression/common to use #include <opensubdiv/...>
    - updated source in examples/common to use #include <opensubdiv/...>
    - deferred source in examples to be updated on a case-by-case basis
2018-10-09 10:51:31 -07:00
Sergey Sharybin
ded704f72a Fix missing break statements in glStencilViewer
Changing adaptive subdivision option was affecting on
infinite sharp path option.
2018-07-04 11:46:04 +02:00
barfowl
9c9108c3db
Merge pull request #959 from davidgyu/hlsl_patch_normals
Thanks David
2018-01-16 15:31:33 -08:00
David G Yu
6e02082bd7 Metal patch shader changes for degenerate normals
Updated Metal patch shaders to resolve degenerate normals.
This fix was ported from the GLSL patch shader source.

Also, added missing inf sharp test cases to mtlViewer.
2017-12-12 08:46:00 -08:00
David G Yu
917fc36dde HLSL patch shader changes for degenerate normals
Updated HLSL patch shaders to resolve degenerate normals.
This fix was ported from the GLSL patch shader source.

Also, added missing inf sharp test cases to dxViewer.
2017-11-21 18:01:57 -08:00
David G Yu
2ce82af257 Improved stability of examples/glImaging
The glImaging test now checks the GL version of the
current context before attempting to run GL XFB or
GLSL Compute kernels.

This example can run as part of the ctest suite during
continuous integration testing and adding these checks
should improve consistency of runs across different
test conditions.
2017-09-25 03:37:36 -07:00
George ElKoura
103770189e Merge pull request #941 from davidgyu/dev_metal_ptex_fix
Fixed mtlPtexViewer build
2017-07-13 18:35:07 -07:00
David G Yu
1adfda5d79 Fixed mtlViewer face-varying evaluation
Updated the mtlViewer to compute correct offsets
for face-varying param and index buffers when using
the Gregory Basis end cap approximation.
2017-07-13 17:22:16 -07:00
David G Yu
661fd1f948 Fixed mtlPtexViewer build
Updated mtlPtexViewer to account for recent
API changes to Osd::MTLPatchShaderSource and
also fixed a build error when building with
the use of PtexCache disabled.
2017-07-12 15:17:18 -07:00
George ElKoura
4383d2b5ac Several improvements to CI building and testing
- Added support for OSX CI builds and tests
- Cleaned up build scripts and moved to $ROOT/build_scripts
- On Linux: moved to trusty distro
- On Linux: enabled OpenMP, TBB and PTex build options
- On Linux: install and setup xvfb with newer mesa drivers to run our GL tests
- On Linux: enable GL tests
2017-06-30 12:52:01 -07:00
Nicholas Blasingame
bdca520459 Added fvar support for metla as well as a ui for fvar. 2017-06-05 15:06:47 -07:00
Michael Harris
30cd2df37c Added Metal support 2017-04-19 16:49:53 -07:00
David G Yu
a95e23e980 Updated glEvalLimit to use shared XFB buffers 2017-01-30 12:12:04 -08:00
George ElKoura
a410a52f4e Merge pull request #924 from davidgyu/dev_osd_eval_deriv
Updated Osd Evaluator methods for derivative eval
2017-01-27 18:38:41 -08:00
David G Yu
5a0af7599b Merge pull request #927 from barfowl/legacy_corner_option
Expose public option to improve sharp patches at smooth corners
2017-01-27 18:03:07 -08:00
David G Yu
3d36a9de66 Updated glEvalLimit to display curvature
Added an option to display mean curvature
computed by evaluating 2nd partial derivatives
2017-01-27 17:14:27 -08:00
barry
e3dd0f1798 Publicly exposed choice for smooth boundary patches at smooth corners:
- added Far::PatchTableFactory::Options::generateLegacySharpCornerPatches
    - legacy behavior of sharp patches at smooth corners preserved by default
    - added corresponding option bit to Osd::MeshBits
    - updated examples/glViewer with option
2017-01-27 16:22:04 -08: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
Mike Erwin
bd3113e7e3 spelling phase 4 -- examples, tutorials, regression tests
Read all comments and made corrections to files that aren't part of
OpenSubdiv itself but are packaged with it.

Commandline output of glPtexViewer is affected. Otherwise no functional
changes.
2017-01-24 22:48:48 -08:00
Mike Erwin
0beb654f0b spelling
Noticed a few typos when browsing comments. Proceeded with a "manual
spell check", reading all comments and tweaking spelling, grammar,
punctuation.

Didn't bother with Hbr library.

Comments only, no functional changes.
2017-01-11 12:40:49 -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
David G Yu
0a9b1f6373 Updated glFVarViewer/glEvalLimit for FVar stencils
These viewers now use stencil tables to refine all
face-varying primvar values, i.e. for both refined
points and local points.
2016-11-22 20:05:42 -08:00
David G Yu
197100cbcb Fixed glImaging errors w/ ctest
Fixed some incorrect shader configurations hit
while running the glImaging example through CTest
2016-10-20 17:26:27 -07:00
David G Yu
552e308266 Added OsdGetPatchIsRegular() for GLSL and HLSL 2016-10-17 15:25:17 -07:00
David G Yu
5ad64bc33e Addressed some FVar PatchTable API review notes
Fixed some inconsistencies with the methods added
to support face-varying patches.
2016-10-14 20:11:17 -07: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
David G Yu
df5d01ad3c Fixed naming inconsistencies in Far::PatchTable
The methods which return arrays of FVarPatchParam have
been made plural, e.g. GetFVarPatchParams(), for consistency
with the other methods in PatchTable.

Also fixed a missing doxygen tag.
2016-10-11 17:07:14 -07:00
barfowl
ffdb32cbac Merge pull request #877 from davidgyu/inf_sharp_stencil_viewer
Updated glStencilViewer for InfSharpPatches
2016-10-10 16:45:45 -07:00
David G Yu
705e144fb5 Updated glStencilViewer for InfSharpPatches
Added a toggle to enable the use of infinitely sharp
patches and also implemented fitFrame ('f' keypress).
2016-10-07 17:40:58 -07:00
David G Yu
a3ba5f08f3 Updated glEvalLimit viewer for InfSharpPatch
Added a toggle to enable the use of infinitely sharp
patches and also implemented fitFrame ('f' keypress).
2016-10-07 17:21:59 -07:00
David G. Yu
c9a3bb4d87 Updated glViewer and dxViewer for InfSharp patches
Both of these have been updated to expose toggles
to enable refinement and creation of infinitely
sharp patches.
2016-09-30 11:00:31 -07:00
David G. Yu
42f5090290 Updated glFVarViewer and glEvalLimit examples
These have both been updated to test the refinement
and evaluation of face-varying patch data.
2016-09-29 10:00:19 -07:00
David G Yu
b49d40100d Fixed compile warnings in ptex examples on macOS 2016-09-06 23:24:46 -07:00
David G Yu
8babf1e12b Removed mayaPolySmooth example
Also removed the remaining Maya dependencies. These
were most useful during the early days of OpenSubdiv.
Now OpenSubdiv has been integrated directly into Maya
and these examples serve little purpose.
2016-09-06 17:08:05 -07:00
George ElKoura
d856975ef3 No longer use CMAKE_SOURCE_DIR and CMAKE_BINARY_DIR
As mentioned in issue #814, avoiding the use of CMAKE_SOURCE_DIR makes it easier to integrate OpenSubdiv as a submodule in other projects.

Fixes #814.
2016-07-08 22:45:33 -07:00
David G Yu
781b060bd8 Merge pull request #812 from c64kernal/dev_dxv
Fix unsigned/signed compare in dxViewer
2016-06-26 10:49:20 -07:00
George ElKoura
507e655a10 Fix unsigned/signed compare. 2016-06-25 21:55:51 -07:00
David G. Yu
1ba1e07ad1 iso-646 fix for ptex / examples / tutorials 2016-06-25 14:27:53 -07:00
David G. Yu
3e3695652f iso-646 fix for CUDA / CL / TBB 2016-06-25 14:23:55 -07:00