The unofficial Yafray guide part-1

The unofficial Yafray guide

Warning this is an really really old tutorial updated last for blender2.3x if you are complete beginner and can’t navigate blender well then I would recommend you to blender wiki.

Part-1 of 3

PART-1 Yafray-Blender

Yafray integration is one of the best features added to Blender. The current release of Blender 2.34 have a very neat integration with Yafray from within Blender and is fairly stable to use. Unfortunately, Yafray usage is limited to those who are already comfortable with Blender interface or can hack their way through. The first part of the article deals with the basic steps needed to render from Yafray and later parts serve a guide for the rest of the Yafray’s feature available.


Blender has two of its own rendering engines built in and that includes its own raytracer and older scanline rendering engine. Yafray, however, is a standalone raytracer. Its functionality is accessed through Blender interface by exporting the scene parameters to Yafray readable format by two options. For the first one Blender have the required support built-in which allows Blender to use Yafray as a plug-in, virtually as if Yafray were an inbuilt renderer, and the other option where Blender exports the scene data to Yafray format in an XML file called ‘YBtest.xml’, and then Yafray renders it as a standalone program.

Both methods require Yafray to be first installed on the system and it is assumed that you have both Blender2.34 and Yafray0.07 installed on your system.

The Yafray integration in Blender can be broadly categorized in two parts. One relates to the interface for light or lamp settings. Another one to the core Yafray rendering features.

STEP-1: It is to be noted that this step might not be necessary for windows. Before we proceed, we first need to configure Yafray preferences. Drag down the top menu bar to un-hide Blender’s ‘User Preferences’ window. Here click on ‘File Paths’ button to open up the Path preferences menu. On the top left part is the ‘YFexport’ text entry box. Enter the path where you would like to save the exported blend file in Yafray format (XML file) while rendering with the second option. This is necessary if you want to save the exported file and later edit it manually.

Image1. Path selection in user Preferences menu.
Image1. Path selection in user Preferences menu.

STEP-2: As you are now aware Blender allows you to choose between its own internal ray-tracer and Yafray. To use Yafray you first have to instruct Blender. To do that press F10 for rendering options window, now go to “Render” tab in the ‘Render options’ window (Image2). In the ‘Render’ tab, select Yafray from the Render engine drop down list (Image3), by default ‘Blender internal’ is selected.

NOTE: Please do not get confused with the Ray button. This has nothing to do with enabling Yafray’s ray-tracing. It does not effect in any way to the Yafray renderings if Yafray is chosen as the raytracer from the ‘rendering engine’ drop down the list.

The default options in Render Tab.
Image2. The default options in Render Tab.
Notice as soon as you choose Yafray two more tabs appear beside the ‘Render’ tab (Image3). These two extra tabs are ‘Yafray’ and ‘Yafray GI’ and these two tabs have, rendering and other features and parameters of Yafray.

Image3. Yafray raytracer selection and its two sub-tabs.

Now select the ‘Yafray’ tab from the two new tabs, there will be some functions visible, right now we are interested in the button named ‘XML’ (pressed by default) (Image4). You go ahead and turn it off right now. I will explain why, as I had told earlier that blender have two options for rendering with Yafray, either as the plug-in interface or to call Yafray as a command line program.

Image4. Default Yafray tab with Yafray file export enabled. (XML button)
Image5. Disabled Yafray export

Choosing the plug-in or first option (‘XML’ button off) allows you to see the rendering progress in the render window (Image6), much like the Blender’s own rendering, and this is one of the reasons why Yafray requires and uses more memory than before. Using the second option which is by default (‘XML’ button pressed) active, will first export the active scene to the YFexport path, which you have set in your ‘File Paths’ preferences (step1). The Yafray is then called as command line program, and it takes over the processing of the exported XML file, and only after completion provides the image back to the render window, so there is no other interaction in between, save for the textual output in the Blender’s terminal window.

Image6. The rendering in progress for Yafray XML disabled.

STEP-3: After going through the first two steps, you have virtually done everything to make a Yafray render. At this time have your scene ready with lamps of your choice, the best thing to proceed from here is to press F12 to render. Here’s where the ‘problem’ crops up for almost everyone. I will explain… depending on the light settings in your scene, you will either see a blank screen or will see very faint outlines of the objects in the scene. Or if your lamps have higher light intensity(value) then you might see the scene properly. Or in extreme case Yafray and Blender do a crash thingy.

In case you came up with black render the chances are good that you can render through Yafray, all you need now is to adjust the light’s parameters, and you will have your own Yafray render within minutes. Points to check for problems.

The first problem for Yafray renders is that almost every time there is a lack of sufficient light intensity in the scene. This is not actually a problem of Yafray but an implementation issue from within Blender. So in this case you need to increase the light intensity or value of every lamp in the scene (more information in the second part).

If everything fails you might need to check for the distance value of the lamps since the light attenuation falloff is mostly sharper in CG (to reduce computations), your objects in the scene might appear black because their ray casting distance just might not reaching the objects in the scene. You can get over with it by adjusting distance value in the ‘Lamps’ tab.

In the case of crash please check the elysiun forums for possible answers.

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Up ↑

%d bloggers like this: