Blender

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

USE flags
There are many additional features that can be enabled via USE flags. See the list above or the Additional Features section below for further details.

Unmask related packages by adding to :

Emerge
Currently, Gentoo package tree provides two versions of Blender:


 * Blender 2.72, requiring Python 3.4, which is no longer enabled by default. Please refer to PYTHON_TARGETS and enabled python 3.4 if you want to install Blender 2.72. Then proceed installing blender:


 * Blender 2.79+, requiring Python 3.5+, which is enabled by default. However this version of blender is not marked as stable. Easiest way to unmask it and all required dependencies would be using autounmask write:

Additional Features
This section lists many of the optional features available in blender and gives a brief overview of their use for beginning users.

Audio Device Support
Support for Jack, OpenAL or SDL audio can optionally be enabled through USE flags.

Inside blender, go to the File->User Preferences->System tab and set the Audio Dev to the desired setting.

Cuda Support
Cycles renderer can work on GPUs, for example Nvidia GTX 970 is about twice as fast as an i5 4690k on traditional BMW benchmark. Support for AMD GPUs and opencl is improving.

To enable graphics card rendering, install Cuda:

With 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) */

Inside blender, go to the File->User Preferences->System tab and set Compute Device to CUDA and select the graphics card in the box below. If the graphics card is not supported these options will not be visible.

Now set the renderer to Cycles Renderer and in the renderer panel under the Render options set the Device to GPU Compute.

The first time a render is created with a new version of blender, the CUDA kernels will need to be compiled. This may take over 15 minutes.

File Format Support
Support OpenCOLLADA (.dae), jpeg2k, sndfile and tiff image file formats can optionally be enabled through USE flags.

The collada USE flag adds entries to File->Import/Export for Collada (Default) (.dae) files. The others can be used with background images in the properties panel of the 3D View or as output formats in the render panel.

Blender should work with either ffmpeg or libav libraries, although only ffmpeg is officially recommended by the blender developers.

Headless (Server Only)
For render farms it is possible to compile blender with the headless USE flag. This is not recommended for most users.

This feature reduces the blender file size by around 5 MB, but it will not be possible to run blender normally as the GUI is not available.

In headless mode, blender can still be used to run python scripts from the commmand line

Memory Allocator
It is recommended to enable jemalloc to use a more efficient memory allocator. This reduces wasted memory during rendering and allows for larger scenes to be rendered.

Memory Profiling
Support for memory profiling can be enabled using the valgrind USE flag. See Debugging for instructions on setting up Valgrind.

OpenColorio
Open Colorio provides additional options under the Color Management section of the Scene panel.

Inside blender, select the Render View and Look options, and adjust the exposure, gamma and curves to obtain the desired look.

Opensubdiv
Opensubdiv is a set of libraries that improve subdivision surface modifier evaluation. This can dramatically improve the frame rate of viewing animations in the viewport when using high levels of subdivision.

Not all cards are suitable. The current code checks for geometry shader, GL_ARB_gpu_shader5, glProgramParameteri, glProgramParameteriEXT and glProgramParameteriARB. These are available as part of OpenGL 3.2, 4.0 and 4.1, or as extensions.

Support is enabled via the opensubdiv USE flag.

Inside blender, go to the File->User Preferences->System tab and set OpenSubdiv compute to the desired option. It may be possible to choose the CPU, but cards which support GLSL Compute will give better performance. This box will not appear if the card does not meet the requirements.

Finally check the Use Opensubdiv box in the subdivision surface modifier

OpenVDB
OpenVDB provides a data structure for storing and manipulating volumetric information efficiently. It can be compiled into blender using the openvdb USE flag, and openvdb-compression is also recommended as the data can require upwards of 20MB.

In blender, set the renderer to Cycles Renderer. Go to the physics panel and enable physics for Smoke. In the smoke section select Domain. Save the file to enable editing of the smoke cache. Change File Format to Openvdb and select Blosc compression if desired. Now create and bake the simulation.

Blender 2.72b Specific
Blender 2.72b is quite old and upgrading to 2.78 is strongly recommended.

x86 Intrinsics Compilation
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 pastebin if copying and pasting from formatting adds extra spaces that break the patch.)

Nvidia GTX 900 series in Blender 2.72b
Newer Nvidia cards are not supported in Blender 2.72 and upgrading to 2.78 is recommended. However it is possible to patch 2.72b:


 * 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:

External resources

 * Gentoo specific build instructions for Blender from Blender Wiki