Build Yafaray 0.1.2 and integrate with Blender 2.56 Exporter (Ubuntu 10.10)

Build Yafaray 0.1.2 and integrate with Blender 2.56 Exporter (Ubuntu 10.10)

Hi all,
I finally have a bit of time to write this small step by step guide to build yafaray and integrate with Blender 2.56 exporter under Ubuntu 10.10.

Let's start!

Install dependencies and get source code

  • Open a new terminal and run the following commands:
sudo apt-get install git cmake g++ zlib1g-dev libxml2-dev libfreetype6-dev libjpeg62-dev libpng3 libpng12-0-dev
sudo apt-get install libtiff4-dev swig python3-all-dev libopenexr-dev libilmbase6 libopenal1 libfftw3-3
sudo apt-get install libavformat52 libavdevice52 libswscale0
git clone git://github.com/YafaRay/Core.git

Build Yafaray

  • Copy file ~/Core/CMakeConfig/UserConfig.template into ~/Core/CMakeConfig/UserConfig.txt
  • Edit file ~/Core/CMakeConfig/UserConfig.txt and replace the following lines (Replace megasoft78 with your username):
set(WITH_QT OFF)
set(BUILDRELEASE ON)
set(USER_INSTALL_PREFIX "/home/megasoft78/yafaray-build")
set(YAF_PY_VERSION 3.1)
  • Run the following commands under the terminal
cd ~/Core
mkdir build
cd build
cmake ../
make -j4
make install

(-j4 is to build using multiple processors (4=quad core, etc)

Build/Download Blender 2.56

At this point you can choose between download one of the latest build available on http://www.graphicall.org/builds/ or build your own version from source code using the following tutorial http://www.box.net/shared/phxu9semk8.

You need to have blender binary under /home/megasoft78/blender (change megasoft78 with you username)

Download exporter

cd ~/
git clone git://github.com/YafaRay/Blender-2.5-Exporter.git
cp -r ~/Blender-2.5-Exporter/ ~/blender/2.56/scripts/addons/yafaray/
cp -r ~/yafaray-build/lib/ ~/blender/2.56/scripts/addons/yafaray/bin/
cp ~/Core/install/bindings/python/yafrayinterface.py ~/blender/2.56/scripts/addons/yafaray/bin/
cp ~/Core/install/bindings/python/_yafrayinterface.so ~/blender/2.56/scripts/addons/yafaray/bin/
mv ~/blender/2.56/scripts/addons/yafaray/bin/yafaray ~/blender/2.56/scripts/addons/yafaray/bin/plugins

If you want to distribute it you should just compress blender folder under your home.

That's it. :)

Megasoft78