Go to file
David G Yu 2f335a427b
Merge pull request #1318 from davidgyu/dev_ninja_msvc_warn_level
Fixed inconsistent warning levels for MSVC builds
2023-09-11 08:59:41 -07:00
build_scripts Removed appveyor and travis-ci scripts 2022-09-08 10:04:44 -07:00
cmake Additional fix/cleanup for FindDocutils.cmake 2021-02-04 14:59:14 -08:00
documentation Release 3.5.1 2023-07-20 11:58:39 -07:00
examples Merge pull request #1297 from davidgyu/dev_cxx_version 2023-07-06 14:56:14 -07:00
glLoader Merged GL Api Loader fixes from USD 2021-02-03 10:17:36 -08:00
opensubdiv Marked deprecated Osd::*Evaluator::SetNumThreads() 2023-08-25 20:10:09 -07:00
regression Fix bug in Bfr::SurfaceFactory with valence-2 interior vertex: 2023-03-14 19:02:04 -07:00
tools/stringify Implemented alternate Python 'stringify' tool 2022-09-12 17:19:27 -07:00
tutorials Removed non-primary build artifacts from config 2022-09-14 17:15:23 -07:00
.gitignore Several improvements to CI building and testing 2017-06-30 12:52:01 -07:00
.travis.yml Several improvements to CI building and testing 2017-06-30 12:52:01 -07:00
azure-pipelines.yml Added bfr tests to azure pipelines test runs 2022-09-08 10:00:03 -07:00
CMakeLists.txt Fixed inconsistent warning levels for MSVC builds 2023-08-25 21:00:32 -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
opensubdiv-config.cmake.in Updated cmake config export paths and target names 2022-09-15 02:34:02 -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 Improved documentation for OSD_CUDA_NVCC_FLAGS 2023-06-30 15:46:51 -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.

Linux Windows macOS
dev Build Status Build Status Build Status
release Build Status Build Status Build Status

Documents

Forum

Prerequisite

For complete information, please refer OpenSubdiv documents: Building with CMake

  • General requirements:
Lib Min Version Note
CMake 3.12 Required
  • Osd optional requirements:
Lib Min Version Note
CUDA 4.0 cuda backend
TBB 4.0 TBB backend
OpenCL 1.1 CL backend
DX11 SDK DX backend
Metal 1.2 Metal backend
  • Requirements for building optional examples:
Lib Min Version Note
GLFW 3.0.0 GL examples
Ptex 2.0 ptex viewers
Zlib (required for Ptex under windows)
  • Requirements for building documentation:
Lib
Docutils
Doxygen
Graphviz

Build example to run glViewer and other example programs with minimal dependency

All platforms:

  • Install cmake and GLFW

make sure GLFW install directories are configured as follows:

   ${GLFW_LOCATION}/include/GLFW/glfw3.h
   ${GLFW_LOCATION}/lib/libglfw3.a (linux)
   ${GLFW_LOCATION}/lib/glfw3.lib (windows)
  • Clone OpenSubdiv repository, and create a build directory.
   git clone https://github.com/PixarAnimationStudios/OpenSubdiv
   mkdir build
   cd build

Windows (Visual Studio)

cmake ^
    -G "Visual Studio 15 2017 Win64" ^
    -D NO_PTEX=1 -D NO_DOC=1 ^
    -D NO_OMP=1 -D NO_TBB=1 -D NO_CUDA=1 -D NO_OPENCL=1 -D NO_CLEW=1 ^
    -D "GLFW_LOCATION=*YOUR GLFW INSTALL LOCATION*" ^
    ..

cmake --build . --config Release --target install

Linux

cmake -D NO_PTEX=1 -D NO_DOC=1 \
      -D NO_OMP=1 -D NO_TBB=1 -D NO_CUDA=1 -D NO_OPENCL=1 -D NO_CLEW=1 \
      -D GLFW_LOCATION="*YOUR GLFW INSTALL LOCATION*" \
      ..

cmake --build . --config Release --target install

macOS

cmake -G Xcode -D NO_PTEX=1 -D NO_DOC=1 \
      -D NO_OMP=1 -D NO_TBB=1 -D NO_CUDA=1 -D NO_OPENCL=1 -D NO_CLEW=1 \
      -D GLFW_LOCATION="*YOUR GLFW INSTALL LOCATION*" \
      ..

cmake --build . --config Release --target install

iOS

SDKROOT=$(xcrun --sdk iphoneos --show-sdk-path) cmake -D NO_PTEX=1 -D NO_DOC=1 \
      -D NO_OMP=1 -D NO_TBB=1 -D NO_CUDA=1 -D NO_OPENCL=1 -D NO_CLEW=1 \
      -D CMAKE_TOOLCHAIN_FILE=../cmake/iOSToolchain.cmake -G Xcode \
      ..
  • This will produce an "OpenSubdiv.xcodeproj" that can be open and the targets 'mtlViewer' and 'mtlPtexViewer' (if NO_PTEX is ommitted and libPtex.a is installed in the iOS SDK) that can be run

Useful cmake options and environment variables

-DCMAKE_BUILD_TYPE=[Debug|Release]

-DCMAKE_INSTALL_PREFIX=[base path to install OpenSubdiv]
-DCMAKE_LIBDIR_BASE=[library directory basename (default: lib)]
-DCMAKE_TOOLCHAIN_FILE=[toolchain file for crossplatform builds]

-DCUDA_TOOLKIT_ROOT_DIR=[path to CUDA Toolkit]
-DOSD_CUDA_NVCC_FLAGS=[CUDA options, e.g. --gpu-architecture]

-DPTEX_LOCATION=[path to Ptex]
-DGLFW_LOCATION=[path to GLFW]
-DSTRINGIFY_LOCATION=[path to stringify utility]

-DNO_LIB=1        // disable the opensubdiv libs build (caveat emptor)
-DNO_EXAMPLES=1   // disable examples build
-DNO_TUTORIALS=1  // disable tutorials build
-DNO_REGRESSION=1 // disable regression tests build
-DNO_PTEX=1       // disable PTex support
-DNO_DOC=1        // disable documentation build
-DNO_OMP=1        // disable OpenMP
-DNO_TBB=1        // disable TBB
-DNO_CUDA=1       // disable CUDA
-DNO_OPENCL=1     // disable OpenCL
-DNO_OPENGL=1     // disable OpenGL
-DNO_CLEW=1       // disable CLEW wrapper library
-DNO_METAL=1      // disable Metal