Blender

From Gentoo Wiki
Jump to:navigation Jump to:search
The information in this article is probably outdated. You can help the Gentoo community by verifying and updating this article.

Blender is a free and open-source 3D creation suite. It can perform a variety of tasks, including modeling, rigging, animation, simulation, rendering, compositing and motion tracking, video editing, game creation and even 2D animation[1]. Blender's functionality can also be extended using add-ons written in Python. Blender is a community-driven project, but is supported by the Blender Foundation which funds core development[2].

Installation

USE flags

Blender has a lot of optional features that can be enabled for specific hardware or workflows. See Configuration for more information.

USE flags for media-gfx/blender 3D Creation/Animation/Publishing System

X Add support for X11
alembic Add support for Alembic through media-gfx/alembic.
bullet Enable Bullet (Physics Engine).
collada Add support for Collada interchange format through media-libs/opencollada.
color-management Enable color management via media-libs/opencolorio.
cuda Build cycles renderer with nVidia CUDA support.
cycles Build cycles renderer (requires media-libs/openimageio and dev-libs/boost).
cycles-bin-kernels Precompile the cycles render kernels for the CUDA/HIP/OneAPI backends, if they are enabled, at compile time. This makes it so that the user doesn't have to wait for the kernels to compile when they are used for the first time in Blender. If this option is not on, they will be built as needed at runtime.
debug 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
doc Add extra documentation (API, Javadoc, etc). It is recommended to enable per package instead of globally
embree Use embree to accelerate certain areas of the Cycles render engine.
ffmpeg Enable ffmpeg/libav-based audio/video codec support
fftw Use FFTW library for computing Fourier transforms
fluid Adds fluid simulation support via the built-in Mantaflow library.
gmp Add support for dev-libs/gmp (GNU MP library)
hip Build cycles renderer with AMD HIP support.
jack Add support for the JACK Audio Connection Kit
jemalloc Use dev-libs/jemalloc for memory management
jpeg2k Support for JPEG 2000, a wavelet-based image compression format
man Build and install man pages
nanovdb Enable nanoVDB support in Cycles. Uses less memory than regular openVDB when rendering.
ndof Enable NDOF input devices (SpaceNavigator and friends).
nls Add Native Language Support (using gettext - GNU locale utilities)
oidn Enable OpenImageDenoiser Support
openal Add support for the Open Audio Library
openexr Support for the OpenEXR graphics file format
openmp Build support for the OpenMP (support parallel computing), requires >=sys-devel/gcc-4.2 built with USE="openmp"
openpgl Enable path guiding support in Cycles
opensubdiv Add rendering support form OpenSubdiv from Dreamworks Animation through media-libs/opensubdiv.
openvdb Enable openvdb for volumetric processing, like the voxel remesher. Also enables volumetric GPU preview rendering for Nvidia cards.
optix Add support for NVIDIA's OptiX Raytracing Engine.
osl Add support for OpenShadingLanguage scripting.
pdf Add general support for PDF (Portable Document Format), this replaces the pdflib and cpdflib flags
potrace Add support for converting bitmaps into Grease pencil line using the potrace library.
pugixml Enable PugiXML support (Used for OpenImageIO, Grease Pencil SVG export)
pulseaudio Add sound server support via media-libs/libpulse (may be PulseAudio or PipeWire)
sdl Add support for Simple Direct Layer (media library)
sndfile Add support for libsndfile
tbb Use threading building blocks library from dev-cpp/tbb.
test Enable dependencies and/or preparations necessary to run tests (usually controlled by FEATURES=test but can be toggled independently)
tiff Add support for the TIFF image format
valgrind Enable annotations for accuracy. May slow down runtime slightly. Safe to use even if not currently using dev-debug/valgrind
wayland Enable dev-libs/wayland backend
webp Add support for the WebP image format

Emerge

root #emerge --ask media-gfx/blender
Note
To test what unstable packages an unstable version might need, making use of the --autounmask=y --autounmask-write emerge options can be helpful in populating a list for further review.

Configuration

Since Blender supports so many different hardware configurations, platforms, and use cases there are a lot of optional USE flags that can be enabled.

Audio device support

Support for PulseAudio, JACK, OpenAL, and SDL audio can optionally be enabled through their respective USE flags.

To choose the preferred audio backend, go to the Edit->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.

To enable graphics card rendering with Nvidia graphics cards, install Cuda:

root #emerge --ask --verbose dev-util/nvidia-cuda-toolkit

Inside Blender, go to the Edit->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 .. ] ]
Note
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.

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 provide high-performance subdivision surface modifier evaluation[3]. This can dramatically improve the frame rate of viewing animations in the viewport when using high levels of subdivision. Enable the opensubdiv USE flag to enable support in Blender.

Note
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.

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.

See also

External resources

References