YORIK’S COFFEE CORNER

You are currently viewing a single post of this guestblog.

Click here to go back the complete page. I would be glad to hear your comments, so don’t hesitate to leave me your feedback below. It will appear on the main guestblog page.


in categories  blender  opensource  permalink:  141   posted on 02.08.2012 23:20
From Yorik

Building luxrender on linux



I wrote this little article mostly because I had to reinstall Luxrender (mostly to try Luke's work), and this will serve me as a memo for another time. The info below comes mostly from the official instructions.

First, you must install the dependencies listed on the official page above. Here luckily I already had all of them. Then, the luxrender system comes in 2 parts, luxrender and luxrays. So it's best to create first a containing folder, then clone the 2 repositories:

mkdir Luxrender-source
cd Luxrender-source
hg clone http://bitbucket.org/luxrender/lux
hg clone http://bitbucket.org/luxrender/luxrays
hg clone http://src.luxrender.net/luxblend25

Then, prepare for out-of-source build for luxrays:

cd ..
mkdir Luxrender
cd Luxrender
mkdir luxrays
cd luxrays
cmake ../../Luxrender-source/luxrays

Then, because of some bug between openCL 1.2 (which is the version I have here on debian wheezy) and 1.1 (which is used by lux), you must use the -DCL_USE_DEPRECATED_OPENCL_1_1_APIS option when compiling. The easiest way is to use cmake-gui:

cmake-gui .

Then add "-DCL_USE_DEPRECATED_OPENCL_1_1_APIS" to CXX_FLAGS and C_FLAGS. Press "Configure" then "Generate".

For me the luxrays library then compiles fine, but the benchmarks failed. But there is an option to compile the luxrays lib only:

make luxrays

If all went okay, let's do lux:

cd ..
mkdir lux
cd lux
cmake ../../Luxrender-source/lux

It will complain that luxrays was not found. Then, start cmake-gui:

cmake-gui .

And change the value of LUXRAYS_LIBRARY to the path of your luxrays/lib/libluxrays.a file. Also add the same compiler option as in luxrays above. Press "Configure" then "Generate". Then, build:

make luxconsole
make luxrender
make pylux

Now, go back to the luxblend folder and link pylux there:

cd ../../Luxrender-source/luxblend25
ln -s ../../Luxrender/lux/pylux.so

Then link the luxblend folder and the presets into your blender scripts folder:

cd ~/.blender/2.6X/scripts/addons
ln -s /path/to/Luxrender-source/luxblend25/src/luxrender
cd ../presets
ln -s /path/to/Luxrender-source/luxblend25/src/presets/luxrender

Then, all you need to do is open blender, activate the plugin, and set the path to /path/to/Luxrender/lux/ in the render options.

First and foremost, your name:

And your message:

To publish it, just press this ...