How To Install Yafaray Under Linux

One of the computing subtopics I dabble in, is the acquisition of 3D-graphics software. Therefore, I already have “Blender 2.78a”, which has its own built-in software-rendering engine, and I have several other rendering engines installed on my Linux-based computers.

Further, the rendering engines by themselves can be useless, unless they integrate well with a GUI (such as with Blender). And so one undertaking which I’ll typically reach with a given computer, is to install “Yafaray”, which used to be ‘Yafray’, which stood for ‘Yet Another Free Ray-Tracer’. If it’s installed properly, Blender can render its scenes, using Yafaray, but from within Blender.

Yafray used to be a much simpler piece of software to install than it has become. But I’m sure the effort I put into it this evening, will be well-worth it eventually. What I’m used to doing is to download a source-tree, and if it’s CMake-based, to run ‘cmake-gui‘ on it, to custom-pick my build options, and to go. But as it happens with Yafaray, this approach led to near chaos. What this did, was to compile all the source-code properly into libraries, but then to install those libraries to nonsensical locations within my system folders. One reason was the fact that a part of the project was to create Python 3 bindings, and another was the need for the Blender-integration, where modern Blender versions are based on Python 3. In any case I was sure to install all the build dependencies via my package-manager, but doing so was not enough to obtain working outcomes.


What I eventually needed to do was delete everything I had done, and then to follow the instructions at this URL:

Here, there are .TXT-Files that explain the procedure to custom-compile Yafaray for different systems, and to install it. What I found, was that when I followed the instructions to the letter, everything worked.

I suppose that a different question to ask might be, ‘What can Yafaray give me, when Blender already has its built-in rendering engine?’

And my answer would be that in addition to backwards-ray-tracing – that is, from the camera-position back towards the light-sources – Yafaray allows the users to add forwards, ‘Photonic Rendering’, from the light-sources, to some opaque points in the scene, which in turn can be transformed to screen-coordinates directly, where the effects can be blended with ray-tracing results.

This allows for such phenomena as ‘Caustic Lighting’ to be emulated, as well as just plain old Refraction, as acting on the light source. Further, the new Yafaray supposedly has good capabilities in Volumetric Rendering, which I have yet to explore.


Finally, I also used the globally-functioning ‘yafaray-xml’ executable, with its directory of plug-ins, to extend the ability of the package-installed ‘Wings3D’, to include Yafaray-rendering. Apparently, using the standalone version of Yafaray also works. Normally, Wings3D would default to using ‘POV-Ray’ as its ray-tracer, which is package-installable under Debian / Stretch.

But, getting the standalone configuration of Yafaray to work, essentially required that I not compile it yet another time. Instead I needed to recognize that as I had compiled it before, ‘yafaray-xml’ links to its libraries using relative paths, to which the previous build had installed everything under my home directory. Therefore, what I was able to do was to copy all the relevant directories, and the executable, to ‘/opt/dirk’ (as root), and to create a symlink to ‘/opt/dirk/yafaray-xml’.

That worked.


(Update 8/21/2019, 0h00 : )

I have now found that the correct way to install Yafaray to the system is, after having created the file ‘UserConfig.txt’ as suggested in the linked article, to edit that file, so that Line 9 states the USER_INSTALL_PREFIX is made equal to ‘/usr/local’, before running ‘cmake’, ‘make’, and ‘make install’.

Also, this time around, on the reincarnation of the old computer which is now named ‘Phosphene’, I installed ‘Yafaray Core’ and ‘Yafaray For Blender’ separately.



Print Friendly, PDF & Email

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>