Go to file
Takahito Tejima 541aeddd3a Osd API refactor: EvalStencils and EvalPatches
Add EvalStencils and EvalPatches API for most of CPU and GPU evaluators.

with this change, Eval API in the osd layer consists of following parts:

- Evaluators (Cpu, Omp, Tbb, Cuda, CL, GLXFB, GLCompute, D3D11Compute)
  implements EvalStencils and EvalPatches(*). Both supports derivatives
  (not fully implemented though)

- Interop vertex buffer classes (optional, same as before)
  Note that these classes are not necessary to use Evaluators.
  All evaluators have EvalStencils/Patches which take device-specific
  buffer objects. For example, GLXFBEvaluator can take GLuint directly
  for both stencil tables and input primvars. Although using these
  interop classes makes it easy to integrate osd into relatively
  simple applications.

- device-dependent StencilTable and PatchTable (optional)
  These are also optional, but can be used simply a substitute of
  Far::StencilTable and Far::PatchTable for osd evaluators.

- PatchArray, PatchCoord, PatchParam
  They are tiny structs used for GPU based patch evaluation.

(*) TODO and known issues:
- CLEvaluator and D3D11Evaluator's EvalPatches() have not been implemented.
- GPU Gregory patch evaluation has not been implemented in EvalPatches().
- CudaEvaluator::EvalPatches() is very unstable.
- All patch evaluation kernels have not been well optimized.
- Currently GLXFB kernel doesn't support derivative evaluation.
   There's a technical difficulty for the multi-stream output.
2015-05-25 22:43:43 -07:00
cmake Added TBB support for MSVC12 / Visual Studio 2013 2015-05-19 23:52:51 -07:00
documentation renaming (2/2) PatchTables and StencilTables to PatchTable and StencilTable 2015-05-22 11:50:01 -07:00
examples Osd API refactor: EvalStencils and EvalPatches 2015-05-25 22:43:43 -07:00
opensubdiv Osd API refactor: EvalStencils and EvalPatches 2015-05-25 22:43:43 -07:00
regression Moved primvar interpolation methods to new Far::PrimvarRefiner class 2015-05-23 18:56:36 -07:00
tutorials Moved primvar interpolation methods to new Far::PrimvarRefiner class 2015-05-23 18:56:36 -07:00
.gitignore Improve stringification of shaders & kernels in build. 2014-01-03 16:59:26 -08:00
.travis.yml Add some comments into .travis.yml 2015-04-28 17:31:04 -07:00
CMakeLists.txt A couple more DX / OpenCL changes for AMD 2015-04-30 10:01:01 -07:00
LICENSE.txt Amending Apache license language & file headers. 2013-09-26 12:04:57 -07:00
NOTICE.txt Landing 3.0.0.alpha 2014-09-05 15:07:46 -07:00
OpenSubdivCLA_corporate.pdf update documentation & CLA files to reflect Apache 2.0 move 2013-08-01 16:14:23 -07:00
OpenSubdivCLA_individual.pdf update documentation & CLA files to reflect Apache 2.0 move 2013-08-01 16:14:23 -07:00
README.md Updating documentation in readme and far_overview. 2015-04-12 18:13:23 -07:00

OpenSubdiv

OpenSubdiv is a set of open source libraries that implement high performance subdivision surface (subdiv) evaluation on massively parallel CPU and GPU architectures. This codepath is optimized for drawing deforming subdivs with static topology at interactive framerates. The resulting limit surface matches Pixar's Renderman to numerical precision.

OpenSubdiv is covered by the Apache license, and is free to use for commercial or non-commercial use. This is the same code that Pixar uses internally for animated film production. Our intent is to encourage high performance accurate subdiv drawing by giving away the "good stuff".

Feel free to use it and let us know what you think.

For more details about OpenSubdiv, see Pixar Graphics Technologies.

Git Flow

We have adopted the git flow branching model. It is not necessary to use the git-flow extensions, though you may find them useful! But it will be helpful to read about the git flow branching model in order to understand the organization of branches and tags that you will find in the repository.

Quickstart

  • Clone
  • Make a subdirectory "build" and cd into it
  • Run cmake .. followed up with your build tool of choice (make or an IDE).

Additional detailed instructions can be found in the documentation:

Standalone viewers

OpenSubdiv builds a number of standalone viewers that demonstrate various aspects of the software.

Common Keyboard Shortcuts:

Left mouse button drag   : orbit camera
Middle mouse button drag : pan camera
Right mouse button       : dolly camera
n, p                     : next/prev model
1, 2, 3, 4, 5, 6, 7      : specify adaptive isolation or uniform refinment level
+, -                     : increase / decrease tessellation 
w                        : switch display mode
q                        : quit

Build instructions (iOS/Android)

OpenSubdiv may also be used for mobile app development.

Support for the CPU and GPU APIs used by OpenSubdiv is more limited on today's mobile operating systems. For example, the most widely support graphics API is OpenGL ES 2.0 which doesn't yet provide the support for tessellation shaders needed to fully implement GPU accellerated Feature Adaptive Subdivision.

OpenSubdiv can still be used to compute uniform refinement of subdivision surfaces for display on these platforms, realizing all of the benefits of a consistent interpretation of subdivision schemes and tags.

The easiest way to get started using OpenSubdiv for mobile is to use CMake's support for cross-compiling:

iOS

You will need a current version of Apple's Xcode and iOS SDK (tested with iOS 6.0.1 and Xcode 4.5.2):

and a CMake toolchain for iOS:

You can then use CMake to configure and generate an Xcode project:

mkdir build-ios
cd build-ios
cmake -DNO_CUDA=1 -DCMAKE_TOOLCHAIN_FILE=[path to iOS.cmake] -GXcode ..

xcodebuild -target install -configuration Debug

You can open the resulting Xcode project directly, or include as a sub-project in the Xcode project for your app.

Android NDK

You will need a current version of the Android NDK (tested with Android 4.2.1 and android-ndk-r8b):

and a CMake toolchain for Android:

You can then use CMake to configure and build OpenSubdiv:

mkdir build-ndk
cd build-ndk
cmake -DCMAKE_TOOLCHAIN_FILE=[path to android.cmake] -DLIBRARY_OUTPUT_PATH_ROOT=`pwd`/modules/OpenSubdiv ..

make install

The resulting NDK module can be imported by other NDK modules by including it in your module search path:

export NDK_MODULE_PATH=[path to build-ndk/modules]

Regression tests

OpenSubdiv builds a number of regression test executables for testing:

  • hbr_regression: Regression testing matching HBR (low-level hierarchical boundary rep) to a pre-generated data set.
  • far_regression: Matching FAR (feature-adaptive rep using tables) against HBR results.
  • osd_regression: Matching full OSD subdivision against HBR results. Currently checks single threaded CPU kernel only.