Commit Graph

89 Commits

Author SHA1 Message Date
David G Yu
92f724f354
Merge pull request #1251 from barfowl/far_tutorials
Minor improvements to Far tutorials:
2022-08-26 17:06:24 -07:00
Barry Fowler
5accb0c2c0 Fixed warning-as-error for Microsoft compiler 2022-08-25 19:29:05 -07:00
Barry Fowler
a492af45e3 Minor improvements to Far tutorials:
- addressed leaks-on-exit (#1226) and return value from main() for all
    - fixed color indexing bug in tutorial_2_2 (#1241)
    - suppressed a few compiler warnings
2022-08-25 17:47:12 -07:00
Barry Fowler
c025f7178d Additions and improvements to Bfr tutorials:
- added tutorial_1_5 to illustrate use of limit stencil evaluation
    - added tutorial_3_2 to illustrate caching of Surfaces for later use
    - improved tutorial_2_2 (simplified, more comments)
    - updated Bfr tutorial docs with new images and descriptions
    - modified CMake files for each tutorial to use osd_add_bfr_tutorial
2022-08-25 17:20:21 -07:00
Barry Fowler
8cbc059e6b Addition of Bfr interface (2 of 4): tutorials/bfr 2022-08-02 20:40:48 -07:00
David G Yu
5df2fb9f3f Prefix remaining OpenSubdiv CMake macros
This adds an "osd" prefix to the macros used
to install far tutorials.
2020-03-09 13:55:20 -07:00
barry
673bb1e386 Fixed oversight deriving adaptive refinement options from patch options:
- added missing initialization of max level with patch options
    - added comment to discourage others from making the same mistake
2020-02-10 16:06:26 -08:00
David G Yu
1ab19ec089
Merge pull request #1176 from barfowl/far_tutorial_5_3
Added new tutorial for Far::LimitStencilTable
2020-01-25 17:16:48 -08:00
barry
301ae21b0a Added new tutorial for Far::LimitStencilTable:
- added new source subdirectory far/tutorial_5_3
    - updated documentation to refer to the new tutorial
2020-01-24 18:54:45 -08:00
barry
f2671f96be Formatted modified source files to adhere to 80-column standard 2020-01-21 17:10:42 -08:00
barry
9f5898d94a Update far/tutorial_5_2 to use common command line parsing 2020-01-21 14:33:26 -08:00
barry
e65a7fee5c Fixed memory leak with optional .obj file in far/tutorial_5_2 2020-01-21 14:32:11 -08:00
George ElKoura
92341f7c1e Prefix OpenSubdiv CMake macros
This fixes issue #1157 by adding "osd" as a prefix to public macros.
2019-08-17 16:44:30 -07:00
barry
e28acc7a68 Fixed references to renamed Far tutorials in tutorial source
- updated far/tutorial references to the intended sources
    - updated comments using 2.x style class names, e.g. FarClass vs Far::Class
2019-04-10 16:28:00 -07:00
barry
7aff9287d8 Reorganized Far tutorials into groups:
- moved and renumbered the 11 Far tutorials into 5 groups
    - updated documentation/tutorials.rst:
        - replaced the two-column tables with simple sections
        - created sub-sections describing the Far tutorial groups
    - updated additional Far tutorial references for new numbering
2019-03-21 18:43:02 -07:00
George ElKoura
8db55103c9 Removed accidental swap file in far/tutorial_10 2019-03-18 21:09:40 -07:00
George ElKoura
134ee33255 Clean up the CMakeLists.txt in the far tutorials
Most of the tutorials are built and installed the same way so provide a common _add_far_tutorial macro.
2019-03-18 14:29:01 -07:00
barry
6cae3a8e6d Additions and minor improvements to far/tutorials:
- added far/tutorial_10 illustrating variable width vertex class
    - revised far/tutorial_9 for command line and documentation conventions
    - updated doc/tutorials.rst with missing and new tutorial descriptions
2019-02-13 11:37:41 -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
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
barry
5c9f77d83e Reverted PatchTable::ComputeLocalPointVaues...() to avoid template issues:
- reverted original methods to operate in single precision instead of both
    - removed overloads in favor of direct stencil table access and update
    - updated precision related assertions with clearer condition
    - updated far/tutorial_6 to use template stencil table access
    - updated far/tutorial_9 to use conventional stencil table access
2018-09-13 12:50:00 -07:00
barry
6bac5aeb4a Work around for possible precision issue in new far/tutorial_9:
- extend AddWithWeight() to use double to support instantiation of
      double precision local point StencilTable
2018-09-11 17:48:50 -07:00
barry
4f482febfa Added new far/tutorial to illustrate use of sparse PatchTables:
- added tutorial/far/tutorial_9 with source for new tutorial
    - updated tutorial/CMakeLists.txt to deal with header path issue:
        - inclusion of code from regression/common required extension
2018-09-11 16:16:15 -07:00
barry
a154426d33 Added new flags to Far::PatchTableFactory::Options to:
- address indexing inconsistencies with Uniform PatchTables (#737)
    - suppress generation of Varying patches and/or their local point stencils
    - added suppression of Varying patches to far/tutorial_6
2018-08-27 10:58:46 -07:00
barry
3b484997a1 Modified a couple of examples for testing multi-precision support:
- regression/far_perf - can run single/double from command line
    - tutorials/far/tutorial_6 - change typedef to run as single/double
2018-07-28 15:06:32 -07: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
David G. Yu
c0dee5510f Fixed typo in previous commit 2016-06-25 21:31:00 -07:00
David G. Yu
1ba1e07ad1 iso-646 fix for ptex / examples / tutorials 2016-06-25 14:27:53 -07:00
Thomas Thomassen
b1e1ff31b4 Clean up DX, example and tutorials. 2016-06-25 10:30:50 +02:00
George ElKoura
923d60ca74 Use cmake's folder feature on platforms that support it.
We now make use of folders where they are supported.  In particular, on Visual Studio, this produces much nicer solutions to navigate.
2016-06-09 17:04:26 -07:00
David G Yu
643430105d Fixed far_tutorial_6 refined primvar interpolation
Adaptive refinement will only produce levels of refinement which are
actually needed even if the client specifies a greater max isolation level.

This change fixes the loop control used for primvar interpolation to
interpolate only levels which exist in the refinement.
2016-01-22 17:42:55 -08:00
Pol
fe7a4decc5 Added section at the beginning that explains each method, how it works and how
it approximates smooth normals.
2015-09-17 15:29:00 -07:00
Pol
67e86104f6 Minor fixes in the code, mostly spacing 2015-09-17 13:55:08 -07:00
Pol
2fc7bd1660 Adding two more methods to the smooth normals tutorial, the first one using the 4 vertices
to generate two vectors to use in the cross product, the second one using the
normals in the limit.
2015-09-17 13:45:52 -07:00
Pol
97c5e1f23d Added "tutorial_8" that shows how to calculate smooth normals for uniform subdivision. 2015-09-16 15:50:55 -07:00
Sergey Sharybin
cee60e93e2 Fix typo in Far tutorial, GetFaceEdges() actually get face index, not edge index 2015-07-08 16:51:08 +02:00
Jeremy Cowles
ab5d5341af Remove all unused references to AddVaryingWithWeight
Far no longer supports this method, so the existing functions were pure noise.
Hbr, however still requires it, so there are still a couple instances of it in
the hbr tutorial files.
2015-06-25 22:12:38 -07:00
Takahito Tejima
0ab4076286 doc update: replace old references to ComputeContext and ComputeController. 2015-06-17 17:40:25 -07:00
Pol Jeremias-Vila
b18abaabc8 Adding vertex color in the second face-varying channel. 2015-06-05 15:59:11 -07:00
barfowl
6c61f1b006 Separated Far's TopologyDescriptor from the RefinerFactory classes:
- moved TopologyRefiner out of the RefinerFactoryBase into Far
    - moved implementation of its Factory<MESH> to far/topologyDescriptor.*
    - updated examples and tutorials (no more references to FactoryBase)
2015-06-02 16:27:19 -07:00
barfowl
dc5056fe76 Renaming of face-varying methods to access values per face:
- replaced FVarFaceValues with FaceFVarValues in a couple Far methods
    - rewrote face-varying Factory assignement to be clearer with terminology
2015-06-01 16:25:44 -07:00
barfowl
e52dd83b14 Removed unnecessary files include by public headers in Far 2015-06-01 00:14:19 -07:00
barfowl
5b854c8534 Removed multi-level interpolation methods of Far::PrimvarRefiner
- removed all of the multi-level Interpolate...() methods taking T*, U*
    - made all single-level methods consistent wrt usage of T&, U&
    - replaced usage in regressions, tutorials and examples
    - additional minor improvements to far/tutorials
2015-05-29 22:21:50 -07:00
Takahito Tejima
4e807a776d Add Far::PatchTable::ComputeLocalPointValues() to compute endcap patch points.
To encapsulate endcap functions from public API, add methods to
tell the number of patch points needed (GetNumLocalPoints()) and
to compute those patch points as a result of change of basis from
the refined vertices (ComputeLocalPointValues()).

ComputeLocalPointValues takes contiguous source data of all levels
including level0 control vertices.
2015-05-29 12:41:22 -07:00
Takahito Tejima
a81497b8db Merge pull request #548 from barfowl/add_varying
Removed primvar interpolation dependency on varying interface
2015-05-29 12:40:22 -07:00
barfowl
42245f4b20 Removed primvar interpolation dependency on varying interface:
- removed AddVaryingWithWeight from Far::PrimvarRefiner interpolation
    - removed Far::StencilBuilder dependencies on varying
    - updated Far::StencilTableFactory use of StencilBuilder constructor
    - updated far/tutorial_2 to use vertex colors vs varying (for now)
2015-05-29 10:48:19 -07:00
Takahito Tejima
f9523f916f osdlayer: rename Osd::VertexBufferDescriptor to Osd::BufferDescriptor.
A mechanical substitution of VertexBufferDescriptor with BufferDescriptor.
Also removing unused files from osd.
2015-05-29 09:21:14 -07:00
barfowl
ff490cc131 Moved protected TopologyRefiner modifiers to its Factory class:
- added TopologyRefiner base level modifiers to TopologyRefinerFactoryBase
    - removed old modifiers from TopologyRefiner (unused by anything else)
    - updated existing Factory<MESH> definitions to use new methods
2015-05-28 22:39:45 -07:00
Takahito Tejima
7782c53ea2 Fix far_tutorial_6 to use gregory basis endcaps. 2015-05-27 11:44:42 -07:00