2012-08-10 05:14:44 +00:00
# OpenSubdiv
2012-06-08 17:05:35 +00:00
2012-12-11 01:15:13 +00:00
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.
2012-06-08 17:05:35 +00:00
2013-08-01 23:14:23 +00:00
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".
2012-06-08 17:05:35 +00:00
2013-08-15 17:22:26 +00:00
Feel free to use it and let us know what you think.
2012-06-08 17:05:35 +00:00
2012-08-10 05:14:44 +00:00
For more details about OpenSubdiv, see [Pixar Graphics Technologies ](http://graphics.pixar.com ).
2012-06-08 17:05:35 +00:00
2015-06-19 21:34:34 +00:00
* master : [![Build Status ](https://travis-ci.org/PixarAnimationStudios/OpenSubdiv.svg?branch=master )](https://travis-ci.org/PixarAnimationStudios/OpenSubdiv)
* dev : [![Build Status ](https://travis-ci.org/PixarAnimationStudios/OpenSubdiv.svg?branch=dev )](https://travis-ci.org/PixarAnimationStudios/OpenSubdiv)
## Documents
* [User Documents] (http://graphics.pixar.com/opensubdiv/docs/intro.html)
* [Doxygen API Documents] (http://graphics.pixar.com/opensubdiv/docs/doxy_html/index.html)
* [Release Notes] (http://graphics.pixar.com/opensubdiv/docs/release_notes.html)
2013-04-03 20:48:34 +00:00
2015-06-19 21:34:34 +00:00
## Forum
* [OpenSubdiv Google Groups] (https://groups.google.com/forum/embed/?place=forum/opensubdiv)
2013-04-03 20:48:34 +00:00
2015-06-19 21:34:34 +00:00
## Prerequisite
For complete information, please refer OpenSubdiv documents:
[Building with CMake] (http://graphics.pixar.com/opensubdiv/docs/cmake_build.html)
2013-04-03 20:48:34 +00:00
2015-06-19 21:34:34 +00:00
* General requirements:
2012-06-08 17:05:35 +00:00
2015-06-19 21:34:34 +00:00
| Lib (URL) | Min Version | Note |
| ------------------------------------- | ----------- | ---------- |
| CMake < br > http://www.cmake.org | 2.8.6 | *Required* |
2012-06-08 18:30:50 +00:00
2015-06-19 21:34:34 +00:00
* Osd optional requirements:
2012-06-08 18:30:50 +00:00
2015-06-19 21:34:34 +00:00
| Lib (URL) | Min Version | Note |
| ---------------------------------------------------- | -------------- | -------------- |
| GLEW < br > http://glew.sourceforge.net | 1.9.0 | GL backend (Win/Linux only) |
| CUDA < br > http://developer.nvidia.com/cuda-toolkit | 4.0 | cuda backend |
| TBB < br > https://www.threadingbuildingblocks.org | 4.0 | TBB backend |
| OpenCL < br > http://www.khronos.org/opencl | 1.1 | CL backend |
| DX11 SDK < br > http://www.microsoft.com/download/details.aspx?id=6812| | DX backend |
2012-08-10 05:14:44 +00:00
2015-06-19 21:34:34 +00:00
* Examples/Documents optional requirements:
2012-08-04 02:51:27 +00:00
2015-06-19 21:34:34 +00:00
| Lib (URL) | Min Version | Note |
| --------------------------------------------- | ----------- | ------------------- |
| GLFW < br > http://www.glfw.org | 3.0.0 | GL examples |
| Maya SDK < br > http://www.autodesk.com/maya | 2013 | maya plugin example |
| Ptex < br > https://github.com/wdas/ptex | 2.0 | ptex viewers |
| Zlib < br > http://www.zlib.net | | (required for Ptex under windows)|
| Docutils < br > http://docutils.sourceforge.net | | documents |
| Doxygen < br > http://www.doxygen.org | | documents |
2012-06-08 23:15:08 +00:00
2015-06-19 21:34:34 +00:00
## Build example to run glViewer and other example programs with minimal dependency
2012-08-10 05:14:44 +00:00
2015-06-19 21:34:34 +00:00
### All platforms:
2012-12-21 19:47:50 +00:00
2015-06-19 21:34:34 +00:00
* Install cmake, GLFW and GLEW (GLEW is not required on OSX)
2012-12-21 19:47:50 +00:00
2015-06-19 21:34:34 +00:00
make sure GLEW and GLFW install directories configured as follows:
2012-12-21 19:47:50 +00:00
2015-06-19 21:34:34 +00:00
```
${GLEW_LOCATION}/include/GL/glew.h
${GLEW_LOCATION}/lib/libGLEW.a (linux)
${GLEW_LOCATION}/lib/glew32.lib (windows)
2012-12-21 19:47:50 +00:00
2016-02-19 20:57:56 +00:00
${GLFW_LOCATION}/include/GLFW/glfw3.h
2015-06-19 21:34:34 +00:00
${GLFW_LOCATION}/lib/libglfw3.a (linux)
${GLFW_LOCATION}/lib/glfw3.lib (windows)
```
2012-12-21 19:47:50 +00:00
2015-06-19 21:34:34 +00:00
* Clone OpenSubdiv repository, and create a build directory.
```
git clone https://github.com/PixarAnimationStudios/OpenSubdiv
mkdir build
cd build
```
2012-12-21 19:47:50 +00:00
2015-06-19 21:34:34 +00:00
### Windows (Visual Studio)
2012-12-21 19:47:50 +00:00
2015-06-19 21:34:34 +00:00
* run cmake:
```
"c:/Program Files (x86)/CMake/bin/cmake.exe" ^
-G "Visual Studio 12 Win64" ^
-D NO_MAYA=1 -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 "GLEW_LOCATION=*YOUR GLEW INSTALL LOCATION*" ^
-D "GLFW_LOCATION=*YOUR GLFW INSTALL LOCATION*" ^
..
```
* Open OpenSubdiv.sln in VisualStudio and build.
2012-12-21 19:47:50 +00:00
2015-06-19 21:34:34 +00:00
### Linux
2012-12-21 19:47:50 +00:00
2015-06-19 21:34:34 +00:00
```
cmake -D NO_MAYA=1 -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 GLEW_LOCATION="*YOUR GLEW INSTALL LOCATION*" \
-D GLFW_LOCATION="*YOUR GLFW INSTALL LOCATION*" \
..
make
```
2012-12-21 19:47:50 +00:00
2015-06-19 21:34:34 +00:00
### OSX
2012-12-21 19:47:50 +00:00
2015-06-19 21:34:34 +00:00
```
cmake -D NO_MAYA=1 -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*" \
..
make
```
2012-12-21 19:47:50 +00:00
2015-06-19 21:34:34 +00:00
### Useful cmake options and environment variables
2012-12-21 19:47:50 +00:00
2012-12-21 19:53:08 +00:00
````
2015-06-19 21:34:34 +00:00
-DCMAKE_BUILD_TYPE=[Debug|Release]
-DCMAKE_INSTALL_PREFIX=[base path to install OpenSubdiv]
-DCMAKE_LIBDIR_BASE=[library directory basename (default: lib)]
-DCUDA_TOOLKIT_ROOT_DIR=[path to CUDA Toolkit]
-DPTEX_LOCATION=[path to Ptex]
-DGLEW_LOCATION=[path to GLEW]
-DGLFW_LOCATION=[path to GLFW]
-DMAYA_LOCATION=[path to Maya]
-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_MAYA=1 // disable Maya plugin 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
2012-12-21 19:53:08 +00:00
````
2013-02-03 16:45:10 +00:00