From BlenderWiki

Jump to: navigation, search

Building Cycles

For a build with CPU rendering support, see the Building Blender documentation.

CUDA

Download the CUDA Toolkit 5.0 and install it. Make sure you have recent enough nvidia drivers (e.g. 301.X or newer).

For more details, see GPU rendering in the manual.

Bundling Binary Kernels

CUDA is enabled by default on Linux and Mac, however this will require the machine running Blender to have the CUDA toolkit installed. On Windows kernels need to be bundled with Blender, for that these cmake options must be set:

  • WITH_CYCLES_CUDA_BINARIES=ON
  • CYCLES_CUDA_BINARIES_ARCH=<arch> (optional, e.g. sm_21)

Or these scons options:

  • WITH_BF_CYCLES_CUDA_BINARIES = True
  • BF_CYCLES_CUDA_NVCC = "c:/path/to/nvcc.exe"
  • BF_CYCLES_CUDA_BINARIES_ARCH = (optional, e.g. sm_21)

Building CUDA kernels is slow, it may take a few minutes per CUDA architecture, and multithreaded builds can run out of memory. It will compile for all architectures by default, but it's quickest to specify only a single binary arch for your card, look here for the number.

Open Shading Language

To enable OSL, simply set the following cmake option:

  • WITH_CYCLES_OSL=ON

You will need to have OSL installed; on Linux the easiest way is by running the install_deps.sh script with the argument "--with-osl". Once you install OSL, you will then need to set the following cmake option so cmake will know where to find it:

  • CYCLES_OSL=/opt/lib/osl

You may also need to set these cmake options if they are not set automatically:

  • OSL_COMPILER=/opt/lib/osl/bin/oslc
  • OSL_INCLUDES=/opt/lib/osl/include
  • OSL_LIB_COMP=/opt/lib/osl/lib/liboslcomp.a
  • OSL_LIB_EXEC=/opt/lib/osl/lib/liboslexec.a
  • OSL_LIB_QUERY=/opt/lib/osl/lib/liboslquery.a