What is YafaRay

 

Table of Content:

What YafaRay is.

 

YafaRay logo, created by Javier Galán Rico in 2005.

YafaRay is a free open-source montecarlo raytracer.

Ray tracing is a rendering technique for generating an image by tracing the path of light through the 3D scene. This technique reproduces the natural behaviour of light and its particular effects on surfaces, such as reflection and refraction, caustics and indirect lighting between diffuse surfaces.

YafaRay usually works as add-on or plug-in to a 3D software to provide raytracing capabilities on demand though it can work as a stand-alone program as well. Blender 3D is the main host application of YafaRay at the moment but there are always on-going projects to add YafaRay support on other 3D packages and modellers.

YafaRay integration in Blender is fairly complete and stable but it should be always considered as a work in progress as Blender and YafaRay keep on evolving. 

View of the YafaRay render settings window in Blender, February 2013.

YafaRay Features.

YafaRay main features are:

Lights:

  • point
  • spot light
  • area light (rectangular, or parallelogram actually)
  • mesh light (uses a triangle mesh as light source)
  • sphere light
  • directional (with optional radius)
  • sunlight (basically a directional with incoming direction sampled from a cone)
  • environment light (background), with importance sampling for efficient image-based lighting (even without GI)

Materials:

  • Multiple materials for a mesh.
  • basic diffuse w. specular reflection, transparency and translucency, support for shader nodes on various properties
  • diffuse+glossy material (Ashikhmin&Shirley), Blinn or anisotropic microfacet distribution w. fresnel effect
  • shader nodes support on diffuse+glossy color, glossiness and bump
  • coated version of the above mentioned, adding specular reflection with fresnel effect (dielectric)
  • basic glass (dielectric) material, with fresnel, filter, absorption and dispersion.
  • emit material
  • export of blender's texture layers as shader nodes
  • blend material, using a blend value or a texture map.

Mapping:

  • Multiple textures for a shader.
  • UV coordinates.
  • Flat, cube, tube, sphere in global and relative coordinates.
  • Blending modes.
  • Stencil.

Textures:

  • Basic image textures (tga, jpeg, png, exr, hdr),
  • Procedural textures: cloud, marble, wood, voronoi, musgrave, distorted noise and "RGB-cube".

Backgrounds:

  • Constant.
  • Sunsky generator with sun light and sky light.
  • Texture, Image-based Lighting.
  • Simple gradient.

Cameras:

  • Perspective camera with raytraced DoF.
  • Architect with raytraced DOF.
  • Orthographic camera.
  • Angular camera.

Surface integrators:

  • direct lighting with support for ambient occlusion and caustic photon maps
  • path tracing
  • photon mapping with final gather
  • bi-directional path tracing
  • stochastic progressive photon mapping
  • Volume integrator

Volume rendering.

Antialiasing:

  • adaptive (simple color threshold based)
  • variable size reconstruction filters (box, gauss and mitchell-netravali currently)

Transparent shadows.

Multithreaded rendering passes and radiance map creation.

Basic XML writing and reading (using libXML) for scenes (see YafaRayXML for specifications).

Plugin based.

Project History

The YafRay (Yet Another Free Raytracer) project was created in 2001 by Alejandro Conty Estévez, and the first public release was in July 2002. These are Jandro's recollections from those years:

YafRay

by Alejandro Conty Estevez, Chris Williamson, Johnny Matthews.

Introduction

Relevant to Blender v2.31

by Alejandro Conty Estevez,

By the time I started working with YafRay, I was checking out some blender exporters like BMRT and Lightflow. While I was writing some exporting and shading code, I began to be interested in how a raytracer could be written. So when the exams season was in full swing, I became bored (as weird as it may sound) and began to write the main program structure. Once I got a few test renders, I put it off for a year, till the next summer. Then, I wrote the XML loader and YafRay, called "noname" by that moment, began to be an usable program.

Alfredo joined the development almost at the same time. That was of great help. A month later a lot of necessary stuff, like acceleration, were finished and Alfredo ported a lot of his code to YafRay. As the famous hemilight.

Then Luis Fernando Ruiz, a friend of mine and classmate joined to give us a good web site. So we said good bye to that boring plain text web site. We also had the chance to see YafRay rendering on several computers concurrently when Luciano Campal wrote his hack to make YafRay able to work in a distributed way thanks to mosix. It was very exciting when we got access to a 20 computers room for testing. Things started to look very promising when Andrea came with Yable. An experimental export script for an experimental renderer that resulted in a very long thread of cool images at elYsiun. We saw the first nice images done with Blender and rendered with YafRay thanks to him.

We didn't expect that boom. Neither Alfredo nor me. Of course it was the cool export script what was catching people, exporting easily from Blender to a raytracer. We got very excited with all that support from the community. I still get impressed by what people can do with a simple tool like this.

Now more people are getting involved and helping. We begin to have a good documentation section and resources, most of which have been written by Chris Williamson. Basically, it's what you'll see in this chapter. But he is not the only one. YafRay is also getting very easy to use from Blender thanks to Johnny Matthews. I think he spends almost every minute writing Extractor: a new export script for blender. It makes the exporting much more easy by getting all the data directly from blender with nearly no user interaction.

The current power of Extractor and its fast development point out that this could be the future official export scheme for exporting from blender. Anyway, efforts are being made to write a built-in exporter in blender. Alfredo contributed with a lot of shading compatibility code and did some experiments. So it seems we will be able to compare both python and built-in solutions at some point.

YafRay started as an experiment and still is. It's not finished and lacks a lot of features if you compare it with other render engines. I always think is not good enough and that it is hard to imagine what do people see in it. Since people like it for some reason, we now want to really convert it into a full rendering engine that deserves to be called "renderer". This will take some time to have fun coding. We want to add what YafRay lacks (particles, effects, etc...) and to improve global illumination. But only Alfredo De Greef and me are coding YafRay right now, so in order to keep the development up to an acceptable rate, we should get more people to code, more developers. I hope this happens sooner or later.

Finally, I want to thank all the Blender community that supported this project. All those beautiful pictures are what really bring people to YafRay. Likewise, thanks to all the people who give ideas and thoughts on the forums to improve YafRay, and to Juan David G. Cobas for his very appreciated math support.

By request from the Blender Community, YafRay was added as a Blender plugin from the 2.34 release on, in August 2004. Alejandro de Greef (eeshlo) coded most of the features in the late YafRay releases. At that time it was already evident that a code refactor was necessary in order to add new advanced features to YafRay. The last YafRay release was the 0.0.9 version in Summer 2006.

One of the first YafRay renders by Jandro, circa 2001.

YafaRay is the result of rewriting the YafRay source code from scratch. Mathias Wein (Lynx) started to work on the new engine in December 2005. As a result of the rewriting and to make people aware that it was actually a completely new engine, the YafRay name was changed into YafaRay. Nobody knows for sure what the added 'a' stands for.

One of the first YafaRay renders by Lyxn3D, circa 2005.