- 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
- 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
- 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
- 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
- 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
- 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
- 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
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.
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.
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.
- 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)
- 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
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.
- 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)
- 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
- created new class Far::PrimvarRefiner with interpolation methods
- removed interpolation and limit methods from Far::TopologyRefiner
- replaced internal usage in Far::StencilTableFactory
- replaced usage in regressions, tutorials and examples
- replaced Evaluate() with EvaluateBasis() in far/tutorial_6
- commented out use of EvaluateFaceVarying() in examples/farViewer
- face-varying patches are work in progress
In OpenSubdiv 2.x, we encapsulated subdivision tables into
compute context in osd layer since those tables are order-dependent
and have to be applied in a certain manner. In 3.0, we adopted stencil
table based refinement. It's more simple and such an encapsulation is
no longer needed. Also 2.0 API has several ownership issues of GPU
kernel caching, and forces unnecessary instantiation of controllers
even though the cpu kernels typically don't need instances unlike GPU ones.
This change completely revisit osd client facing APIs. All contexts and
controllers were replaced with device-specific tables and evaluators.
While we can still use consistent API across various device backends,
unnecessary complexities have been removed. For example, cpu evaluator
is just a set of static functions and also there's no need to replicate
FarStencilTables to ComputeContext.
Also the new API delegates the ownership of compiled GPU kernels
to clients, for the better management of resources especially in multiple
GPU environment.
In addition to integrating ComputeController and EvalStencilController into
a single function Evaluator::EvalStencils(), EvalLimit API is also added
into Evaluator. This is working but still in progress, and we'll make a followup
change for the complete implementation.
-some naming convention changes:
GLSLTransformFeedback to GLXFBEvaluator
GLSLCompute to GLComputeEvaluator
-move LimitLocation struct into examples/glEvalLimit.
We're still discussing patch evaluation interface. Basically we'd like
to tease all ptex-specific parametrization out of far/osd layer.
TODO:
-implments EvalPatches() in the right way
-derivative evaluation API is still interim.
-VertexBufferDescriptor needs a better API to advance its location
-synchronization mechanism is not ideal (too global).
-OsdMesh class is hacky. need to fix it.
Removed OpenCL/D3D11 specialization and add DEVICE_CONTEXT as a template
parameter. For the kernels which don't need a context object (e.g.
CPU, OpenGL, cuda) just ignore the context, and for the kernels which
use a context (e.g. OpenCL, DirectX) takes a context or a user-defined
class as which encapsulates device contexts. Note that OpenCL requires
two objects, cl_context and cl_command_queue. The user-defined
class must provide GetContext() and GetCommandQueue() for strongly typed
binding to osd VertexBuffers and ComputeContexts.
Osd::Mesh and MeshInterface have been used as a handy harness to host
multiple GPU kernels and graphics APIs. However it has CL/DirectX
specializations and duplicates large amount of plubming code. With this
change, glMesh.h and d3d11Mesh.h become just typedefs and all logic is
put into mesh.h without specializations.
Also cleaned up unused header files and code formatting.
- rename "Regular end cap" to "BSplineBasis end cap"
- revert templating and add EndCapType into PatchTablesFactory::Options.
- make EndCapFactories internal in PatchTablesFactory.
- move end cap stencils into PatchTables, keep them relative to the max level.
- add a utility StencilTablesFactory::AppendEndCapStencilTables to splice and factorize endcap stencil tables.
Remove the ptex-specific code from the Far::TopologyRefiner and instead provide it in a separate class Far::PtexIndices. Clients who need to use the Ptex API need to first build a Far::PtexIndices object by providing it with a refiner.
This has the advantage of keeping the API on the TopologyRefiner a little cleaner. The ptex methods were const but were mutating state with const_casts. The new mechanism still achieves the same lazy initialization behavior by forcing clients to instantiate them exactly when needed.
A disadvantage of this approach is that the PatchTablesFactory creates its own PtexIndices and throws it out after the patch tables are created. This is great if you're never going to need the ptex indices again, but not so great if you will need them again.