Blender

This page contains the documentation for blender-2.72b, which is the latest version currently in the tree.

Blender is a professional free and open-source 3D computer graphics software.

USE flags
Setup USE flags for Blender in :

Unmask related packages by adding to :

Due to cycles may fail to compile. To work around it, create patch file:

diff -Nur old/intern/cycles/util/util_simd.h new/intern/cycles/util/util_simd.h --- old/intern/cycles/util/util_simd.h 2014-10-20 03:58:22.000000000 -0400 +++ new/intern/cycles/util/util_simd.h 2015-02-03 13:29:26.156893414 -0500 @@ -19,6 +19,7 @@ +#include 
 * 1) define __UTIL_SIMD_TYPES_H__
 * 1) include
 * 1) include "util_debug.h"
 * 2) include "util_types.h"

(This patch can also be obtained from http://pastebin.com/k20VbHjG if copying and pasting from formatting adds extra spaces that break the patch.)

Emerge
Emerge Blender:

Cuda
Cycles renderer can work on GPUs, for example Nvidia GTX 970 is about twice as fast as an i5 4690k on traditional BMW benchmark. As of February 2015, support for AMD GPUs and opencl is very limited.

To enable graphics card rendering, install Cuda:

Follow Blender's manuals to switch from CPU rendering to GPU. There may be complications. See the sections below.

Nvidia GTX 900 series
At the moment of writing this (February 2015), newer Nvidia cards are not supported in Blender 2.72, and Blender 2.73 is not in the Portage tree.

Fix is trivial, however:


 * Unmask and emerge dev-util/nvidia-cuda-toolkit of version 6.5.19 or higher
 * Create a file /etc/portage/patches/media-gfx/blender/blender.sm_52.patch with contents

diff --git a/intern/cycles/kernel/kernel.cu b/intern/cycles/kernel/kernel.cu index d5b5293..9ed4592 100644 --- a/intern/cycles/kernel/kernel.cu +++ b/intern/cycles/kernel/kernel.cu @@ -52,8 +52,8 @@ -/* 5.0 */ -#elif __CUDA_ARCH__ == 500 +/* 5.0 and 5.2 */ +#elif __CUDA_ARCH__ == 500 || __CUDA_ARCH__ == 520
 * 1) define CUDA_KERNEL_MAX_REGISTERS 63
 * 2) define CUDA_KERNEL_BRANCHED_MAX_REGISTERS 63
 * 1) define CUDA_MULTIPRESSOR_MAX_REGISTERS 65536
 * 2) define CUDA_MULTIPROCESSOR_MAX_BLOCKS 32
 * 3) define CUDA_BLOCK_MAX_THREADS 1024

Re-emerge Blender:

gcc 4.9
If you use gcc 4.9, cuda may not work, complaining that it does not support gcc-4.9 and higher. However, gcc 4.9 happily works after a simple dirty hack: in a file /opt/cuda/include/host_config.h ...
 * 1) if defined(__GNUC__)


 * 1) if __GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ > 8)


 * 1) error -- unsupported GNU version! gcc 4.9 and up are not supported!

... replace "8" with "9" twice.
 * 1) endif /* __GNUC__> 4 || (__GNUC__ == 4 && __GNUC_MINOR__ > 8) */

External resources

 * Gentoo specific build instructions for Blender from Blender Wiki