Vimeo page: http://vimeo.com/21469449
Description from Vimeo page:
Title kind of says it all. I'm going to walk through compiling from scratch everything needed to run LuxRender inside Blender 2.5x.
On the day that I did this, this is roughly equal to using Blender 2.57 and LuxRender 0.8 - though neither have quite been finalised yet.
This video is in 10 chapters:
CHAPTER 1 - SET UP ENVIRONMENT AND TOOLS
CHAPTER 2 - GETTING AND BUILDING PYTHON 3.2
CHAPTER 3 - GETTING AND BUILDING BLENDER 2.5
CHAPTER 4 - GETTING ATI STREAM SDK
CHAPTER 5 - GETTING AND BUILDING BOOST 1.43
CHAPTER 6 - GETTING LUXRENDER SOURCES
CHAPTER 7 - BUILDING LUXRAYS
CHAPTER 8 - BUILDING LUXRENDER
CHAPTER 9 - CONFIGURING LUXBLEND25 AND BLENDER 2.5
CHAPTER 10 - MAKING A SCRIPT TO UPDATE EVERYTHING
I made this walkthrough in a Virtual Machine, starting from a genuinely fresh install of Linux Mint 10, 64 bit.
The only thing I did pre-install was the VirtualBox addons, which enables a much smoother VM experience.
At the end of each chapter, I reset the Terminal to enable each part to stand-alone. This means that you don't need to sit through the entire 50 minutes in one sitting if you don't want to.
There are a couple of edits in the video, I admit. This is the reason that in chapter 2, two of the commands appear to not do anything.
I remain fairly confident that if followed, this tutorial will still work, so long as you issue all the same commands that I did, and edit the files properly.
I will test it again myself soon to verify, but for now, just producing this video required so much energy that I am going to leave it as-is.
# ============================================================================================
# NOTE - this is not a 'script' in the sense of a computer script
# it's more like a verbal script, or a set of clues as to what I
# needed to do in order to successfully build everything
These notes are not totally complete though, there was one or
two things extra I needed to do in the video that I hadn't realised
when I wrote these notes.
# ==============================================
# CHAPTER 1 - SET UP ENVIRONMENT AND TOOLS
# ==============================================
# configure gedit to display line numbers
# pre-build tools
sudo apt-get install build-essential mercurial subversion cmake flex bison
# make development location
mkdir /home/doug/dev
cd /home/doug/dev
# ==============================================
# CHAPTER 2 - GETTING AND BUILDING PYTHON 3.2
# ==============================================
cd /home/doug/dev
sudo apt-get install libbz2-dev zlib1g-dev
# python 3.2
wget http://python.org/ftp/python/3.2/Python-3.2.tar.bz2
tar xjf Python-3.2.tar.bz2
# make py build location
mkdir /home/doug/dev/python32_build
cd Python-3.2
./configure --enable-shared --prefix=/home/doug/dev/python32_build
make -j4
make install
# ==============================================
# CHAPTER 3 - GETTING AND BUILDING BLENDER 2.5
# ==============================================
# blender wiki linux build
# http://wiki.blender.org/index.php/Dev:2 ... untu/Scons
# http://wiki.blender.org/index.php/Dev:2 ... leshooting
mkdir /home/doug/dev/blender
cd /home/doug/dev/blender
# blender deps
sudo apt-get install gettext \
libxi-dev libsndfile1-dev \
libpng12-dev libfftw3-dev \
libopenexr-dev libopenjpeg-dev \
libopenal-dev libalut-dev libvorbis-dev \
libglu1-mesa-dev libsdl1.2-dev libfreetype6-dev \
libtiff4-dev libsamplerate0-dev libavdevice-dev \
libavformat-dev libavutil-dev libavcodec-dev libjack-dev \
libswscale-dev libx264-dev libmp3lame-dev
# blender svn
svn co https://svn.blender.org/svnroot/bf-blen ... nk/blender
cd blender
gedit user-config.py
"""
SUFFIX = "m" # may be any combination of 'dmu'
BF_PYTHON = '/home/doug/dev/python32_build'
BF_PYTHON_LIBPATH = '${BF_PYTHON}/lib'
BF_PYTHON_VERSION = '3.2'
BF_PYTHON_INC = '${BF_PYTHON}/include/python${BF_PYTHON_VERSION}' + SUFFIX
BF_PYTHON_BINARY = '${BF_PYTHON}/bin/python${BF_PYTHON_VERSION}'
BF_PYTHON_LIB = 'python${BF_PYTHON_VERSION}' + SUFFIX
BF_PYTHON_LINKFLAGS = ['-Xlinker', '-export-dynamic']
"""
python scons/scons.py -j4
cd /home/doug/dev/blender/install/linux2
gedit start_blender
"""
LD_LIBRARY_PATH=/home/doug/dev/python32_build/lib ./blender $*
"""
chmod +x start_blender
./start_blender
## -> verify running and quit immediately
# ==============================================
# CHAPTER 4 - GETTING ATI STREAM SDK
# ==============================================
cd /home/doug/dev
# ati stream
wget http://download2-developer.amd.com/amd/ ... -lnx64.tgz
tar xzf ati-stream-sdk-v2.3-lnx64.tgz
# ==============================================
# CHAPTER 5 - GETTING AND BUILDING BOOST 1.43
# ==============================================
cd /home/doug/dev
# boost 1.43
wget http://downloads.sourceforge.net/projec ... _0.tar.bz2
tar xjf boost_1_43_0.tar.bz2
cd /home/doug/dev/boost_1_43_0
./bootstrap.sh
gedit project-config.jam
"""
using python : 3.2
: /home/doug/dev/python32_build
: /home/doug/dev/python32_build/include/python3.2m
:
;
"""
gedit libs/python/src/converter/builtin_converters.cpp
# line 434
"""
intermediate
"""
./bjam -j4 python=3.2 stage
# ==============================================
# CHAPTER 6 - GETTING LUXRENDER SOURCES
# ==============================================
cd /home/doug/dev
# luxrender wiki
# http://www.luxrender.net/wiki/Building_on_Ubuntu_10.10
# luxrender deps
sudo apt-get install libopenexr-dev freeglut3-dev libglew1.5-dev libfreeimage-dev libqt4-dev libbz2-dev libpng12-dev
# luxrender source
mkdir /home/doug/dev/luxrender
cd /home/doug/dev/luxrender
hg clone http://bitbucket.org/luxrender/lux
hg clone http://bitbucket.org/luxrender/luxrays
hg clone http://bitbucket.org/luxrender/luxblend25
ls -l
# ==============================================
# CHAPTER 7 - BUILDING LUXRAYS
# ==============================================
cd /home/doug/dev/luxrender/luxrays
sudo apt-get install libxmu-dev
gedit CMakeLists.txt
# lines 96-97
"""
find_path(OCL_INCLUDE_PATH NAMES CL/cl.hpp OpenCL/cl.hpp PATHS /home/doug/dev/ati-stream-sdk-v2.3-lnx64/include /usr/local/cuda/include)
find_library(OCL_LIBRARY OpenCL /home/doug/dev/ati-stream-sdk-v2.3-lnx64/lib/x86_64)
"""
BOOST_ROOT=/home/doug/dev/boost_1_43_0 cmake .
make -j4
# ==============================================
# CHAPTER 8 - BUILDING LUXRENDER
# ==============================================
cd /home/doug/dev/luxrender/lux
gedit CMakeLists.txt
# lines 94-95
"""
FIND_PATH(OPENCL_INCLUDE_DIRS NAMES CL/cl.hpp OpenCL/cl.hpp PATHS /home/doug/dev/ati-stream-sdk-v2.3-lnx64/include /usr/local/cuda/include)
FIND_LIBRARY(OPENCL_LIBRARY OpenCL /home/doug/dev/ati-stream-sdk-v2.3-lnx64/lib/x86_64)
"""
# lines 865-866
"""
# Ignore this line, the python 3.2 we have is not system installed
# SET(CMAKE_USE_PYTHON_VERSION 3.1)
"""
# lines 886-887
"""
# so, FIND_PACKAGE(PythonLibs) will fail, but we'll cheat and pretend that it didn't
SET(PYTHONLIBS_FOUND 1)
"""
# lines 891-893
"""
# and then we'll set the python config manually
SET(PYTHON_LIBRARIES "-L/home/doug/dev/python32_build/lib/python3.2/config-3.2m -lpthread -ldl -lutil -lm -lpython3.2m -Xlinker -export-dynamic")
SET(PYTHON_INCLUDE_PATH "/home/doug/dev/python32_build/include/python3.2m")
"""
cd /home/doug/dev/luxrender
mkdir build
cd /home/doug/dev/luxrender/build
BOOST_ROOT=/home/doug/dev/boost_1_43_0 cmake ../lux
make -j4
# ==============================================
# CHAPTER 9 - CONFIGURING LUXBLEND25 AND RENDERING
# ==============================================
cd /home/doug/dev/luxrender/luxblend25/src/luxrender
ln -s /home/doug/dev/luxrender/build/pylux.so
cd /home/doug/dev/blender/install/linux2/2.56/scripts/addons
ln -s /home/doug/dev/luxrender/luxblend25/src/luxrender
cd /home/doug/dev/blender/install/linux2
./start_blender
# --> switch user prefs, enable luxrender, save user prefs, set internal and render
# ==============================================
# CHAPTER 10 - MAKING A SCRIPT TO UPDATE EVERYTHING
# AND MAKING LIFE EASIER
# ==============================================
cd /home/doug/dev
gedit rebuild_all
"""
cd /home/doug/dev
# first blender
cd blender/blender
svn up
python scons/scons.py -j4
cd /home/doug/dev
# then luxrays
cd luxrender/luxrays
hg pull -u http://src.luxrender.net/luxrays
make -j4
cd /home/doug/dev
# then luxrender
cd luxrender/lux
hg pull -u http://src.luxrender.net/lux
cd ..
cd build
make -j4
cd /home/doug/dev
# finally, luxblend25
cd luxrender/luxblend25
hg pull -u http://src.luxrender.net/luxblend25
cd /home/doug/dev
# finished
"""
chmod +x rebuild_all
# test it
./rebuild_all
# make a link to blender install dir for convenience
cd /home/doug
ln -s /home/doug/dev/blender/install/linux2 blender
cd blender
./start_blender
# ==============================================
# FIN
# ==============================================
