Blender is a professional free and open-source 3D computer graphics software.
- 1 Installation
- 2 Additional Features
- 3 Blender 2.72b Specific
- 4 See also
- 5 External resources
Installation of recent releases of Blender on Gentoo is rather complicated.
This page explains how to solve the most common issues for installation of version 2.78. Blender quickly changes, so these steps may soon become obsolete. Wiki editors will attempt to stay current on build instructions.If something is broken do not hesitate to make changes to the article.
USE flags for media-gfx/blender 3D Creation/Animation/Publishing System
||Enable Bullet (Physics Engine).|
||Add support for Collada interchange format through media-libs/opencollada.|
||Enable color management via media-libs/opencolorio.|
||Build cycles renderer with nVidia CUDA support.|
||Build cycles renderer (requires media-libs/openimageio and dev-libs/boost).|
||Adds DDS textures support to Blender.|
||Enable extra debug codepaths, like asserts and extra output. If you want to get meaningful backtraces see https://wiki.gentoo.org/wiki/Project:Quality_Assurance/Backtraces|
||Build C and Python API documentation directly from the source code.|
||Adds surface fluid simulation to Blender using El'Beem library.|
||Enable ffmpeg/libav-based audio/video codec support|
||Use FFTW library for computing Fourier transforms|
||Adds Game Engine support to Blender.|
||Build without graphical support (renderfarm, server mode only).|
||Add support for the JACK Audio Connection Kit|
||Use dev-libs/jemalloc for memory management|
||Support for JPEG 2000, a wavelet-based image compression format|
||Prefer libav over ffmpeg whenever both are supported|
||Enable features depending on llvm.|
||Build and install man pages.|
||Enable NDOF input devices (SpaceNavigator and friends).|
||Add Native Language Support (using gettext - GNU locale utilities)|
||Add support for the Open Audio Library|
||Allow OpenCL Graphics Acceleration. This may require extra graphics card drivers.|
||Support for the OpenEXR graphics file format|
||Enable OpenImageIO Support|
||Build support for the OpenMP (support parallel computing), requires >=sys-devel/gcc-4.2 built with USE="openmp"|
||Add rendering support form OpenSubdiv from Dreamworks Animation through media-libs/opensubdiv.|
||Add GPU preview rendering. Only works with nVidia cards.|
||Add support for OpenShadingLanguage scripting.|
||Build the Blender Player. THis requires the Game engine.|
||Build the provided unit tests.|
||Add support for memory debugging using dev-util/valgrind|
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.
# All these global USE flags could be specified locally if desired. # While both ffmpeg and libav currently work, only ffmpeg is officially recommended. # Cycles requires tiff. Add any additional formats required eg. jpeg png... # If audio is required, choose from openal, jack or sdl. USE="ffmpeg X opengl threads tiff openal jack sdl fftw openexr expat"
# blender media-gfx/blender python_single_target_python3_5 cycles boost openexr tiff openimageio player game-engine bullet fftw openal jemalloc opensubdiv openvdb openvdb-compression # Enable cuda or opencl if possible media-libs/opencv cuda opencl media-libs/openimageio opencv media-libs/opensubdiv cuda opencl ptex tbb
Unmask related packages by adding to /etc/portage/package.keywords:
media-gfx/blender ~amd64 sci-libs/ldl ~amd64 # Blender 2.78 requires python 3.5.2 (2.72b runs on the stable python 3.4) dev-lang/python:3.5 # For cuda support in 2.78 (See below for 2.72b patch) dev-util/nvidia-cuda-toolkit ~amd64 # For openvdb and openvdb-compression support dev-libs/c-blosc ~amd64 # Cycles and Open Shader Language require Boost dev-libs/boost ~amd64 dev-util/boost-build ~amd64
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:
emerge --ask media-gfx/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:
emerge --ask --autounmask-write --ask ~media-gfx/blender-2.79
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.
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:
emerge --ask --verbose dev-util/nvidia-cuda-toolkit
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
... #if defined(__GNUC__) #if __GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ > 8) #error -- unsupported GNU version! gcc 4.9 and up are not supported! #endif /* __GNUC__> 4 || (__GNUC__ == 4 && __GNUC_MINOR__ > 8) */ ...
replace "8" with "9" twice.
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
user $ blender -b -P script.py [-- [--optionsforscript .. ] ]
This functionality is also available with regular versions of blender, it is not necessary to enable the headless use flag to run scripts from the command line.
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.
Support for memory profiling can be enabled using the valgrind USE flag. See Debugging for instructions on setting up Valgrind.
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 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 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
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 @@ #define __UTIL_SIMD_TYPES_H__ #include <limits> +#include <x86intrin.h> #include "util_debug.h" #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 @@ #define CUDA_KERNEL_MAX_REGISTERS 63 #define CUDA_KERNEL_BRANCHED_MAX_REGISTERS 63 -/* 5.0 */ -#elif __CUDA_ARCH__ == 500 +/* 5.0 and 5.2 */ +#elif __CUDA_ARCH__ == 500 || __CUDA_ARCH__ == 520 #define CUDA_MULTIPRESSOR_MAX_REGISTERS 65536 #define CUDA_MULTIPROCESSOR_MAX_BLOCKS 32 #define CUDA_BLOCK_MAX_THREADS 1024
emerge --ask --one-shot media-gfx/blender
- OpenCL — a framework for writing programs that execute across heterogeneous computing platforms (CPUs, GPUs, DSPs, FPGAs, ASICs, etc.).
- Project:Artwork/Artwork: Gentoo artwork, including a .blend file used to create some of it.