Вы находитесь на странице: 1из 108

Installation and Workflow

Downloads for various platforms are available on our Downloads Page.


Please open a thread in the forum section if you have any question about the YafaRay installation.
Table of Contents:
User Prerequisites.
General Workflow.
Windows Installer Notes.
OSX Installation Notes for YafaRay 0.1.1.
Debian packages for Ubuntu.
User Prerequisites.
It is good to have some previous knowledge about Blender before taking on YafaRay. It will be
particularly useful to know about Blenders interface arrangement! Blender lighting features!
Blender te"turing workflow and general scene handling. #ome background on basic lighting $
shading techniques will be very helpful to get good results with YafaRay as well.
General Workflow
YafaRay works with any Blender official release from blender.org.
YafaRay uses a python%coded settings interface to set up lighting! shading and rendering
parameters. &nce YafaRay is correctly installed! the settings interface can be launched by an
item automatically added in the Blender Render menu! called YafaRay Exort. Divide
your 'Dwindows and click on the menu item.

(o launch rendering! you must use the new RE!"ER buttons in the settings interface. )
separated window will pop up displaying the render progress as it was with the old versions.
In this separated interface you can view and save your images. #ome more features are
planned and if you have ideas! let us know *or send patches ...+.

You can try some e"ample scenes from here, http,--www.yafaray.org-download-e"amples
(he render ./I will block Blender as long as its open. #o you must close the ./I in order
to continue with Blender. Remember to save your render in your hard disk before closing the
render ./I. You can enable as well Autosave button in the Settings section so the render is
automatically saved in your hard disk. (he render will be saved in the same folder than the
Blender scene file.
(here is no way of 0reopening0 the ./I with the last rendered image. If you close the
window! the rendered image is gone.
1ore information about using YafaRay here.
Windows Installer notes.
(he installer has been tested and should work alright. If you e"perience any problems! please tell us
right away2.
3irst of all! for everything to work correctly! Pyt#on $.%.$ must be installed. If Python has been
correctly installed! you will get a missage in Blender back terminal! saying &C#e'kin( for installed
Pyt#on) (ot it*&
Blender should be already installed in your system and you should close Blender if open before
installing YafaRay. (he installation proccess is pretty straightforward! 4ust follow on%screen
instructions. If YafaRay has been correctly installed! you will get a new item in Blender Render
menu! called YafaRay Export. /se it to launch the YafaRay settings panel! as e"plained in .eneral
5orkflow section.
If you e"perience any problem! check this forum thread.
+,- installation notes for YafaRay .././
(he install has been changed completely! to match the new structure of YafaRay,
Re0o1e all old Pyt#on s'rits before you install.
)ll YafaRay%Python%files are installed now in -usr-local-share-yafaray-blender. * all scripts
and bindings! 67 files +
YafaRay%libs are installed in, -usr-local-lib * as before +
YafaRay%"ml is installed in, -usr-local-bin * as before +
8(%frameworks are installed in, -library-frameworks * as before +
)fter the installation there will be only a symlinked yafaray2ui.y left either in #cripts%
3older or in Blender.app%package%scripts! depending on where you chose to install it. (his
script now controls the whole 9"porter%functionality. "on3t worry it s#ows only . byte to
be installed) it is 'aused by bein( only a sy0boli' link.
(he installer searches for Blender in )pplications-Blender! only if found there! the
0Exorter456lender0%install is shown. If you have Blender in another location or renamed
it! please revert this or choose 09"porter%:Python#cripts0%install. If a Python#cripts%folder is
not present! it will be created by the installer.
;o need anymore to drag and drop anything.
7ust take your '#oi'e for exorter4lo'ation) t#ats all needed.
Please read also the instructions whereas installing.
(he renderparameter%overlay should now show, YafaRay 7.6.6 222
In terminal, yafaray%"ml %v should too show, YafaRay 7.6.6 222
Install YafaRay%installer as usual. /sed as an update! it only updates outdated components.
You can skip 8( if you already have 8( <." or higher installed or want to hold another
version. 8(%<.=.6 is bundled with the install! but all 8(%versions <." should work too.
If you never used e"ternal scripts before! make sure to set the pythonscripts%path in blender%
preferences.
;o further installs needed
1ake sure you use a Blender compiled with Python >.= *called 0custom0 at
blender.org-downloads+
Important, YafaRay is compiled against Python >.=.6%)pple! the pre%installed one2 Dont
install any other Python%version. (his could break functionality.
(he tested configuration is using the preinstalled Python >.=.6%)pple on &#? 67.=."
*resides in #ystem-@ibrary-3rameworks+ and the Blender compiled with Python >.=
0custom0! too2
&ther combinations may not work.
.reetA...Bens
"ebian a'ka(es for Ubuntu.
/ninstall previous versions before installing YafaRay. If the e"port script doesnt appear on render
menu! refresh scripts in the user preferences of Blender.
)ll dependencies should be set properly! so the installation may prompt you that additional
packages from /buntu repository which will have to be installed.
W#at is YafaRay
Table of Contents:
5hat YafaRay is.
YafaRay Features.
Project History.
W#at YafaRay is.

YafaRay logo, created by Javier Galn Rico in 200!
YafaRay is an open source raytracing render engine. )s an open source pro4ect! users and
developers have free access to the source code and it is free! as in free speech.
Ray tracing is a rendering technique for generating an image by tracing the path of light through the
'D scene. (his technique tries to reproduce the natural behaviour of light and its particular effects
on surfaces! such as reflection and refraction! caustics and indirect lighting.
YafaRay works as a render engine. )n engine consists of a faceless computer program that
interacts with a host 'D application to provide very specific raytracing capabilties 0on demand0.
Blender 'D is the host application of YafaRay.
By using python scripts! YafaRay takes advantage of the new ID Property mechanism of Blender to
retrieve most of the scene data! without adding any custom code to Blender. &ther specific
parameters are set up by a python%coded settings interface used from Blender.
YafaRay 8eatures.
YafaRay main features are,
@ights,
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 .I+
1aterials,
1ultiple materials for a mesh.
basic diffuse w. specular reflection! transparency and translucency! support for
shader nodes on various properties
diffuseCglossy material *)shikhmin$#hirley+! Blinn or anisotropic microfacet
distribution w. fresnel effect
shader nodes support on diffuseCglossy 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
e"port of blenders te"ture layers as shader nodes
blend material! using a blend value or a te"ture map.
1apping,
1ultiple te"tures for a shader.
/D coordinates.
3lat! cube! tube! sphere in global and relative coordinates.
Blending modes.
#tencil.
(e"tures,
Basic image te"tures *tga! 4peg! png! e"r! hdr+!
Procedural te"tures, cloud! marble! wood! voronoi! musgrave! distorted noise
and 0R.B%cube0.
Backgrounds,
Eonstant.
#unsky generator with sun light and sky light.
(e"ture! Image%based @ighting.
#imple gradient.
Eameras,
Perspective camera with raytraced Do3.
)rchitect with raytraced D&3.
&rthographic camera.
)ngular camera.
#urface integrators,
direct lighting with support for ambient occlusion and caustic photon maps
path tracing
photon mapping with final gather
bi%directional path tracing
Dolume integrator
Dolume rendering.
)ntialiasing,
adaptive *simple color threshold based+
variable siAe reconstruction filters *bo"! gauss and mitchell%netravali currently+
(ransparent shadows.
1ultithreaded rendering passes and radiance map creation.
Basic ?1@ writing and reading *using lib?1@+ for scenes *see YafaRay?1@ for specifications+.
Plugin based.
Pro9e't :istory

(he YafRay *Yet )nother 3ree Raytracer+ pro4ect
was started in >776 by )le4andro Eonty 9stFveA!
and the first public release was in Buly >77>. (hese
are Bandros recollections from those years,
http,--www.blender.org-documentation-htmlI-c6>>'
=.html
By request from the Blender Eommunity! YafRay
was added as a Blender plugin from the >.'<
release on! in )ugust >77<. )le4andro de .reef
*eeshlo+ coded most of the features in the late
YafRay releases. )t that time it was already evident
that a code rewriting was necessary in order to add
new advanced features to YafRay. (he last YafRay
release was the 7.7.G version in #ummer >77H.
&ne of the first YafRay renders by 7andro!
>776 "Above#


YafaRay is the result of rewriting the YafRay
source code from scratch. 1athias 5ein *@yn"+
started to work on the new engine in December
>77=. )s 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. ;obody knows for sure what the added
a stands for.
&ne of the first YafaRay renders by ;yxn<"!
Table of Contents:
YafaRay settings UI introduction and Render Buttons.
Render Output Windows.
Blender settings supported.
Render Windows Settings.
Tone mapping.
YafaRay settin(s UI introdu'tion and Render buttons.
Once everything is installed, a special entry is added in the Blender Render menu, called YafaRay
Export 0.0.3, which automatically executes the YafaRay User Interface (UI) inside a Blender
3DWindows. Split your 3DWindows and click on YafaRay Export 0.0.3
Note: Here you can learn how to split the Blender 3DWindows:
The YafaRay User Interface (UI) will be shown, which is divided into:
1. Three function buttons which are Render, Render Anim and Render View.
2. Three main sections of settings which are Object/Light/Camera, Material, World and
Settings.
R E N D E R: Launches the scene rendering in a separate Render Output Window on which
the render progress can be seen. Use the Render Output Window settings to save your image.
Once the render is finished or stopped, the Render Output Window must be closed before
coming back to Blender. Don't forget to save your render.
Render anim: renders the frames set in Blender, using the Blender active camera. Frames are
saved in Blender output dir. Use the first textbox ("Directory/name") in the F10 "Output"
panel to determine where to output the animation frames. It also uses the '#' character in the
Blender input field to enumerate frames. If this box is empty, the Render directory in the
Blender Preferences is used.
Render view: renders the Blender active 3DWindows.
Objects: The script takes the current Blender selected and active object and gives it custom
YafaRay properties, depending on the object selected (camera, light or object). Lights and
camera settings in the YafaRay UI script replace almost all Blender settings.
Material: The script takes Blender defined materials and applies them custom YafaRay
material properties.
World: background settings and volumetric integrators.
Settings: This section is used to choose a lighting method and to configure render general
parameters and render anti-aliasing.
You can scroll the settings UI up and down by holding down the mouse scroll wheel while moving
the mouse on the interface.
Render +utut Window
The render output is handled in a separated window from Blender. This render window appears
when the rendering process is launched from the settings UI. The render window includes options
and parameters to save renders. The render window will block Blender as long as it's open. You
must close the it in order to continue working with Blender. Remember to save your render in your
hard disk before closing.
6lender Render ,ettin(s ,uorted
Render resolution is pre-configured in Blender, as well as the frame output. These are the Blender
render settings that will be taken into account when rendering with YafaRay (in green):
Ouput panel: Button to set output directory for frames
Render panel: Buttons to set a relative render size and Border button (Shift+B), for previews.
Anim panel: start frame, end frame
Format panel: Buttons to set image size
Render +utut Window ,ettin(s.
The Render Output Window is an external application to Blender in which YafaRay renders are
viewed and saved. Settings in this external application are:
Render!: Renders the current scene again. Use this button to render a scene loaded in
YafaRay XML format.
Cancel: Cancels the render in progress.
Use Alpha: When enabled, images are saved with RGB and alpha data instead of
background, if the file format supports it (PNG).
Close: Closes the Render Output Window and returns to Blender. When the the window is
closed, the rendered image is gone unless it is saved.
File, Open: Loads a YafaRay scene in XML format. Scenes can be saved in the YafaRay
XML format by using the Output to XML button in the 'Settings' section (UI).
File, Quit: Quits the Render Output Window and returns to Blender.
Image, Save As: Saves the current render as an image file, using the supported formats,
which are BMP, PNG and EXR.
Image, Zoom In: to zoom in details in a render. You can use + in your keyboard as well.
Image, Zoom Out: zooms out for a full view. You can use - in your keyboard as well.
Tone 0ain(.
Renders can be saved (save as) using a high dynamic range format (EXR). The aim of this feature is
to perform tone mapping operations on the High Dynamic Range (HDR) of the image. Some ideas
about this option:
YafaRay always works internally using high dynamic range, which means that it produces a
range of colors and luminance more according with the human eye. The colors you see on
display are only a limited part of the colors YafaRay has calculated for a given render. This is
true for most raytracers.
This extra range cannot be stored using 8-bits file formats (bmp, jpg, png).
EXR is a high dynamic range imaging image file format, released as an open standard by
Industrial Light and Magic (ILM) and released under a free software license. It is notable for
supporting 16-bits-per-channel. EXR allows for a dynamic range of over thirty stops of
exposure.
Many common post processing operations like gamma correction, saturation or brightness &
contrast are gamma-destructive, because results in such operations can be only approximated
or the destination value does not exist because it is out of range. This is particularly true
when editing 8-bits formats such as JPG.
Tone mapping is a technique to approximate the appearance of high dynamic range images
with a more limited dynamic range. With tone mapping, you can choose a mood for your
renders from the full range of colors YafaRay is able to calculate.
The Exposure control in the old YafRay 009 was in fact a tone mapping control.
It is a good idea saving always a EXR version of your render, along with the 8-bits version.
By using HDR, you can perform these operations without destroying image data. Apart from
exposure, tone mapping filters allow for other interesting operations, such as saturation
control, brightness & contrast controls, chromatic and light adaptation, etc.
At the moment we don't have implemented any tonemapping filter in YafaRay, although it is a
planned feature. We would like to recommend QTpfsgui for tonemapping operations on your HDR
renders: http://qtpfsgui.sourceforge.net/
The correct workflow in qtpfsgui is tone mapping on the linear HDR render, which means that the
Pre Tone mapping gamma adjustment should be 1 / YafaRay Output Gamma. This will produce
better colors and a more consistent contrast. This is a table for tonemapping Pre gamma values:
YafaRay Output Gamma qtpfsgui HDRI display qtpfsgui Pre Gamma
1.8 Linear 0.5555
2.2 Linear 0.4545
This a comparison between a YafaRay original render (left), and its tone mapped versions (right),
using Reinhard 2005. Scene by Kronos:
+b9e'ts) ;i(#ts and Ca0era settin(s
Table of Contents:
&b4ect! @ights! and Eamera settings
introduction.
Object (meshlight).
Lights.
Point and Sphere.
Directional and Sun.
Area.
Spot
Camera settings.
Architect / DOF.
Angular.
Orthogonal.
Perspective / DOF.
+b9e't) ;i(#ts) and Ca0era settin(s.
In general! settings under this section of the YafaRay /I are used to give specific YafaRay
properties to light sources and cameras in the Blender 'D scene. &nly a limited number of Blender
settings are taken into account by YafaRay. (he general workflow is,
6. Ereate or select an e"isting ob4ect *camera! light or mesh+.
>. .ive it YafaRay specific settings.
+b9e't =0es#li(#t>.
5ith this feature! ob4ects in the scene can act as area light sources. (he soft shadows produced by
area lights need to be sampled several times and later interpolated to reduce noise. (his type of light
takes more time to render in contrast with point light types such as spot and point.
3irst of all! you must select the mesh you want it to act as a light source. (hen you must click on the
$b%ect&'ig(t&)a*era main button. 3inally you must activate the Enable +es(lig(t button. (o
change the light color! 4ust click on the rectangle ne"t to 1eshlight color to open a Eolor Picker.

+es(lig(t color rectangle, opens a Eolor Picker.
,o-er, intensity multiplier for meshlight color.
.ouble Sided, considers both sides of the mesh as
arealight sources.
Sa*ples, defines the amount of samples taken to
calculate the soft shadows. (he more samples! the
less noisy the shadows but the longer it will take to
render. (he total amount of light sampling depends
as well on the anti%aliasing settings! as e"plained in
this section.
9"ample of 1eshlight.
Related articles,
3irst anti%aliasing pass.
.lossy reflection sampling.
&ther area light types,
#pherelight.
)realight.
;i(#ts.
@ights settings are mostly controlled by the YafaRay /I. In Blender! the only actions required are
placing lights and choosing a Blender light type. )realight siAe and spot beam parameters are
controlled in Blender panels though. In YafaRay! lighting power is controlled by a couple of settings
*)olor and ,o-er+ available in the python /I for every light type! therefore the Blender .istance
and Energy buttons dont have any effect in YafaRay.
&nce a light is placed and its type defined in Blender! select it and press $b%ect&'ig(t&)a*era main
button. (he python /I will automatically change to show specific settings for the type of light
selected. It you want to change a light to another type! you have to change it in Blender first.
Point and ,#ere.
5hen you create or select a 'a*p light in the Blender /.0indo-s! the python /I will let you
choose between two options to do this kind of 4ob! Point and #phere. ) Point light is a typical omni
directional point light source as in Blender Internal with hard shadows! while a #phere light is a
spherical area light source which can produce soft shadows.
(he Sp(ere light settings are,

'ig(t color rectangle, opens a Eolor Picker.
,o-er, intensity multiplier for light color.
Radius, sets the radius of the #phere light in
Blender units.
+a1e lig(t visible, area light gets rendered
visibly.
Sa*ples, defines the amount of samples taken
to calculate the soft shadows. (he more
samples! the less noisy the shadows but the
longer it will take to render. (he total amount of
light sampling depends as well on the anti%
aliasing settings! as e"plained in this section.
Eomparison between point light *left+ and spherelight *right+. ;otice the different shadows.
Related articles,
3irst anti%aliasing pass.
.lossy reflection sampling.
&ther area light types,
)realight.
1eshlight.
"ire'tional and ,un.
5hen you create or select a #un light in the Blender 'D5indows! the YafaRay /I will let you
choose between two kind of lights to do this kind of 4ob! Directional and #un. Directional light is a
traditional sun light model which produces parallel rays and hard%edged shadows.
'ig(t color rectangle, opens a Eolor Picker.
,o-er, intensity multiplier for light color.
2nfinite, if enabled! area covered by the directional light is infinite. If disabled! light fills a
semi%infinite cylinder.
Radius, if infinite is disabled! radius of the semi%infinite cylinder for directional light.
(he new YafaRay Sun light is a more advanced concept and will help us to get blurred%edged
shadows when the shadow itself gets away from the casting ob4ect! as in real life. (he angle button
sets the visible area of the sun. Real #un is visible in a cone angle of about 7!=I. ) bigger angle
mean a bigger sun! as well as softer shadows! which could be interesting for dawn or sunset scenes.
) very big angle can be used to simulate sun light filtered by an overcast sky.
'ig(t color rectangle, opens a Eolor Picker.
,o-er, intensity multiplier for light color.
Angle, visible siAe of the sun light. )ffects shadows.
Sa*ples, it defines the amount of samples taken to calculate the soft shadows. (he more
samples! the less noisy the shadows but the longer it will take to render. (he total amount of
light sampling depends as well on the anti%aliasing settings! as e"plained in this section.

Eomparison between Directional *left+ and #un *right+. ;otice how! with a #un light! shadows get
blurred as the distance with the casting ob4ect increases.
?rea.
)realight is a area light type that can produce soft shadows and its shape can be seen in reflective
surfaces. (he arealight shadows need to be sampled several times and interpolated to reduce noise.
(his type of light takes more time to be computed in contrast with point light types such as spot and
point.

(he area light siAe is controlled by the Si3e setting in the
Blender @amp panel. (he rectangular shape option in that
panel is not supported! although you can get a YafaRay
rectangular arealight by scaling on axis in the /.0indo-s
5hen +a1e lig(t visible is enabled! a rectangle in the siAe
of the area light is generated! so that the area light gets
rendered visibly. 1ore lighting power is added as well to
the scene.
5hen photon mapping is enabled! arealights cast photons.
(he +a1e lig(t visible option only makes the arealight
visible from the camera and in reflective surfaces. 5hen
pathtracing is used! the +a1e lig(t visible option also
creates caustics paths! although there e"ist an option to not
trace caustics paths with path tracing as they tend to be
e"tremely noisy *none option in Pathtracing settings! see
=.6.6+.
'ig(t color rectangle, opens a Eolor Picker.
,o-er, intensity multiplier for arealight color.
+a1e lig(t visible, area light gets rendered visibly.
Sa*ples, defines the amount of samples taken to
calculate the soft shadows. (he more samples! the
less noisy the shadows but the longer it will take to
render. (he total amount of light sampling depends
as well on the anti%aliasing settings! as e"plained in
this section.
Related articles,
3irst anti%aliasing pass.
.lossy reflection sampling.
&ther area light types,
#pherelight.
1eshlight.
,ot.
#pot is a common point light with directional properties. 'ig(t color and ,o-er settings work like
in the other light types. Beam properties are defined in Blender panels *light select. $ 3=+ by SpotSi
and Spot4l sliders,

Ca0era settin(s.
3irst a camera should be created or e"ist in your scene. @ens angle and ortho scale must be
configured in the Blender )a*era panel *3G+. (hen select the camera and press
$b%ect&'ig(t&)a*era main button. (he python /I will automatically change to show specific
camera settings. (here are four camera types in YafaRay, )rchitect! )ngular! &rthogonal and
Perspective.
?r'#ite't@ "+8.
(his camera type works like a Perspective camera type! the only difference is that the vertical
component of the perspective effect is neglected! so scene vertical lines are not convergent. Depth
of 3ield settings are available for this camera typeJ however! D&3 settings are e"plained in the
Perse'ti1e@"+8 section.

Eomparison between Perspective *left+ and )rchitect camera *right+. ;otice the lack of vertical convergence in the )rchitect
camera. #cene by Kronos
?n(ular.
) camera type useful to produce up to 6L7 degree panoramas! like the ones produced by fish eye
cameras. )lternatively this camera type can be used to create a nice perspective distortion in your
renders. Results with this camera type are controlled by two factors, distance to the sub4ect and
angle of view.
)ngle of view of a camera
+irrored, 1irrors the render in the " direction! as the reflections on a light probe.
Angle, MoriAontal opening angle of the camera! takes into account camera aspect ratio to
calculate the vertical opening.
)ircular, Ereates a circular render and shades areas outside.
+ax Angle, Diagonal opening of the circular render.
9"ample of an angular camera! used to create perspective distortion. #cene by Gabi'#,
+rt#o(onal.
) camera type that renders an orthographic *perpendicular+ pro4ection of the scene! without
perspective effects. Eamera only setting is,
,'ale, #pecify the scale of the ortho camera! to control camera Aoom.
Eomparison between perspective camera *left+ and ortho camera *right+.
Perse'ti1e @ "+8.
Perspective is the standard camera mode that simulates a lenses photographic camera with
perspective effects. )ll settings available for this camera type are used to enable and configure the
depth of field *D&3+ effect. (he depth of field is the distance that ob4ects appear in focus. D&3
settings are,
6oke# tye, controls the shape of out of focus points when rendering with depth of field
enabled *blur disk+. (his is mostly visible on very out of focus highlights in the image. (here
are currently seven types to choose from.
6oke# rotation, rotation of the blur disk.
?erture, (he siAe of the aperture determines how blurred the out%of%focus ob4ects will be.
) rule of thumb is to keep it between 7.677 and 7.=77 *7 disables D&3+.
6oke# bias, controls the accentuation of the blur disk. (hree types available! uniform!
center or edge! with uniform the default.
"+8 distan'e, set the focal point in which ob4ects will be in focus.
+b9, 9nter the name of the Blender ob4ect that should be the focal point.
Cal'ulate distan'e, it calculates the distance between the ob4ect entered in &b4 and the
camera! and writes this value in the D&3 distance button.
(he "+8 effect depends also on the render anti aliasing settings to get a nice blurred effect. 3irst of
all it is recommended to lower )) threshold a bit! but not set it to totally Aero. #etting a high
number of )) passes is also not really going to make all that much difference! the main smoothness
factor that makes the most difference is really the amount of )) samples. ) single pass with a high
number of samples may be sufficient.
Texture Inut
Table of Contents:
(e"ture mapping *introduction+
Image Texture Input
Object Mapping
Stencil
Blending modes
Procedural textures
Noise Basis
Clouds
Marble
Wood
Musgrave
Voronoi
Distorted Noise
Texture Aain(
&ne of the main points of the old YafRay was the close support of Blender te"turing features! and
YafaRay keeps this tradition. YafaRay relies on Blender panels to setup te"turing parameters. In
general! YafaRay supports,
1any of the settings in the Blender Texture buttons section *3H+
1ost of the settings in the (e"ture! 1ap input and 1ap to panels in the Blender Aaterial
buttons section *3=+.
#ome of the Blender procedural te"ture types and their respective settings.
1ultiple te"ture channels for a material.
3or a detailed e"planation read on in the ne"t sections.
I0a(e Texture Inut
(e"ture input is done by selecting 2*age as a (e"ture (ype in the (e"ture panel and loading the
image in the Image panel. You can use more than one te"ture channel in the (e"ture panel! each of
them doing different 4obs. YafaRay supported formats are tga! 4peg! png! e"r! hdr. (his is an
overview of supported settings in the (e"ture buttons section *3H+! in green color,
Rot50, rotates the Image G7 degrees counterclockwise.
6seAlp(a, Renders the te"ture alpha channel as transparent *if e"ists+
)alcAlp(a, calculates alpha values from a R.B image! for mapping transparency and
translucency in the shinydiffuse material.
Extend, the colour of the edge is e"tended outside the image.
)lip, an alpha value of 7.7 is returned outside the image. (his allows you to paste a small
logo on a large ob4ect.
)lipcube, outside a cube%shaped area around the image! an alpha value of 7.7 is returned.
Repeat, (he image is repeated horiAontally and vertically as often as set in ?repeat and
Yrepeat
)(ec1er, a checkerboard is made. 1ortar governs the distance between the checkers.
7repeat, Yrepeat, sets a repetition multiplier in the corresponding direction.
+ix 7, Y 8 +ax 7, Y, /se these to crop! or choose a portion of the te"ture.
!ote: YafaRay can not load Blender encapsulated te"tures. If your Blender file has got
encapsulated data! you must unpack first *3ile:9"ternal Data:/npack+. YafaRay will load te"tures
from the created te"tures folder.
During the rendering process! the Blender back console shows up messages when a te"ture image
cant be loaded by YafaRay. Pay attention to them2
If your file is unpacked but YafaRay cant load te"tures! be sure that the path selected in the Image
panel points to the actual location of the file in your MD.
+b9e't Aain(
In the Blender Aaterial buttons section *3=+! YafaRay supports only settings in the (e"ture! 1ap
input and 1ap to panels. #ettings in the other panels are irrelevant to YafaRay. In general!
YafaRay supports,
1ultiple te"ture channels
#ome of the available coordinates for mapping.
3lat! Eube! (ube and #phere pro4ection.
Eoodinates offset! scaling and transformation.
(e"ture 1odulation modes! depending on material type.
Inverse 1odulation of modes supported.
Eomplementary modulation settings.
#tencil.
Blending modes.
#upported settings in each Blender panel are *in green color+,
9exture c(annels, YafaRay supports multiple
te"ture channels for a material. Blender
principles are observed here, each channel can
have its own individual mapping settings and
the lower channel in the stack has got visibility
priority over the upper one. 3or instance! a
decal should be in a lower channel than a
te"ture affecting the whole mesh. )lso a
Blending mode in a channel affects to
channels above in the stack. 1ore info about
te"ture channels here.
Global, the te"ture uses the scenes .lobal 'D
coordinates
$b%ect, /ses a child &b4ects te"ture space as
source of coordinates. (he &b4ect name must
be specified in the te"t button on the right.
&ften used with 9mpty ob4ects.
6:, /D coordinates are used for te"turing.
$rco, the te"ture uses the ob4ects local space.
0in, the te"ture uses the window coordinates.
;lat, )ube, 9ube, Sp(ere, pro4ection modes
depending on the overall shape of the ob4ect.
/se ;lat for /D mapping.
ofs7, Y, <, moves the te"ture.
si3e7, Y, <, scales the te"ture.
7, Y, < a"is, Re%orders the ?! Y and N
coordinates.
1ore info about map input here.
9"ample of &rco mapping! which uses
ob4ect coordinates. ;otice how the te"ture
adapts to the ob4ects position and siAe.
Besides! each ob4ect is using a suitable
pro4ection mode! so each surface is
perpendicularly mapped.
+odulation *odes ")ol, =or, )sp, etc!#, the
te"ture modulates the material property
selected. 1odes supported depend on the
YafaRay material used *see it in the materials
modulation section+. ;egative toggle%mode is
supported. 1ore than one modulation mode
can be selectedJ in this case different material
properties will be modulated with the same
te"ture channel. Displacement mapping is only
supported through mesh modifiers.
4lending *odes, Mow this channel interacts
with other channels above it. #upported modes
are mi"! add! multiply! substract! screen!
difference! darken! lighten.
Stencil, the te"ture is used as a mask for all
following te"tures
=eg, produces a negative of the te"ture.
=o R4G, Eonverts a te"ture into a gradation!
the two e"tremes of the gradation scale being
1aterial main color and color set in )olor
S-atc(.
)olor S-atc(, ) sort of a secondary color! to
be mi"ed with 1aterial diffuse color for
procedural te"tures and in the =o R4G feature.
.var, default value for intensity%type te"tures.
2*pact sliders ")ol, =or, :ar, .isp#, the e"tent
to which the te"ture affects the respective
modulation mode.
Related articles, Aaterial Aodulation.
,ten'il
#tencil is a te"turing feature that allows for mi"ing two te"ture channels in a controlled way! by
using an intermediate mask te"ture. (his feature can be used as well to set parts of a te"ture as
invisible! by using a te"ture channel and a stencil channel below. Black value in the mask te"ture
renders the above te"ture channel invisible.
(his is an e"ample of a stencil setup. Below on the left there are the te"tures used! on the center the te"tures
arrangement! and on the right there is the map to panel of the sten'il te"ture. ;otice the )ol! Stenci and =o
RG4 buttons enabled. 3inally! the above render is what we get using this setup.
Related articles, Aaterial Aodulation.
6lendin( 0odes
6lendin( 0odes are used to determine how two te"ture
channels are blended into each other. (he default blend mode is
1i"! which is used to hide the upper channel with whatever is
present in the lower channel *remember that in Blender! te"tures
have higher visibility priority the lower they are in the channels
stack+. Mowever! as each pi"el in a te"ture has a numerical
representation! a large number of mathematical ways to blend
two channels is possible.
(his feature can be used to add comple"ity and richness to your
te"turing works. #upported modes are mi"! add! multiply!
substract! screen! difference! darken and lighten.
5e are going to blend two te"tures from urbandirty.com! on the left is the base te"ture! on the right
the blend te"ture. Please look at them carefully.
?dd
) very basic blending mode. It simply adds pi"el
values of one channel with the other *aCb+. In case
of values above 6! white is displayed. (his mode is
commutative *base and blend channels can be
swapped+
;otice how the black values in the blend te"ture
dont affect the base te"ture! since aC7Oa
,ubtra't
(his blend mode simply subtracts pi"el values of
the base channel with the blend channel *a%b+. In
case of negative values! black is displayed.
;otice how black values in the blend te"ture dont
affect the base te"ture since a%7Oa! while white
values produce a black result.
Aultily
1ultiply is a basic blending mode for darkening
areas of a te"ture.
Pi"els from both channels are simply multiplied by
each other. (his returns a darker result than both
input parameters! e"cept if one of them equals to 6
*white+. Eompletely white values do not change
the base te"ture at all *and vice versa+ % completely
black values give a black result.
(his mode is commutative *base and blend
channels can be swapped+
,'reen
#creen is a basic blend mode for lightening areas
of a te"ture.
It is the opposite of multiply mode. It returns a
brighter result than both input parameters in most
cases! e"cept if one of them equals 7 *black+.
Eompletely black values in the blend channel do
not change the base at all *and vice versa+ %
completely white gives a white result.
(his mode is commutative! channels can be
swapped.


"ifferen'e
#ubtracts either the blend te"ture from the base
te"ture or the base te"ture from the blend te"ture!
depending on which is brighter! to get always a
positive result. Blending with black produces no
change as a%7Oa. Blending with white inverts the
picture *6%a+.
(his kind of blending produces a lot of variation.
(his mode is commutative as well.

"i1ide
(his mode simply divides pi"el values of the base
te"ture with the blend te"ture *a-b+. (he darker the
blend te"ture is! the lighter the result. Mowever!
remember that it is not a linear function! so the
result easily reaches the upper limit with regular
factors! since a-7O: infinitum.

"arken
Pi"els from both channels are compared to each
other! the darkest one is taken.
;i(#ten
Pi"els from both channels are compared to each
other! the lightest one is taken.
Related articles, Aaterial Aodulation.
Pro'edural Textures
) ro'edural texture is a computer generated image produced by an algorithm!
intended to create a realistic representation of natural elements such as wood!
marble! granite! metal! stone! and others.
Procedurals can be used as a color te"ture or as an intensity te"ture in any of the
mapping options available. Eolors in a procedural te"ture are defined by two
controls, )olor S-atc( in the Blender 1ap to panel *3=+ and material diffuse
color in the YafaRay settings interface.
Procedural te"tures supported in the te"ture panel are, cloud! marble! wood!
voronoi! musgrave and distorted noise. Besides! there is an additional 0R.B%
cube0 procedural type only available by ?1@ editing.
!oise 6asis
!oise 6asis! which is a setting available for most procedural types! governs the structural
appearance of the procedural te"ture. YafaRay supports all the =oise 4asis types available in
Blender! which are,
(hese are the settings supported in each procedural type,
Clouds
/seful for soft bump mapping of irregular surfaces.
Soft & >ard noise,
;oise strength.
=oise Si3e, sets scaling
for noise.
=oise.ept(, Depth of
calculation! the higher
the more detail for
noise.
=oise 4asis, basis used
for turbulence! all
modes supported
Aarble
/seful for marble. J+
S(arpness *soft! sharp!
sharper+, ;oise
definition.
Soft & >ard noise,
;oise strength.
S(ape *sin! saw! tri+,
band type.
=oise Si3e, sets scaling
for noise.
=oise .ept(, Depth of
calculation! the higher
the more detail for
noise.
9urbulence, amount of
turbulence for bands.
=oise 4asis, basis used
for turbulence! all
modes supported.
Wood
/seful for basic bands and noise with a structure.


Bands & 4and=oise, the
procedural is arranged
in bands.
Rings & Ring=oise, the
procedural is arranged
in rings.
S(ape *sin! saw! tri+,
band type.
Soft & >ard =oise,
;oise strength.
=oise Si3e, sets scaling
for noise.
9urbulence, amount of
turbulence for bands or
rings.
=oise 4asis, basis used
for turbulence! all
modes supported.
Aus(ra1e
Dery fle"ible. /seful for terrain and rock surfaces. (he 2ntensity Scale control is useful to localise
the result.
+usgrave type, all
modes supported
e"cept for >etero
9errain.
>, contrast between
consecutive layers! for
detail.
'acunarity, gap
between layers.
$ctaves, layers of
noise used.
2ntensity Scale, overall
intensity of te"ture.
=oise Si3e, sets scaling
for noise.
=oise 4asis, basis used
for turbulence! all
modes supported.
Boronoi
Doronoi is a procedural type with a cellular look. Dery fle"ible. /seful for organic surfaces.
)ell type *int! col6!
col>! col'+, color of the
cells.
.istance +etric, shape
of the cells! all types
supported.
2ntensity Scale, overall
intensity of te"ture.
Si3e, cell siAe.
0eig(t *56! 5>! 5'!
5<+, defines distances
between each cell.

"istorted !oise
Eomple" and versatile.
.istance A*ount,
amount of distortion.
=oise Si3e, sets scaling
for noise.
.istortion =oise, basis
used for distortion! all
modes supported.
=oise 4asis, noise to
distort! all modes
supported.
Related articles,
Aaterial Aodulation.
Dolume types.
(he ;oiseDolume (e"ture
You can find some e"amples of different procedural combinations here.
Aaterials
Table of Contents:
1ultimaterial
Material Settings
Material Preview
Glass
Glossy
Coated Glossy
ShinyDiffuse
Diffuse reflection.
Mirror & Fresnel.
Transparency.
Translucency.
Emit.
Blend Material
Aulti0aterial

YafaRay supports Blender 1ultimaterial features! which means that you
can assign different materials to different parts of a mesh! using sets of
polygons. You must use Blender panels to set up 1ultimaterials in
YafaRay. You can find more information about multimaterials here,
http,--wiki.blender.org-inde".php-Doc,1anual-1aterials-1ultipleP1ater
ial
)lternatively you can use the 4lend *aterial to mi" two materials in a mesh. In YafaRay! there are
three ways to mi" material properties in an ob4ect! which are,
#tencil ! to mi" two te"ture channels in a material! using a te"ture as a blending pattern.
Blend material ! to mi" two materials in a mesh! using either a blend factor or a te"ture.
1ultimaterial! to assing different materials to a mesh! using sets of polygons.
Aaterial settin(s
(o set up materials! the settings /I takes the Blender list of e"isting and assigned materials and
applies YafaRay custom properties to them. (he workflow is,
Ereate $ assign materials to ob4ects using Blender panels *3=+. &nly te"turing properties of
materials will be taken into account.
)ssign YafaRay shading properties to the created materials! using the &Aaterial& section in
the YafaRay settings /I.
3or instance! in the image below you can select from a list of four materials which has been
previously created in Blender. ;ro* active ob%ect button will show YafaRay material settings for an
ob4ect previously selected in the 'D scene.
#ettings in Blender material panels *3=+ are completely replaced by YafaRay material settings! even
material colors. Blender Ramps are not supported. 1ultimaterial is supported.
(here are four material types in YafaRay! with many possibilities for each of them to achieve
advanced effects. (hey are glass! coatedPglossy! glossy and shinydiffusemat. )lso! there is a blend
type to mi" two of them in a controlled way. (his is a brief list of what YafaRay materials can be
useful for,
Blend, blend two materials! using a blend factor or a te"ture map.
.lass, glass! water! fake glass.
.lossy, all kind of plastics! clean and polished metal! clean rough metal! car paint! finished
wood! lacquered surfaces! painted surfaces! varnished wood! glaAe and organic surfaces!
materials with anisotropic reflections.
EoatedPglossy, car paint! lacquered surfaces.
#hinydiffusemat, stone! rusted metal! concrete! fabric! paper! rough wood! curtains! emit
surfaces! perfect mirror! materials with a basic transparency and alpha mapping with color%
filtered shadows! translucent materials with color%filtered shadows! etc.
(o aquire some background knowledge about the topics e"plained in the following sections! look at
;eil Blevinss page,
http,--www.neilblevins.com-cgPeducation-cgPeducation.htm
Aaterial Pre1iew
5ith this feature you can render a little preview of the material selected. (he material preview will
be rendered according with the material parameters choosen! and will take into account material
mapped te"tures. (he buttons available are, "belo-!!!#
S(o- ,revie-, enables material preview.
Si3e, #iAe of the material preview window! in
pi"els.
Refres( ,revie-, Renders a material preview.
Glass

(o render correct glass! it is important that glass ob4ects
follow realistic techniques for modelling! such as closed
meshes with real thickness.
It is also important that your mesh normals point in the
correct direction. /se your normal tools in Blender to
control normal direction.
In real life! light refracts one time when passing from one
medium to another! for instance from solid *glass+ to
liquid. In your 'D scene! use one mesh for each
refractive event. (hat means, water meeting glass must
be e"actly one surface! and the relative refration inde" of
the 0water meets glass0 surface must be
I&RPglass-I&RPwater *when normals are pointing into
the water+. (aking into account that glass I&R is 6.== and
water I&R is 6.''! a cross section of a glass of water
should look like the glass cross section on the left
*normals in red+.
Rendering a a number of consecutive transparent
surfaces depends on recursive raydepth *.eneral settings!
Settings main section+. If a transparent surface is
rendered black! try increasing Raydept(.
Glass is basically refraction! reflection and absorption of incoming light. It means that the scene
sorrounding the glass has got an impact on the glass appearance! as well as the lighting setup. It
means that glass will produce caustics if certain conditions are met! which are,
(here e"ist a light source and-or a background *IB@! #unsky+ which is shooting caustic rays.
(he glass material has got I&R:6.
) global illumination method is used *pathtracing! photonmapping! bidirectional+ or 6se
caustics is enabled in the .irect 'ig(ting method.
(he caustic rays have enough depth to pass through all the transparent surfaces *Eaustics
depth+.
.lass material mi"es several independent concepts that can be used alone or combined with the
other parameters to get diferent kinds of results. (hese concepts are,


?bsortion
#ome of the incident light is absorbed by a transparent
medium. (he more distance light has to get through a
medium! the more it gets absorbed. In a glass with
different sections! the glass will get darker if the section
is bigger.
)bsorption also defines the color of the glass and the
strength of the caustic effect. (he more light is
absorbed! the less light is transmitted. By using an
absorption color! we also define the color of caustics.
5hite disables absorption.

8ilterin(
(he glass color is uniform regardless of the section. (he
amount of light transmitted is also constant. You can use
this setting instead of absorption if the glass section is
uniform! for instance.
You need to use this setting to tint transparent shadows
when ;a1e S(ado-s $ 9ransparent S(ado-s are
enabled.
9rans*it ;ilter is a setting which blends )bsorption and
3iltering. 5hen (ransmit 3ilter equals 6! 3iltering is
shown. 5hen (ransmit 3ilter equals 7! absorption is
shown *if enabled+.

Refle'tion =Airror>
#ome of the light is reflected. )mount of reflection
depends on the inde" of refraction. (he higher the
inde"! the more reflective the glass is. It produces
reflective caustics.

Refra'tion =I+R>
Refra'tion is the change in direction when light waves
travel from a medium with a given refractive inde" to a
medium with another. Refraction produces caustics.
#ome materials inde" are,
Ice, 6.'6
5ater, 6.''
Elear plastic, 6.<7
#tandard glass, 6.=>
)mber, 6.==
Diamond, >.<>

"isersion
"isersion causes the spatial separation of a white light
into components of different wavelengths *different
colors+.
5hen Path tracing is used! dispersion noise depends on
path tracing samples! the more the samples the lesser
the noise.

8ake ,#adows
;ot all light tracing methods are optimised to render
caustics. (his is the case of Direct lighting or Path
tracing for instance. 5hen fake glass is enabled!
raytracing shadows rays get through this ob4ect when
looking for light sources! and colored transparent
shadows are calculated based on ;iltering values.
;otice the glass shadow! compared with the e"amples
above.
(he 9ransparent S(ado-s button in the Settings main
section must be enabled too for this feature to work.
;ilter color controls color of the transparent shadows.
Related articles,
Ray Depth.
#hadow Depth and (ransparent shadows.
Eaustic Photon 1ap.
Rendering Pathtracing caustic component.
Photon 1apping.
Glossy
) glossy reflection means that tiny random bumps on the surface of the material cause the reflection
to be blurry. In fact there is a wide range of materials with such a reflection. YafaRay glossy
material can be useful for all kinds of finished surfaces such as plastics! polished metal! car paint!
finished wood! lacquered surfaces! painted surfaces! varnished wood! glaAe! organic materials! etc.
(he glossy effect can be reinforced by using a fine bump map! or by mapping glossy reflection with
a fine te"ture.
(he main concepts of the glossy shader are,

"iffuse and Glossy 'olors
) .lossy material has got two colors! diffuse and glossy. Glossy reflection value! apart from
controlling the reflection strength! should be understood as a blend factor between the diffuse and
the glossy color. (he more reflective! the less diffuse. )s stated in #iggraph GH course notes book
Q'7 Pi"el Einematography, ) lighting approach for Eomputer .raphics...
05hen light hits an ob4ect! the energy is reflected as one of two componentsJ the specular
component *the shiny highlight+ and the diffuse *the color of the ob4ect+. (he relationship of these
two components is what defines what kind of material the ob4ect is. (hese two kinds of energy
make up the 677R of light reflected off an ob4ect. If G=R of it is diffuse energy! then the remaining
=R is specular energy. 5hen the specularity increases! the diffuse component drops! and vice
versa. ) ping pong ball is considered to be a very diffuse ob4ect! with very little specularity and lots
of diffuse! and a mirror is thought of as having a very high specularity! and almost no diffuse.0
5hen Glossy reflection is Aero! you will see mostly the diffuse color with a bit of rim glossy color
*image on the left+. 5hen Glossy reflection value is 6! you will see only the glossy color *image on
the right+,

Remember that coloured reflections is a particular feature of conductive materials *gold! copper+!
while non%conductive have got white colored reflections. #o Glossy color of non%conductive
materials like plastic should be white. "iffuse Refle'tion value is 4ust a diffuse color multiplying
factor.
Related articles,
Diffuse color mapping.
#pecular color mapping.
Glossy refle'tion and Exonent
Glossy reflection controls the strength of the reflection. (he more reflective! the less diffuse.
Exponent controls blur of the glossy reflectionJ the higher the e"ponent! the sharper the reflection.
/se values between 6 and >77 for plastics and higher values for metallic surfaces. .lossy reflection
produces caustics.
Below there is an e"ample of a material with different glossy reflection *.R+ and e"ponent settings
*9?P+. Diffuse color is dark grey and glossy color is white,
Related article, #pecular intensity mapping.
Glossy refle'tion sa0lin(.
5hen these light sources are used in the scene! noise in the glossy reflection depends on,
)rea light *area light! sphere light! mesh light+ samples.
#un light samples.
MDR backgrounds *IB@! Darktide #unsky! #unsky+ samples.
)) samples! the higher the less noisy.
Below on the right! area lights are using > samples while on the left they are using H< samples.
Related articles,
)realight
#un light.
3irst anti%aliasing pass.
6a'k(round ,ettin(s .
?s "iffuse
5hen As diffuse is enabled in ,(oton *apping! Glossy surfaces will be treated as diffuse instead of
specular. It means that the photon map will be used to calculate the surface reflections! which
results in faster render times. In practice! this method is recommended only for glossy surfaces with
a low Exponent! since the precision of glossy reflections calculated with photon mapping is always
lower. Besides! As diffuse option enabled will be likely to produce flickering of the glossy
reflection in animations.
Both spheres in the left render have got As diffuse enabled and the render time is 6HH seconds. Both
spheres in the right render have got As diffuse disabled and the render time is 6LH seconds. ;otice
the reflections2
Related articles,
9"ponent.
Photon 1apping.
?nisotroi' refle'tions
(his material is useful to get anisotropic reflections! which means that reflection is not equal in all
directions. (his kind of reflection happens when a defect in a reflective surface repeats with some
regularity. 5hen )nisotropic is enabled! the e"ponent value is divided into vertical and horiAontal
components. By using a different value for each component.! the reflection will take an anisotropic
oval shape. (his effect can be reinforced by using a suitable bump map. 5hen )nisotropic is
enabled! the Exponent button is disabled. MoriAontal and vertical direction of the anisotropic
e"ponent depend on /D mapping coordinates. Below you have a comparison between anisotropic
reflections *left+ and default isotropic reflections *right+ See belo-!!!.

Coated Glossy
Eoated .lossy is basically a glossy material *see the previous section+ with some kind of reflective
coating layer on top. I&R is the setting that controls reflectivity of the coating top layer. (his
reflective layer can produce caustics. It is a good material for car paint. Below an e"ample of
different I&R values,

Related article, .lossy material.
,#iny"iffuse
#hinydiffuse is a shader with many applications. It can be useful to get,
Diffuse materials without any specular component.
Perfect mirror reflection with or without 3resnel effect.
)lpha mapping with shadows calculation derived from the map! for translucency and
transparency effects.
(ranslucency with color filtering.
(ransparency with color filtering.
9mit surfaces.
3or instance! this material can be used for rough stone! rusted metal! concrete! fabric! clay! asphalt!
paper! rough wood! chrome balls! shiny plastics! basic car paint! curtains! leaves! billboards! etc.
(he main concepts of the #hinyDiffuse shader are,

"iffuse refle'tion.
Diffuse reflection is the reflection of light from an uneven
or granular surface such that the incident rays are
randomly reflected and scattered in all directions. (he
amount of diffuse reflection is mainly controlled by the
surface )olor. YafaRay uses two models to render the
diffuse component! which are @ambertian and &ren%;ayar.
;a0bertian is a basic diffuse model with no view
dependence. Brightness is constant from all viewing
directionsJ only interaction between surface and light
sources is modelled. It is a method valid only for very
smooth matte surfaces! like paper! smooth plastic or
polished wood.
+ren4!ayar is a view dependent! physically%based
microfacet model for diffuse reflections! which takes into
account geometric optics and interaction at microfacet
level produced by light sources. &ren%;ayar models the
diffuse reflectance for rough surfaces more accurately than
the @ambertian model. Sig*a controls the roughness of the
surface.
"iffuse Refle'tion value is 4ust a diffuse color multiplying
factor.

.P@ Photograph of a comparison between a matte clay vase and its renderings with the
;a0bertian model and the +ren4!ayar model *#ource+. #ome #igma values! as per the official
pro4ect page for the &ren%;ayar model! are,
3elt, 7.<6<HLH
Rough plastic, 7.>SL7=S
@eather, 7.6SGSSH
Delvet, 7.S=677>
Pebbles, 7.<<'>LG
PlasterPb, 7.=<'SLL
Rough paper, 7.'66'SH
Roof shingle, 7.L6G6<S
RugPb, 7.H6'LLG
#ponge, 7.LS><6'
5ool, 7.GSL6''
8uarry tile, 7.'H7=S<
#latePb, 7.'7G=G7
Muman skin, 7.=SG'LH
BrickPb, 7.>S=GG7
@inen, 7.=6<=G'
Eotton, 7.<L>HSG
#tones, 6.67S6HL
EoncretePb, 7.'7LG=H
EoncretePc, 7.<H6G'7
5oodPb, 7.'=6>S6
(ree bark, 7.>G'>>H
Related article, Diffuse color mapping
Airror C 8resnel
1irror produces pure specular reflection. 1irror strength is a blend factor between the specular and
diffuse components! with their respective colors. (he more specular! the less diffuse component
will be shown. 5hen 3resnel is enabled! the amount of specular reflection depends on how the
viewer is oriented relative to the surface. 3resnel means that a surface is more reflective at graAing
angles than at perpendicular ones. I&R controls the 3resnel reflection strength! the higher the more
reflective at every angle. 1irror and 3resnel reflections can produce caustics. Below are several
e"amples of 1irror and 3resnel! 1# stands for +irror Strengt(. 5hite is being used for both
diffuse and mirror color,
Related articles,
#pecular color mapping.
#pecular intensity mapping.
Ray Depth.
Transaren'y
5ith this setting you can achieve a basic transparency
effect! without refraction but with transparent shadows and
color filtering.
(ransparent shadows and color filtering means that light is
filtered by the transparent surface! and it is coloured and
diminished according to the surface properties.
(ransparency is basically a fake feature intended for basic
transparency and alpha mapping purposes! since it is a
mappable setting. (o get tranparent shadows and color
filtering! 9ransparent S(ado-s button must be enabled in
the Settings main section.
#ettings that affect this feature are,
.iffuse color ,ic1er, control diffuse color of the
ob4ect! which results in color filtering.
9ransparency, )mount of transparency.
9rans*it ;ilter, color filtering strength. 5hen it
equals 7 there is no color filtering! therefore
shadows are not tinted by the tranparent surface.
In Settings main section,
Raydept(, for camera rays! to get through
successive transparent events.
9ransparent S(ado-s, this option must be enabled
to produce transparent shadows and color filtering.
(echnically speaking! it allows raytracing shadows
rays to get through this mesh when looking for light
sources.
S(ado-s .ept(, for raytracing shadow rays! to get
through successive transparent surfaces.
5ith this feature you can emulate the Blender $nly)ast
feature! which makes ob4ects not to be rendered but to cast
shadows only. #et the ob4ect transparencyO6 while keeping
9ransparent S(ado-s button disabled.
Related articles,
)lpha intensity mapping.
Ray Depth.
#hadow Depth and (ransparent shadows.
.lass material.
Translu'en'y
5ith this setting you can achieve a basic >D translucency
effect with transparent shadows and color filtering.
(ranslucent materials allow light to pass through them but
only diffuselyJ you can not see through. @ight is scattered
after passing through the transparent surface.
(ransparent shadows and color filtering means that light is
filtered by the translucent surface! and it is coloured and
diminished according to the surface properties.
9ranslucency slider controls amount of translucency.
#cattered light with transparent shadows $ color fitering
only works with .lobal Illumination methods! which are
Pathtracing! Bidirectional Pathtracing and Photon
mapping.
9"ample of translucency! notice the curtains. 1y Room by C#o9in",;.
Related article, )lpha intensity mapping.
E0it
)mount of light a material emits! similar to the mesh light
concept. Eolor of the emitted light is controlled by the
.iffuse color. E*it slider controls strength of the emitted
light.
E0it ob4ects can be used as diffuse light sources! but you
will have to use it with path tracing or bidirectional path
tracing lighting methods.
Related article, Diffuse color mapping with emit value
6lend Aaterial
(his feature takes two materials and mi"es them in a third one. You need to define three materials
then! two ones to mi" and a third Blend material which is applied to the ob4ect to render. (his
feature can be useful to mi" properties from two different materials! for instance glossy reflection
blended with transparency. It can be useful as well to map two different parts of a mesh with
different materials using a te"ture as a pattern! without resorting to multimaterial which depends on
mesh polygons.
4lend value controls the percentage of each material in the final mi". ) value of 7.=7 means that
each material contributes the same to the final look. (hese are e"amples of different blend
materialsJ the sphere on the left has got the Blend material,

7.= blend between a glossy material and a shinydiffuse with
transparencyO7.L=.
7.=7 blend between a glossy material and a shinydiffuse
with mirrorO7.L7.
7.>= blend between two glossy materials. &ne material uses
e"ponentO6=! the other uses e"ponent O 6=77.
7.>= blend between two shinydiffuse materials. &ne uses
mirrorO7.>7 and transparencyO7.L=. (he other is a
completely diffuse material.
Related article, Blend mapping
Aaterial Aodulation
Table of Contents:
1aterial 1odulation introduction.
Diffuse color.
Specular color.
Specular intensity.
Alpha intensity.
Bump intensity.
Displacement mapping.
Blend mapping.
Aaterial Aodulation introdu'tion.
)PE from the movie )liens! by Gabi'#.
#ome material properties can be modulated by a te"ture! instead of using a global value. (his
technique is called te"ture mapping. (he te"ture used can be a R.B image or a procedural te"ture.
In general! there are seven types of modulable settings in YafaRay materials! which are,
"iffuse 'olor. #hinyDiffuse! .lossy and Eoated .lossy.
,e'ular 'olor. #hinyDiffuse! .lossy and Eoated .lossy.
,e'ular intensity. #hinyDiffuse! .lossy and Eoated .lossy.
?l#a intensity. #hinyDiffuse.
6u0 intensity. )ll materials.
"isla'e0ent 0ain( through a mesh modifier. )ll materials.
6lend 0ain(. Blend material.
3or instance! you can use a te"ture to have different values of glossy reflection on a surface. #ome
of these modulation modes are available for all material types! like bump intensity. &thers are
available only for some of them! depending on the material features.
!e(ati1e to((le 0ode is supported in intensity%mapping types! so te"ture values are inverted.
"iffuse 'olor.
(here are several options when using a te"ture to map diffuse color. (hese options are,
(o map the diffuse color with a R.B te"ture! use the )$' slot DEF in the 1ap to panel.
S(inydiffuse! Glossy and )oated?glossy materials support diffuse color mapping. (he
applied R.B te"ture will hide the materials own diffuse color D/F defined in the material
settings. Mowever! you can control te"ture opacity so it blends with the material diffuse
color! by using )ol slider DGF.
.iffuse reflection value D$F is 4ust a diffuse color multiplying factor! affects te"tures as well.
If a te"ture with alpha data is used *R.B)+ and you want to render alpha as transparent
*white otherwise+! enable 6seAlp(a button DHF in the Blender (e"ture buttons *3H+. (he
alpha channel will be rendered transparent and the underlying diffuse color D/F will be seen.
You can use a procedural te"ture to map the diffuse color. Eolors in a procedural te"ture are
defined by two controls, )olor S-atc( D%F in the Blender 1ap to panel *3=+ and material
diffuse color D/F in the YafaRay settings interface. 1ore info about procedurals here.
5hen a diffuse color te"ture is used in a S(iny.iffuse material with E*it D<F! the amount of
light emission produced by that material will be defined by the te"ture brightness. )t the
moment! te"ture%based light emission only works with pathtracing.
5hen a diffuse color te"ture is used in a #hinyDiffuse material with 9ransparency DIF! the
amount of transparency will be defined by the te"ture brightness. 9nable 9ransparent
S(ado-s in Settings section to get transparent shadows and color filtering from the te"ture.
5hen a diffuse color te"ture is used in a #hinyDiffuse material with 9ranslucency DIF! the
amount of translucency will be defined by the te"ture brightness. 9nable 9ransparent
S(ado-s in Settings section to get transparent shadows and color filtering from the te"ture.
(ranslucent scattered light with transparent shadows $ color fitering only works with
Pathtracing! Bidirectional Pathtracing! and Photon mapping.
Below an e"ample of diffuse color mapping in #hinydiffuse *left+ and .lossy material *right+. ) bit
of bump is applied in both cases.
9"ample of diffuse color mapping in #hinydiffuse material! with 9ransparency on the left and with
E*it on the right.
(e"ture used,
Related articles,
.lossy material.
Eoated .lossy material.
#hinyDiffuse material.
,e'ular 'olor.
(here are two kinds of mappable specular in YafaRay! +irror in #hinydiffuse! and Glossy in .lossy
material. Both are specular components that can use the uniform color defined in the settings /I! or
they can be also mapped with a RB. te"ture. (he applied te"ture will hide the material specular
color *mirror or glossy+ defined in the settings /I. Mowever! you can control opacity of the te"ture
so it blends with the material specular color! by using )ol slider D<F in the Blender 1ap to panel.
You can use a procedural te"ture as well.
Remember that coloured reflections are a particular feature of conductive materials! while non%
conductive have neutral%colored reflections *white+.

(o map specular! #hinyDiffuse uses )*ir slot D$F
while .lossy material uses )sp slot D/F. Blender
6seAlp(a button *3H+ is supported when a R.B)
te"ture is used! so the underlying specular color will be
seen instead of white.
Below are e"amples of specular color mapping. Both cases are using full specularity strength,

1irror color mapping. .lossy color mapping. (e"ture used.

Related articles,
.lossy material.
#hinydiffuse mirror material.
,e'ular Intensity.
You can use a te"ture to map the amount of specular reflection. (here are two kinds of specular
reflection in YafaRay, 1irror in #hinydiffuse and .lossy Reflection in .lossy material. (e"tures
will be processed as a value scale. (his means that if the R.B te"ture has got colors they will be
transformed into tones of grey! so normally it is a wise idea to use desaturated te"tures to map
intensity. (his way users have more control over the final result. You can use a procedural te"ture as
well.
(he te"ture in fact will map in the range between the specular strength set in material setting D/F and
:ar D$F. 3or instance! if 1irror strength is 7.>7! it means that black color in the te"ture will make
the ob4ect to be at least 7.>7 reflective. If DarO7.L7! it means that white color in the te"ture will
make the ob4ect to be as much as 7.L7 reflective. (he same happens with .lossy materials.
(o map mirror strength in #hinydiffuse! use Ray+ir slot D<F. (o map glossy reflection strength! use
Spec slot DEF. Below are e"amples of specular mapping. Both cases are using strengthO7 and DarO6,



#hinydiffuse mirror mapping. .lossy reflection mapping (e"ture used.

Related articles,
.lossy material.
#hinydiffuse mirror material.
?l#a Intensity.
(his feature is used to map mesh transparency with a te"ture. Information from the R.B te"ture is
translated into amount of mesh transparency. (o make it possible! te"tures need to be transformed
into a value%scale. (his means that if the te"ture has got colors they will be transformed into tones
of grey. It is a wise idea to use desaturated te"tures to map intensity! so there is more control over
the final result. You can use a procedural te"ture as well.
Dont confuse alpha intensity with te"ture alpha. (he te"ture alpha channel *R.B)+ is used in
diffuse color mapping.
)lpha intensity mapping will 4ust produce different values of transparency based on the te"ture
values. (hose different levels of transparency will produce colored transparent shadows! if
transparency is applied onto a material with diffuse colors.
(here are two kinds of transparency in YafaRay! specular 9ransparency D/F and diffuse
transparency! also called 9ranslucency D$F. (o enable shadows calculation from alpha%intensity
mapping! enable 9ransparent S(ado-s with enough S(ado-s dept(! in the Settings section.
(he te"ture will map in fact a range between the transparency value set in the material setting D/ or
$F and the :ar value DGF. 3or instance! if (rasparency is 7.>7! it means that black color in the te"ture
will make the ob4ect to be at least 7.>7 transparent. If DarO7.L7! it means that white color in the
te"ture will make the ob4ect to be as much as 7.L7 transparent. (he same happens with
9ranslucency.
(o map 9ransparency! use Alp(a slot D<F. (o map 9ranslucency! use 9rans'u slot DEF.
)t the moment! 9ranslucency scattered light with transparent shadows only works with .lobal
Illumination methods! which are Pathtracing! Bidirectional Pathtracing! and Photon mapping.
Below are e"amples of transparency and translucency mapping. Both cases are using strengthO7!
DarO6,

(ransparency mapping. (ranslucency mapping. (e"ture used.

Related articles,
#hinydiffuse (ransparency.
#hinydiffuse (ranslucency.
6u0 Intensity.
)ll four materials *#hinyDiffuse! .lossy! EoatedP.lossy and .lass+ support bump mapping.

Brian @ingard gives this definition of bump mapping,
0Bump mapping simulates the bumps or wrinkles in a
surface without the need for geometric modifications to the
model. (he surface normal of a given surface is perturbed
according to a bump map. (he perturbed normal is then
used instead of the original normal when shading the
surface using the @ambertian technique. (his method gives
the appearance of bumps and depressions in the surface.0
Bump is an intensity%mapping type. (e"tures are
transformed into a value%scale. It means that if the R.B
te"ture has got colors! they will be transformed into tones
of grey. It is a wise idea to use desaturated te"tures to map
intensity! so there is more control over the final result. You
can use a procedural te"ture as well.
(o map bump! the =or slot D/F must be enabled for the
te"ture channel. =or slider D$F controls amount of bump.
YafaRay uses comparatively lower values than Blender for
bump mapping.
"isla'e0ent 0ain(.

YafaRay supports displacement mapping applied not as a
material modulator but as a Blender mesh modifier *3G!
1odifiers panel+. It can be applied to any mesh regardless
of the material.
Displacement is a modern version of bump mapping! in
which the ob4ect geometry is actually modified by a
te"ture. Displacement needs a great amount of mesh
tessellation to workJ the more tessellation the better result.
(he tessellation needed is achieved by using subdivision
surfaces modifiers *subsurf+ on a mesh.
3irst! a te"ture must be created as usual! using Blender
supported (e"ture buttons *3H+. (he te"ture will appear in
the (e"ture channels stack *3=+. Eheck your options to see
whether this displacement te"ture is needed for a
modulation mode as well or not. 3or instance! you might
want to enable this te"ture for diffuse color mapping as
well while is still being used for displacement! like the
e"ample on the left.
(his created te"ture is later used in the Displace mesh
modifier.
Displacement is an intensity%mapping type. R.B (e"tures
are transformed into a value%scale. It means that if the
te"ture has got colors! they will be transformed into tones
of grey. It is a wise idea to use desaturated te"tures to map
intensity so there is more control over the final result. You
can use a procedural te"ture as well.
&n the left there is an e"ample of a 1odifiers panel! using
a subsurf modifier to add tessellation and a displacement
modifier. (he name of the te"ture used for displacement is
input in the 9exture field *green+. (his te"ture is previously
defined in Blender te"turing panels.
1ore information about subsurf and displace modifiers
here and here! respectively.
6lend 0ain(.
You can use a te"ture to control how two materials are blended. (his te"ture is a mask in which
values tell how big a percentage of each material is seen. If the R.B te"ture has got colors! they
will be transformed into tones of grey. It is a wise idea to use desaturated te"tures to map blend! so
there is more control over the final result. You can use a procedural te"ture as well. (he te"ture
should be mapped onto the ob4ect assigned with the blend material! using the )ol slot.
If the te"ture is a black$white checker! it means black squares will show material 6 whereas white
squares will show material > *e"ample below+. (he te"ture can use tones of grey as well! which
means that properties from both materials are blended in the same area.
4lend value works as a global opacity factor for the te"ture. If you want the te"ture to have a
complete control of the blending! use a Blend valueO7. If Blend value is 6! the te"ture will be
completely transparent and only the material > can be seen.
Below an e"ample of blend mapping! using a black$white checker. &n the left a Blend valueO7 is
used whereas on the right Blend value is 7.=7,

Related article, Blend 1aterial
;i(#tin( 0et#ods
Table of Contents:
Illumination (ypes.
Lighting Methods Overview.
Use cases.
Open scenes
Enclosed scenes
Animations
Parameters.
Ambient Occlusion.
Caustic Photon Map.
Path tracing.
Photon Mapping.
Final Gather.
Bidirectional.
Illu0ination Tyes.
In real life! ob4ects are lit by several types of lighting. 3or instance! light casted from lamps and
light bouncing from other nearby ob4ects. Besides! some materials! such as glass! can modify the
behaviour of light. &ther lighting effects are color bleeding between ad4acent surfaces and light
scattering in participating media. (he interaction of all these effects produce a global result that is
called global illumination.
Raytracers try to reproduce global illumination *.I+ by means of techniques that follow light
natural behaviour! such as casting samples of rays that bounce in the scene observing realistic rules.
(hose samples are averaged so a general result can be e"trapolated from a limited amount of rays.
(heorically! there are more than one way to achieve this! each way with its own share of advantages
and shortcomings. (here isnt such a thing as a perfect .I model! and new algorithms are created for
solving the incovenients of already e"isting techniques.
YafaRay has got a traditional raytracing method which only renders light cast from light sources!
called "ire't ;i(#tin(. )dditionally! YafaRay has got three different .lobal Illumination models!
which are Pat# tra'in(! P#oton Aain( and 6idire'tional Pat# tra'in(. Below you have a
comparison between Direct @ighting *left+ and a .lobal Illumination model! in this case Photon
1apping *right+. ;otice the differences between them,

) certain amount of borrowing is possible between these lighting methods! since they are more or
less based on the same ray concept. #o it is possible to implement the same averaging technique in
different .I methods! or mi" features from different models. (his is the case of caustic photons
option in Direct @ighting! for instance.
;i(#tin( Aet#ods +1er1iew.
"ire't ;i(#tin( Pat# Tra'in(
:ow it works:
Direct @ighting only performs recursive
raytracing. Primary rays are shot from the
camera and intersect with the scene.
(hen secondary rays are generated but 4ust
towards light sources! to calculate shadows.
(heyre also called s#adow rays.
Primary rays can be transmitted in reflective
and refractive surfaces.
?d1anta(es:
:ow it works:
Rays are shot from the camera. 9ach bounce casts
a lot of secondary rays. #ome of them eventually
reach a light source. (hen the light contribution
along the path is calculated.
?d1antan(es:
It performs .lobal Illumination.
3ast in outdoors.
/nbiased! delivers correct results.
#oft indirect lighting if enough sampling.
Dery fast in scenes where indirect
lighting is not needed.
Ean render independent caustic
photonmaps and ambient oclussion.
MDR backgrounds *IB@! #unsky+ can
work as light sources! simulating
indirect lighting.
"isa1anta(es:
;o indirect lighting.
Eant render caustics *youll need to
enable caustics photonmap+.
"isa1anta(es:
Dariance shows up as noise.
@ot of rays are needed for caustics.
Inefficient in indoor scenes! when light
sources are too hidden or too small.
Doesnt like omni lights *spot! point+ and
mirror surfaces. Better use area light types
and glossy.
P#oton 0ain( 6idire'tional at# tra'in(
:ow it works:
Rays *photons+ are cast from light sources and
bounce around! regardless of the camera. )
photon map is created! based on photon hits.
(hen! a standard raytracing pass is performed
to visualise the photon map.
?d1anta(es:
It performs .lobal Illumination.
3ast! efficient .I estimation in indoors.
Best quality-speed ratio.
3ast caustics.
"isa1anta(es:
:ow it works:
Ray paths are constructed from the camera and
from light sources. Bounces are connected to each
other with visibility rays.
?d1anta(es:
It performs .lobal Illumination.
Eombine advantages from path tracing and
photon mapping.
1ore efficient than path tracing for indoors
and for caustic effects.
/nbiased! delivers correct results.
.ood for scenes with lot of indirect
lighting.
"isa1anta(es:
Dariance shows up as noise.
;ot well suited for outdoors
#ometimes requires photon map
tweaking.
)rtifacts.
;ot well suited for outdoors.
Inefficient in indoor scenes! when light
sources are too hidden.
Related articles,
Ray Depth.
Path tracing.
Photon 1apping.
Bidirectional.
3irst anti%aliasing pass.
Use Cases.
.I algorithms are born with shortcomings and compromises in order to solve very specific
raytracing problems. (here isnt such a thing as a universal lighting algorithm for all cases. In fact!
the only method that can be used for all cases is Direct @ighting. In the ne"t paragraphs we are
going to e"plain use cases in YafaRay! and what are the best lighting methods for them.
+en s'enes:
&pen scenes means that the scene is not enclosed by a mesh! and the background can work as a
light source. &pen scenes can be used to simulate studio lighting and indoor scenes as well! by
using a suitable scene composition and-or a MDR indoor image as a background. (he recomended
methods for open scenes are,
"ire't li(#tin(. It delivers fast results and you can use area light types *area! sphere! mesh+
to achieve soft shadows.
"ire't li(#tin( J ?+ J 'austi's #otons. 3ast. If you have refractive and-or reflective
surfaces in the scene you can enable caustic photons! it adds realism. /se this combo for
fluid animations as well.
"ire't li(#tin( J :"RI texture. MDR images can be used as a background and as an ob4ect
te"ture. (hey work as light sources in Direct @ighting. 3ast for outdoors! when indirect
lighting can be simulated with background lighting. MDRI backgrounds can shoot caustic
photons as well.
"ire't li(#tin( J ,unsky. Eomponents of the #unsky model *#un and #kylight+ work as
light sources. 3ast for outdoors! when indirect lighting can be simulated with background
lighting. #unsky can shoot caustic photons as well.
Pat# tra'in( J ba'k(round *MDRI! #unsky! .radient! #ingle Eolor+. 3ast because many
pathtracing rays can find a light source *background+ after the first bounce. /se it if you
need color bleeding or if you want a precise simulation of the indirect lighting.

Eomparison between Direct @ighting and Pathtracing used in an outdoors scene. ;otice indirect
light calculations and soft color bleeding effects in Path tracing.
Direct lighting C )mbient &cclusion! render time <> s.
Direct lighting C #unsky #kylight! render time =6L s.
Path tracing C #unsky #kylight! render time 6>7= s.
Related articles,
)mbient &cclusion.
6a'k(round ,ettin(s .
Path tracing.
En'losed s'enes:
9nclosed scenes means that the scene is inside a mesh *thickness for walls recommended+! which is
good for some ray bouncing. (his enclosing mesh can have windows to simulate a houseroom. (he
recommended methods for enclosed scenes are,
"ire't li(#tin(. /se it for traditional lighting setups and studio lighting! if you dont need
the indirect lighting component. You can use area light types *area! sphere! mesh+ to achieve
soft shadows. (o simulate indirect lighting! many times photon mapping will be faster than a
comple" rig of fill lights.
"ire't li(#tin( J ?+ J 'austi's #otons. 3ast. If you have refractive and-or reflective
surfaces in the scene! enable caustic photons! it adds realism. /se this combo for fluid
animations as well.
P#oton 0ain( J 8G. ) good fast .I algorithm for all indoor cases! it isnt afraid of
comple" lighting cases.
6idire'tional at# tra'in(. It works well if there is an optimal situation of light sources.
3or instance! if light sources can be seen from the camera or from the first bounce of camera
rays. /se it in scenes with lot of indirect lighting and-or if you are looking for a correct
simulation of the .lobal Illumination.
Pat# tra'in(. (he least efficient method for indoors. /se it if there is an optimal situation of
light sources *see bidirectional+ and an even distribution of lighting! for instance scenes with
big windows or big light sources. Youd better use area lights *area! sphere! meshlight+ rather
than omni lights *spot! point+ in path tracing.

Eomparison between different lighting methods! rendered on a Pentium ID. ;otice lack of color
bleeeding in Direct @ighting. Photon mapping is the fastest .I method! and Bidirectional the
slowest one. ;otice how the two unbiased methods *Path tracing and Bidirectional+ struggle in
indirect lighting areas *noise+. Bidirectional produces the brightest indirect lighting result and more
color bleeding than the other .I methods.
Direct lighting C )& C Ephotons. .:/:<G Photon mapping. .:K:/.
Path tracing C Ephotons. .:/G:$. Bidirectional. /:<$:/I
Related articles,
Eaustic Photon 1ap.
)mbient &cclusion.
Path tracing.
Photon 1apping.
Bidirectional.
?ni0ations:
"ire't li(#tin( J 'austi's #otons. 3ast for indoors! even faster with omni lights *point!
spot+. Eaustic photon maps are compatible with frame rendering *no caustics flickering+.
MDR backgrounds optional *IB@! #unsky+! with caustic photons.
P#oton 0ain( J 8G. If indirect lighting is needed! P1C3. is the fastest .lobal
Illumination algorithm for animations. Its compatible with both frame%based animation and
portion%based distributed rendering *no shadows flickering from frame to frame! no seams
when render portions are 4oined together+.

Related articles,
.lossy reflection sampling.
Eaustic Photon 1ap.
Photon 1apping.
3inal .ather.
Para0eters
?0bient +''lusion
)mbient &cclusion is a shading method that takes into account attenuation of light due to ob4ect
occlusion. )mbient occlusion is most often calculated by casting rays in every direction from a
point on a surface. Rays which reach the background or TskyU increase the brightness of the surface!
whereas a ray which hits any other ob4ect contributes no illumination. )s a result! points surrounded
by a large amount of geometry are rendered dark! whereas points with little geometry on the visible
hemisphere appear light.

)mbient occlusion is often used as a fast appro"imation of
the indirect lighting produced gy .lobal Illumination
models. It is also used as an independent pass for render
post%processing! usually with )lay render enabled. )&
settings are,
A$ Sa*ples, (he number of rays used to detect if
an ob4ect is occluded. Migher numbers of samples
give smoother and more accurate results! at the
e"pense of slower render times
A$ .istance, (he length of the occlusion rays. (he
longer this distance! the greater impact that far away
geometry will have on the occlusion effect. ) high
Dist value also means that the renderer has to search
a greater area for geometry that occludes! so render
time can be optimiAed by making this distance as
short as possible! for the visual effect that you want.
A$ )olor, Eolor for ambient occlusion rays. /se
this setting to control )& power.
Related articles, /se cases
Causti' #oton 0a
Eaustics is a concentration of light! produced by refractive medium *glass! water+ and by curved
specular surfaces *mirror and glossy+. It is possible to produce independent caustic photon maps in
YafaRay. (his option is available in lighting methods that either cant render caustics *Direct
@ighting+ or arent efficient at this kind of task *Path tracing+. Eaustics add realism and they are
relatively cheap to compute. (he caustics photon map is visualiAed directly and this is the reason
why the number of photons in the caustics photon map must be high! since a high resolution map is
needed.
+ix and Radius are two limit parameters to blur the caustic map. Photon hits will be averaged
within a circular area. (he center of each circular area is defined by camera rays. If there isnt
enough photon density within the circular area! low frequency noise will appear. (hose circular
areas will use whatever limit is reached first! either +ix or Radius. 1any times incremental changes
in a limit wont have any blur effect since the other thresold has been already reached.
Below are two of e"amples of caustics,

9"ample of refractive caustics! using as photons source a spot light. #cene by Aar'o?
9"ample of reflective caustics! using a caustic photon map in pathtracing. (he MDRI background is
the caustic photons source. #cene by ,e1ont#eweb.
Eaustic photon maps work better and more efficiently with concentrated light beams directed
towards the caustic surface using a spot light. Eaustic settings are,
,(otons, ;umber of photons to shoot. Increases photon map density and render times.
)austic .ept(, amount of reflective or refractive events for caustic photons.
)austic +ix, amount of photons to mi" *blur+. (he more photons to search for! the more
render time.
)austic Radius, area of photons to mi" *blur+. (he more photons to search for! the more
render time.

Related articles,
/se cases
#hadow Depth and (ransparent shadows.
Photon 1apping.
1aterials that can produce caustics,
.lass
.lossy
Eoated .lossy
#hinydiffuse 1irror $ 3resnel.
Pat# tra'in(.
Path tracing is a .I unbiased method in which each ray is
recursively traced from the camera along a path until it
reaches a light source. 5hen a light source is found! the
light contribution along the path is calculated! taking into
account surface properties. 1any samples are need to be
taken and interpolated for each camera pi"el to get a
smooth result. ) light source can be either a lamp! the
scene background or both. #cenes with relatively small
light sources and with a high contrast between light sources
and their surrounding areas will need more samples to
reduce noise. (he smaller and less accessible the light
sources are! the more noise. Pathtracing is a .I solution
more suited for outdoor scenes and for indoor scenes with
big light sources *area lights or big windows+ and a regular
distribution of light.
Pat# tra'in( 'austi' 'o0onent
Pathtracing caustic paths tend to be very noisy and a very big amount of samples is needed to get a
smooth result. In YafaRay we have four alternative methods to render the caustic component when
pathtracing is used,
,at(@,(oton, a mi" of a caustic photon map and path tracing caustic rays are used.
,(oton, a fast photon map is used to render caustics. Path tracing caustics rays are not
rendered.
,at(, Path tracing caustics rays are rendered.
=one, the caustic component is not rendered.
(his is an e"ample about how methods for the caustics component work in pathtracing. In the first
image *upper left+! ,at( is used to get caustics! which are very noisy when a low number of samples
is used *6H+. In the second render! =6> pathtracing samples are used to improve path traced caustics!
but it takes much more render time *'L minutes+. In the third e"ample! ,(otons are used to produce
the caustics component and the render time is the lowest of them all *Em stands for Eaustic
method+,

Related articles,
Eaustic Photon 1ap.
.lass material.
Pat# tra'in( settin(s
(he other components of the global illumination model are rendered as usual. )rea light types
*sphere and area+ with the +a1e 'ig(t visible option enabled produce caustics in Path caustic mode.
1ore information about the caustic photon map settings can be found in the previous section *they
are the same+. (he other pathtracing settings are,
.ept(, defines the number of rays bounces in order to find the light sources. Migher
raydepth produces brighter renders. In scenes with big light sources! like open scenes using
background lighting! a high raydepth could be unnecessary. (his setting controls depth of
pathtracing caustic rays as well.
Sa*ples, (his setting defines the number of samples to take per camera pi"el! the more
samples the better render quality and the less noise! but the longer render time as well. (he
relation between noise reduction and sampling isnt linear, to halve the noise! it is necessary
to use four times as many samples. (he total amount of Path tracing sampling depends as
well on anti%aliasing settings! as e"plained in this section.
6se bac1ground, 1akes use of the background as a light source. #unsky models and IB@
lighting work always as light sources! regardless of this setting.
=o recursion, only path tracing is performed without recursive raytracing! which means that
shadow rays are not traced.

It is a good practice to increase $ decrease your samples settings in base > steps
*>%<%L%6H%'>%H<%6>L... etc+
Related articles,
@ighting 1ethods &verview.
/se cases
3irst anti%aliasing pass.
Mow backgrounds work.
P#oton 0ain(

Photon mapping was developed as an efficient alternative
to path tracing! since certain effects are more efficiently
simulated with sampling from lights *caustics! indirect
lighting+ while some others effects are more efficiently
sampled from the camera *mirror reflection! direct
lighting+. It is a two pass technique,
(he first pass is photon tracing! which consist in
building the photon map by tracing photons from
lights. It calculates indirect lighting and caustics
effects.
(he second pass consist in raytracing the scene
*camera rays+ using the information in the photon
map. (his second pass calculates specular
reflections *mirror $ glossy+ as well.
Photon mapping is biased! the average values might not be
correct! but it is consistent, with more photons and less
radius! it converges to a correct solution. Photon map
produces low frequency noise *big patches+ in contrast with
path tracing! which produces high frequency noise *pi"el%
level+.
P#otons
Photons propagate flu". (hey are emitted by light sources and stored in the photon map when they
hit a surface. In fact! each emitted photon can be stored several times. (he photon map represents
the incoming illumination! also called Irradiance *incoming radiance+. (wo photon maps are
produced in fact! which are,
) low density photon map for diffuse surfaces called .lobal photon map.
)n independent high density map for caustic effects.
In general! the more photons are used! the more accurate is the lighting estimate! but increasing
photons increases time to build the photon map. If the number of photons is too low! the irradiance
estimation becomes blurry at the edges of sharp features in the illumination! for instance fast
transition from light to shadows in corners.
Mowever! in simple scenes with no caustic effects! it is possible to produce relatively good results
with very low density maps of 6777%>777 photons. In this case the photon map is rendered very
quickly. Below a comparison between two photon mapping cases with different photon counts!
notice the bad estimation below the horiAontal prism and below the sphere! in the render on the left,

>777 Photons! DepthO>! >6' seconds. 6.777.777 photons! DepthO67! >G7 seconds!
"et#
Depth controls amount of consecutive bounces for both caustic and diffuse photons. Mowever! it has
got a different meaning depending on photon type,
.ept( for Eaustic photons, )mount of consecutive refractive and-or reflective events for
caustic photons! until they reach a diffuse surface.
.ept( for Diffuse photons, )mount of bounces in diffuse surfaces. 1ore depth will produce
more color bleeding and a denser photon map. Beyond certain point the amount of depth
will have a limited effect in map density or color bleeding! since most photons will be
already absorbed by diffuse surfaces.
Eomparison between different values of .ept(! with the same number of photons shot. Photon hits
means the number of photons recorded in the photon map! which is a value shown in the back
console. ;otice the relatively small difference in hits between depthO67 and depthO=7. )lmost
equal render times in all cases. #cene by Lronos,

Photon DepthO'! photon hitsO <67.777
Photon depthO67! photon hitsO H67.777
Photon depthO=7! photon hitsOH=7.777
Radius
(he second pass is a traditional ray tracing pass performed by shooting rays from the camera. Based
on a single photon! we can not say how much light a region receives. (his information is thus
provided by the photon density. 5hen a ray hits a point P on a surface! the illumination information
of the neighboring photons is collected and interpolated at P. 5e dont need a photon for every
polygon! but instead a few photons to estimate the incoming flu" in the region around P. (he
photon density is higher in areas with strong incoming illumination.
) well chosen radius allows for a good pruning of the search. (wo radii are used to perform the
search of neighboring photons! whichever is reached first,
.iff! Radius. (he sphere of fi"ed radius improves the estimation slightly! but fails in scenes
with high variation of density of photons. It gives bad estimates if there are too few photons
and blurry estimates when there is a high density of photons.
Searc(. /ser can specify a desired number of photons. It guarantees that there are K photons
in the measurement. (he more photons are used! the smoother the estimation will be. If too
many are used! the estimation will tend to be blurry! while too few gives a splotchy
appearance *low frequency noise+. Interpolating =7 to 677 photons is often a good choice.
)austic +ix, ;umber of photons to mi"! produces blur in the caustic photon map.
6se bac1ground, (he way it works depends on the background used,
5ith Single )olor! Gradient and non%IB@ 9exture! the background works as a light
source if this option is enabled. /se 3. $ )) sampling to remove noise.
IB@ 9exture and Suns1y work always as a light source! regardless of this option.
Mowever! when it is enabled! photons hitting the background will not be discarded
but get energy from it. )s a result! scenes will have more lighting power from the
background than when this option is disabled. /se B. $ 3. $ )) sampling to
remove noise.
In general! Radius should be inversely proportional to the number of photons shot, the more
photons the less radius. Mowever! a too low radius wihout an adecuate photon density! introduces
noise *small patches+. Radius settings are one of the main factors in render times. If the number of
photons to look up and average increases! so does the render times.

!ote: 5hen using photon mapping in enclosed scenes such as house rooms! it is important that
ob4ects follow realistic techniques for modelling! such as closed meshes with real thickness. 3ollow
this advice in walls! floor! ceiling and furniture. In this way we avoid estimation problems when
searching for neighboring photons.
Related articles,
@ighting 1ethods &verview.
/se cases
.lossy )s diffuse.
Mow backgrounds work.
1aterials that can produce caustics,
.lass
.lossy
Eoated .lossy
#hinydiffuse 1irror $ 3resnel.
8inal Gat#er
3inal gather is a caching technique to improve and complete photon mapping by gathering! after
photon tracing! an appro"imation of the local irradiance by using several illumination bounces. (his
information is used at render time for further interpolation! with the obvious advantage of requiring
a less accurate and therefore faster! but yet physically correct! photon map. ;oise reduction in 3.
renders depends on 3. samples and anti aliasing settings.
;G bounces, in a precomputed phase! determines the number of bounces for 3inal .ather
rays. (he first bounce is the most important oneJ subsequent bounces have got a more
modest impact on the result.
;G sa*ples, 3inal .athering samples for interpolation! the more the better! but the longer it
will take to render. (he total amount of 3inal .ather sampling depends as well on anti%
aliasing settings! as e"plained in this section.
S(o- *ap, /seful to tune the photon map. 5hen using it! you must seek for results with a
soft uniform appearance of patches! without noticeable groups of darker patches regularly
distributed across surfaces! which is a hint of low%frequency noise. 5hen you have problems
of density there are two options! increasing number of photons shot and bounces! or
increasing radius settings. ) good well%balanced photon map is especially important for
animations.
Related articles,
Photon 1apping.
3irst anti%aliasing pass.
6idire'tional Pat#tra'in(
Bidirectional constructs rays from the camera and from
light sources! and connect each others bounces with
visibility rays to ensure they are mutually visible. It is more
efficienct than pathtracing for caustics and indoor lighting!
but variance show up as noise too.
#ampling of the bidirectional rays is performed by using antialiasing settings! which means that
youll need a big amount of antialiasing sampling. 3or instance! 6H )) passes " 6H )) samples
would mean that >=H bidirectional samples are used. )nother strategy is using an e"treme amount
of )) passes " )) samples! and stopping the render process when it is clean enough. (he more ))
sampling! the more convergence to the correct solution.
AA t(res(old must be 7 to sample all pi"els in every pass. (he proportion between )) passes and
)) samples is irrelevant in this case for noise removal! since the whole image is resampled in every
pass. (herefore! only the multiplication result matters! the higher the amount of samples! the less
variation and the more noise reduction. Mowever! having all samples in one pass will likely be
faster than having many passes with one sample each. Rendering a small problematic portion of the
image with border rendering *,#iftJ6+ will give you an idea about how the result converges and the
amount of sampling needed for the whole render.
Related articles,
/se cases
)nti%aliasing.
Render ,ettin(s
Table of Content:
Ray Depth.
Shadow Depth and Transparent shadows.
Output Gamma.
Input Gamma.
Clamp RGB.
Clay Render.
Threads.
Result to Blender.
Autosave.
Alpha on autosave/animations.
Draw render parameters.
Output to XML.
Anti-aliasing.
Introduction.
First anti-aliasing pass.
Adaptive sampling.
Filter type.
Filter Size.
Anti-aliasing strategy.
General settin(s.
Ray "et#.
)mount of times that camera rays can be reflected in
specular surfaces. #pecular surfaces in YafaRay are,
S(inydiffuse +irror
Glossy material.
It also defines the amount of times that camera rays can get
through a transparent surface. (ransparent surfaces are,
S(inydiffuse with 9ransparency.
Glass material.
(his setting makes possible to render inter%reflections or
consecutive transparent surfaces down to a certain depth. )
typical effect of insufficient ray depth is a transparent
surface or a reflection being rendered black.
Related articles,
@ighting 1ethods &verview.

,#adow "et# and Transarent s#adows.
S(ado- .ept( and 9ransparent s(ado-s work together. 9ransparent s(ado-s are shadows
produced by transparent surfaces without inde" of refraction *I&R+. 9ransparent s(ado-s enabled
makes it possible to produce lighting filtered by a transparent surface! as an alternative to caustics
effects produced by .I methods. In YafaRay! there are two kinds of transparent materials without
I&R! which are,
S(inydiffuse with a 9ransparency value V 7.
Glass material with ;a1e glass option enabled.
,#adow "et# controls the amount of fake transparent surfaces that shadow rays can get through
to find light sources. Below there is a comparison between different ways of handling the
transparent shadows issue! and where 9ransparent s(ado-s A S(ado-s dept( options might be
useful. .irect lig(ting is used in all cases! although the results can be e"trapolated to the other
lighting methods! which have got caustic and raytracing components,
;o method has been enabled for lighting rays
to get through the transparent mesh! either from
light sources *caustics+ or for raytracing
shadow rays. (he mesh refraction is correctly
rendered with raytracing primary rays but
shadow rays *blue+ are occluded by meshes as
they look for light sources
Eaustic photons! emitted from an arealight!
produce lighting after getting through the glass
ob4ects with I&RO6.==. #uAAanes round shape
can concentrate the flow of photons so a caustic
map is produced with a bit of uniform density.
Mowever! the prismatic glass produces a caustic
map with density issues! since there isnt any
concentration of the photons flow. (he other
area types *sphere! mesh+ and MDR
backgrounds *IB@! #unsky+ are prone to this
kind of issue too.
)n alternative could be enabling the ;a1e glass
option! as well as 9ransparent S(ado-s with
enough S(ado-s dept(. Eaustic photons arent
needed here since the transparent shadows are
rendered with raytracing shadow rays.
(he transparent shadow produced by the
prismatic glass is conveniently uniform!
whereas the transparent shadow produced with
#uAAanes head becomes completely unreal.
)nother alternative can be using a spot light
instead of area types! shooting caustic photons.
(he narrower the spot beam the better. It is
good for caustics because the spot light beam
helps to focus and to concentrate the flow of
caustic photons. ;otice the superior quality of
the caustic effects in both meshes *;a1e glass
and 9ransparent s(ado-s are disabled here! so
its a real glass+.
In this case! ob4ects use a S(inydiffuse material
with 9ransparency. Eaustic photons arent
needed here since transparent shadows are
rendered with raytracing shadow rays.
Mowever! 9ransparent s(ado-s must be
enabled! and a sufficient S(ado- dept( should
be set for shadow rays to get through all
transparent surfaces when looking for light
sources.
Related articles,
@ighting 1ethods &verview.
Eaustic Photon 1ap.
.lass 1aterial.
#hinyDiffuse (ransparency.

+utut Ga00a.
.amma correction performed on renders! to match gamma of the operating system. 5indows
systems are calibrated for gamma >.>! while 1ac and @inu" are calibrated for 6.L.
Inut Ga00a.
Inverse gamma correction performed on render input! which are te"tures! shader colors and light
colors! so the render engine can work internally in the linear space. .amma input value should be
equal to output gamma! unless you a looking for gamma correction effects.
Cla0 RG6.
5hen Elamp R.B is enabled! the color depth is reduced to a low dynamic range! for better anti%
aliasing on high contrast areas. 3or instance! the anti%aliasing of visible area light sources and their
reflection on specular surfaces. (he e"amples below were made by se1ont#eweb. (he upper image
has got aliasing issues in areas with a strong contrast! but colors are crisp. In the lower image
)la*p RG4 has been enabled. (he anti%aliasing is better but colors are duller.
&ther ways of solving this issue are,
Increasing the render resolution and then scaling back to the desired resolution using a good
interpolation algorithm.
1ultipass rendering with render post processing.
Clay Render.
Produces a clay render overriding all materials.
Related article, Elay Render tutorial! by Bupla.
T#reads.
Ray tracing is a highly paralleliAable process. 1ost data structures in a typical ray tracer can be
shared by all available threads. In fact! Raytracing is among the few software fields that take real
advantatge of multicore systems! the more cores the better. 5ith this setting! users can fork the
rendering calculation into several simultaneously running tasks! depending on EP/ specs.
Result to 6lender.
5hen this setting is enabled! apart from the render output! the image is saved as well in the 4lender
6:&2*age editor D/F. (his makes it possible to open the image in the 4lender )o*positor nodes as
well D$F. /se )o*positor nodes B Add B 2nput B 2*age D<F and bro-se existing c(oices button DEF
to add the YafaRay render to the Blender compositor.
1ore information about Blender composite nodes in the link below,
http,--wiki.blender.org-inde".php-Doc,1anual-EompositeP;odes
?utosa1e.
(he render is automatically saved in the P;. format! with a time stamp in the file name so it isnt
overwritten. (he render file is located in the same folder as the Blender scene file.
?l#a on autosa1e@ani0ations.
Images automatically saved with Autosave and with Render ani* are saved in the P;. format! with
R.B and alpha data instead of background.
Related article, Render 5indows #ettings.
"raw render ara0eters.
(he most important render parameters are written in a badge in the rendered image. /se this feature
to compare renders and to ask for advice in the YafaRay forums.
+utut to -A;.
(he scene and render parameters is written in a YafaRay ?1@ file. (he ?1@ file is located in the
same folder than the Blender scene file.
?nti4aliasin(.
Introdu'tion.
)liasing is an appro"imation error in the discrete sampling of a 'D scene. (he most usual
manifestation of aliasing is 4agged edges. #ources of aliasing are,
.eometry.
Dery small details
(e"tures
Disible light sources
Mighlights in specular ob4ects
Eontrast between bright and dark ob4ects.
#harp shadows.
)nti%aliasing is a con4unt of sampling and reconstruction techniques used to mask or minimiAe the
aliasing artifacts.
8irst anti4aliasin( ass.
(he scene is sampled with a first pass! shooting a number of rays per every camera pi"el as
specified in AA sa*ples. (hese rays! also called primary rays! are shot from the camera and
intersect with the scene. (hat intersection point is the origin of several types of secondary rays. 3or
instance it is the origin of shadow rays used for sampling area lights and backgrounds. It is also the
origin of pathtracing random paths and final gather directional samples.
)nti%aliasing samples in the first pass are therefore connected to the sampling values used in area
lights! path tracing and final gathering. (he more AA sa*ples! the more intersection points as origin
of secondary sampling methods. (he first anti%aliasing pass is not only reducing aliasing artifacts!
it is in fact a multiplication factor for area light! path tracing and final gathering samples. @ook at
the comparisons below,
(he image on the left is using '> arealight samples! and 6 AA sa*ples *6 AA passes "C AA sa*ples
" 6 AA inc! sa*ples! time Gs.+. (he image on the right is using 6 arealight sample and '> AA
sa*ples *6 ))pass! '>"6 ))samples! >Gs.+. ;otice how the arealight soft shadows are almost equal
in both images. (he number of shadow rays to sample the arealight is in fact the same in both
images! but the method to achieve each of them is different! as e"plained below,
&n the left! ' arealight samples and 6 image sample is used. &n the right! 6 arealight sample is used
and ' image samples. (he number of shadow rays to sample the arealight is the same in both cases.
Mowever! the method on the left will be always more efficient! a bit less noisy and much faster in
terms of render times. 1ore e"amples below! with Photons $ 3inal gather and Pathtracing,
H< 3. samples! 6 ))pass! 6"6 ))samples! S<s. 6 3. sample! 6 ))pass! H<"6 ))samples! 'S7s.
6>L Pathtracing samples! 6 ))pass! 6"6
))samples! >HG s.
6 Pathtracing sample! 6 ))pass! 6>L"6
))samples! GGH s.
) conclusion is that in the first pass! it is more efficient to use light sources and indirect lighting
samples and a few AA sa*ples! rather than using a lot of AA sa*ples and less lighting sampling.
(herefore! the number of AA sa*ples should be always low. ) great deal of the anti%aliasing work
as well as much noise removal could be performed in subsequent AA passes with adaptive
sampling! as e"plained in the ne"t section.
Related articles,
@ighting 1ethods &verview.
)realight.
Path tracing.
3inal .ather.
(e"ture background.
Darktide #unsky background.
#unsky background.
.lossy reflection sampling.
?dati1e sa0lin(.
)nti%aliasing threshold is used to compare color of ad4acent image samples. If their color
discrepancy is higher than the limit defined by AA 9(res(old! then additional samples are taken in
the second and subsequent AA passes! but only in those problematic off%limit areas! without needing
to sample everywhere. (his technique is called adaptive sampling. (he number of additional
samples to be taken in problematic areas is defined by AA inc! sa*ples.
If AA 9(res(old decreases! the number of areas needing additional sampling will increase! as well
as the render time. )reas to be resampled decrease as new passes are performed and more areas get
within the threshold. ) good AA 9(res(old will focus anti%aliasing and noise reduction work only
on problematic areas! without resampling the whole image in every pass.
If AA 9(res(old is 7! the whole image is resampled in every pass.
(his render is using default 7.7= AA 9(res(old.
(he white points tell us what areas are being
resampled in every pass.
(his render is using 7.76 AA 9(res(old. ;ot only
more geometry is being resampled! but most of the
arealight soft shadows as well! and some of the
indirect lighting noise on the ceiling.
8ilter tye.
(here are three reconstruction filters in YafaRay. (hese filters determine how multiple samples near
a pi"el are blended together. (hese filters are,
4ox. 9qual weighting all samples. It is fast! but isnt efficient dealing with certain types of
noise and produces post%aliasing.
Gaussian. .ives good results. (ends to cause a slight blurring of the final image! but this
blurring can help to mask remaining aliasing in the image.
+itc(ell8=etravali. .ood results as well. Improves sharpness of the edges.
Bo" filter. .aussian filter. 1itchell%;etravali filter.
8ilter ,iMe.
/sers can change the siAe of the reconstruction filter.
Image samples are averaged inside a bo" around a pi"el.
Mow these pi"els contribute to the final pi"el value
depends on the filter used.
@owering AA ,ixel-idt( means that less samples will be
averaged! which makes renders sharper. If AA ,ixel-idt(
increases! more image samples are averaged! and the result
will be blurrer.
Mowever! reducing pi"el width means that the
reconstruction filter is less effective against aliasing and
high%frequency noise that could leak into the image. (hese
issues can be solved by increasing the amount of anti%
aliasing samples.
>.= )) Pi"elwidth! <Gs. Default 6.= )) Pi"elwidth! =<s. 6.6 )) Pi"elwidth! L>s.
?nti4aliasin( strate(y.
Based on concepts e"plained in the previous anti%aliasing sections! a good sampling strategy is
divided in two steps! which are,
(he bulk of noise removal! particularly low%contrast noise in dark areas! is performed in the
first AA pass! acumulating samples in light sources *arealights! background+ and in indirect
lighting algorithms *path tracing! final gathering+! while using only a few AA sa*ples *6 % '+
so a basic anti%aliasing is performed.
(he bulk of anti%aliasing is performed with adaptative sampling! using AA 9(res(old to
determine the areas to sample. )daptative sampling can also help us to remove high contrast
noise on arealight shadows and areas with indirect lighting. )daptative sampling is more
efficient if we use several AA passes to do it. )s some of the resampled areas get already
within the AA t(res(old! a ne"t AA pass will be usually faster.
(he idea is to e"change total amount of samples in the first pass *light sampling " AA
sa*ples+ with adaptative sampling.
If the )) (hreshold is low *less than 7.77=+! then the best technique is using one AA inc!
sa*ple! and lots of AA passes. If a pi"el needs H samples to look good! and we use = AA inc!
sa*ples in each pass! it means that we will use at least 67 samples in two passes to make
that pi"el look good. Mowever! it we use only 6 AA inc! sa*ples! that pi"el will use 4ust H
samples to look good! with the Hth. )) pass.
'> 3inal .ather samples.
' )) passes.
= )) samples.
= )) inc. samples.
7.7= )) (hreshold.
(ime 6SL s.
6H 3inal .ather samples.
= )) passes.
6 )) samples.
> )) inc. samples.
7.77S )) (hreshold.
(ime 6>= s.
6a'k(round ,ettin(s
Table of 'ontent:
Mow backgrounds work.
Single Color.
Gradient.
Texture.
Darktide Sunsky.
Sunsky.
:ow ba'k(rounds work
(here are five types of backgrounds in YafaRay. (he main purpose of the background is not only to
map the scene background! but to work as a light source as well. (he background lights the scene as
a spherical area light casting light inside. Mowever! background lighting is only possible with a
limited set of @ighting 1ethods $ Background types,

"ire't
li(#tin(
Pat#tra'in(
Causti'
#otons
Direct lighting
Path tracing
P#oton
0ain(
diffuse and
caustics
6idire'tional
,in(le 'olor

*6+

*=+

Gradient

*6+

*=+

Texture
=$>

*6+

*=+
Texture 4 I6;
=<>
"arktide
,un,ky
=E>
,un,ky
=E>

*6+
6se bac1ground button enabled in path tracing settings.
*>+
6se 24' button disabled or a R.B te"ture is used.
*'+
6se 24' button enabled and a MDR te"ture is used.
*<+
S1ylig(t and Sun options enabled.
*=+
6se bac1ground button enabled in photon mapping settings.
Related articles, @ighting 1ethods &verview.
,in(le 'olor
(his background casts light in a single color. It can be useful for tests and simple setups. (his
background type works as a light source only in path tracing and photon mapping! by enabling the
6se bac1ground option in the Settings section. Power of the background lighting can be controlled
by the background color alone! or by a combination of background color and background power.
,o-er setting is in fact a multiplier for background color.

Related articles,
Path tracing.
Photon 1apping.
Gradient
(his option calculates a background composed of four colors, two sky colors above the horiAon and
two ground colors below it. (he horiAon position is calculated on camera specifications. 9ach pair
of colors blend softly one each other to form a gradient. Mowever! colors ne"t to the horiAon are not
blended so a clear horiAon line can be defined. (his background can be very useful for,
Ealculating the correct horiAon line based on camera specifications! for compositing works.
5orking out a fake ground plane that e"tends the real ground mesh till the horiAon line! as
in the e"ample below,

In this image! the background ground colors
dont match the color of the mesh used as a
ground.
In this image! the background ground colors has
been corrected so it forms a continous plane till
the horiAon line.
Both background ground colors are given the
same color as the ground mesh. Mowever! the
color used is not the mesh diffuse color! but the
rendered one.
(his background type works as a light source only in path tracing and photon mapping! by
enabling the 6se bac1ground option in the Settings section. Power of the background lighting can
be controlled by the background colors alone! or by a combination of background colors and
background power. ,o-er setting is in fact a multiplier for background colors.
Related articles,
Path tracing.
Photon 1apping.
Texture
(he main point of this background type is using MDR images to light the scene. #upported formats are #dr
and exr. (he MDR images are loaded using Blender 9exture buttons *3H+ in 0orld mode W6X, "See belo-!!!#

&nce a te"ture is loaded! in the Blender 0orld buttons
*3L+! we select the background coordinates in the 9exture
and 2nput panel! depending on the MDR image loaded.
#upported coordinates are Ang+ap and Sp(ere.

(ypical look of an angular MDR map!
from http,--www.debevec.org-
(ypical look of a spherical MDR map! from
http,--hdri.'dweave.com-library-park6.php

YafaRay will use the te"ture datablock set in the Blender
0orld buttons *3L+. (he other parameters needed to
configure the MDR backgrounds are located in the
YafaRay settings /I! under the 0orld tab,
6se 24', 9nable this option to use the background
as a light source. ) MDR image is needed.
Rotation, Rotates the background.
,o-er, ) multiplier for background colors.
24' Sa*ples, Defines the amount of samples taken
to calculate the soft shadows. (he more samples!
the less noisy the shadows but the longer it will
take to render. (he total amount of light sampling
depends as well on the anti%aliasing settings! as
e"plained in this section.
Related articles,
3irst anti%aliasing pass.
.lossy reflection sampling.
5orks with,
Direct lighting.
Path tracing.
Photon 1apping.
"arktide ,unsky
#unsky is a background type that appro"imates the full spectrum of daylight for various
atmospheric conditions. (he main concepts of the Darktide sunsky model are,

Turbidity
9urbidity is the haAiness of a fluid caused by individual suspended particles that are generally
invisible to the naked eye! similar to smoke in air. In another words! amount of dirtiness in the sky!
the higher the more yellowish-reddish the sky becomes. Recommended ranges are,
*>! '+O e"ceptionally clear sky
*'! =+O normal day
*=! 6>+O foggy day

(urbidityO > (urbidityO = (urbidityO 67
:oriMon bri(#tness
4rig(tness of (ori3on gradient controls brightness of the horiAon relative to the sky. 'u*inance of
t(e (ori3on defines width of the gradient separating the horiAon from the sky. /se similar values for
both settings. Recommended ranges are,
/se *7! 6.>+ when turbidity is *>! <+.
/se *7.G! 6.=+ when turbidity is V =.

(urbidityO >
MoriAon .radientO 7.6
@uminance of
MoriAonO7.6
(urbidityO >
MoriAon .radientO 7.=
@uminance of
MoriAonO7.=
(urbidityO >
MoriAon .radientO 6
@uminance of MoriAonO
,un disk
Solar region intensity and 0idt( of circu*solar region are settings to control brightness and siAe of
the sun disk! respectively. (he bigger these values are! the brighter and smaller the sun disk will be.
(o see the sun disk! use similar values for both settings in a range of *67! <7+. You can achieve other
results though! like a small sun disk but not so bright! by using different values in each setting.)
brighter bigger sun means that highlights will be bigger and brighter on specular surfaces.
TurbidityN $
,olar re(ion intensityN /.
Widt# of '. re(ionN /.
TurbidityN $
,olar re(ion intensityN $.
Widt# of '. re(ionN $.
TurbidityN $
,olar re(ion intensityN E.
Widt# of '. re(ionN /.
6a'ks'attered li(#t
Backscattered light is the light scattered back by the atmosphere turbidity. In practice! higher values
produce a brighter sky around a consequently smaller sun disk. (he backscattered light contributes
less the lower the 9urbidity values are! though.
(urbidityO >
#EIO6=
5ERO>7
Backscattered lightO 6
(urbidityO >
#EIO6=
5ERO>7
Backscattered lightO =
(urbidityO >
#EIO6=
5ERO>7
Backscattered lightO 67
,un osition 'ontrols

;ro* "get angle#, (akes sun angle from a selected sun
lamp in the Blender scene.
;ro* "get position#, (akes sun position from a selected
sun lamp in the Blender scene.
;ro* "update sun#, 9"ports #un position and angle to a
selected sun lamp in the Blender scene.
.irection Sp(ere, Drag your mouse cursor over this sphere
to interactively select the direction of the sun rays.
.irection coordinates, Eoordinates for direction of the sun
rays.
?ltitude
5ith this setting! we can give the camera a different altitude relative to the background center. If
Altitude increases! the background horiAon lowers. (his option can be useful to render ob4ects from
a camera which is above the ground level! while still getting a correct position of the background
horiAon.
)ltitudeO 7 )ltitudeO 7.>= )ltitudeO 7.=7
!i(#t
(his feature renders the scene at night! with the #un acting as the 1oon.
+t#er ,ettin(s
Add real sun, ) realistic #un model is added to the scene!
taking into account #un position and power settings.
Sun ,o-er, Power of the #un added.
Sa*ples, #amples for both the #un and the #kylight. (he
more samples the less noise and the better glossy
reflections! but the more render time as well.
Add S1ylig(t, (he sky casts light.
S1y 4rig(tness, Independent brightness control for
background sky colorsJ it does not affect amount of cast
light.
,o-er, 1ultiplier for background sky colors.
Related articles,
3irst anti%aliasing pass.
.lossy reflection sampling.
5orks with,
Direct lighting.
Path tracing.
Photon 1apping.
,unsky
#unky is a similar concept to Darktide #unsky! albeit simpler and handling colors in a different way.
It is also a background type that appro"imates the full spectrum of day light for various atmospheric
conditions. In these tests we have used Sun po-erO 7.=7 and S1ylig(t po-erO 6.7,

Turbidity
9urbidity is the haAiness of a fluid caused by individual suspended particles that are generally
invisible to the naked eye! similar to smoke in air. In another words! amount of dirtiness in the sky!
the higher the more yellowish-reddish becomes the sky.
(urbidityO ' (urbidityO H (urbidityO 6>
:oriMon bri(#tness
A ">or4rg(t# controls brightness of the horiAon relative to the sky.
(urbidityO '
) *MorBrght+O 7.67
(urbidityO '
) *MorBrght+O 7.H7
(urbidityO '
) *MorBrght+O 6.'7
;u0inan'e of (radient near t#e #oriMon
4 ">orSprd# defines width of the gradient separating the horiAon from the sky.
(urbidityO '
) *MorBrght+O 6.77
B *Mor#prd+O 7.=7
(urbidityO '
) *MorBrght+O 6.77
B *Mor#prd+O 6.77
(urbidityO '
) *MorBrght+O 6.77
B *Mor#prd+O 6.=7
,un 6ri(#tness and ,iMe
) "Sun4rg(t# and . "Sunsi3e# are settings to control brightness and siAe of the sun area!
respectively. (he bigger these values are! the brighter and bigger the sun area will be.
) brighter and bigger sun means that highlights will be bigger and brighter on specular surfaces.
E *#unBrght+O 7.>
D *#unsiAe+O 7.>
E *#unBrght+O 7.H
D *#unsiAe+O 7.>
E *#unBrght+O 6.7
D *#unsiAe+O 7.>
6a'k s'attered li(#t
E "4ac1lig(t# is the light scattered back by the atmosphere turbidity. In practice! higher values
produce a brighter sky around the sun disk. (he backscattered light contributes less the lower the
9urbidity values are! though.
(urbidityO =
9 *Backlight+O 7.=
(urbidityO =
9 *Backlight+O >
(urbidityO =
9 *Backlight+O =
,un osition 'ontrols
;ro* "get angle#, (akes sun angle from a selected sun
lamp in the Blender scene.
;ro* "get position#, (akes sun position from a selected
sun lamp in the Blender scene.
;ro* "update sun#, 9"ports #un position and angle to a
selected sun lamp in the Blender scene.
.irection Sp(ere, Drag your mouse cursor over this sphere
to interactively select the direction of the sun rays.
.irection coordinates, Eoordinates for direction of the sun
rays.
+t#er ,ettin(s

Add real sun, ) realistic #un model is added to the scene!
taking into account #un position and power settings.
Sun ,o-er, Power of the #un added.
Sa*ples, #amples for both the #un and the #kylight. (he
more samples the less noise and the better glossy
reflections! but the more render time as well.
Add S1ylig(t, (he sky casts light.
,o-er, 1ultiplier for background sky colors.
Related articles,
3irst anti%aliasing pass.
.lossy reflection sampling.
5orks with,
Direct lighting.
Path tracing.
Photon 1apping.
Bolu0etri's
By Y wiAofboA
Table of 'ontent:
Introduction.
The Basics.
Workflow.
Volume types.
Volume Integrator.
Step Size.
Other Volume Integrator Settings.
Examples.
Volume Regions.
Volume Region tips.
Absorption and Scattering.
Examples.
Volume Region Types.
UniformVolume
ExpdensityVolume
Example
NoiseVolume
NoiseVolume Settings
The NoiseVolume Texture

Introdu'tion.
YafaRays volumetric features provide a simulation of light interacting with particles suspended in a
region of space. ) common volumetrics scenario is the 0beam of light0 effect! for e"ample when
light enters a dusty room through a window creating a visible shaft of light. YafaRay uses a
realistic physics%based model to render volumetrics! and provides a basis for creating not 4ust
believable beams of light! but also smoke! clouds! fog! and other volumetric effects.

I0ortant, /se P;. or any other lossless format to save renders with volumetrics. BP.
compression kills volumetrics detail.
T#e 6asi's.
(his section gives a brief overview of rendering volumetrics in YafaRay. #pecific parameters and
settings are covered in subsequent sections.
Workflow.
(here are several basic steps necessary to render volumetrics in YafaRay. ) brief outline of the
workflow is,
1. In the 0orld tab of the YafaRay /I select the single scatter integrator in the volume
integrator settings.
>. Ereate a bo"%shaped ob4ect *the volume region+ in the scene to act as a container for the
volumetric effect.
3. 5ith the volume region ob4ect selected go to the $b%ect&'ig(t&)a*era tab of the YafaRay /I
and activate the Enable volu*e button.
<. 9nsure at least one light source in the scene illuminates the volume region.
Bolu0e Tyes.
)n important characteristic governing the final appearance of volumetric media is density. It is
intuitively clear that a greater particle density in a volume region equates to a more pronounced
volumetric effect. )lso! a method to control density is needed to render effects such as clouds or
smoke! which have a variable density. #o in YafaRay there are three different volume types for a
region based on how density is controlled,
6nifor*:olu*e, a uniform density volumetric effect! useful for dust! fog! mist! etc.
Exp.ensity:olu*e, like a /niformDolume! but decreases the density of the volume as height *in
positive A direction+ increases. /seful for ground fog! etc.
=oise:olu*e, lets a blender procedural te"ture control the density of the volume! good for clouds!
smoke! etc. ;ote that this method must be considered a 0fake0 compared to a realistic cloud or
smoke density simulator that is unavailable in YafaRay.
&ne of these volume types can be selected for the volume region once Enable volu*e is selected.

I0ortant, when using ;oiseDolumes the blender te"ture used must be called (9myte"! so that
the te"ture setup looks like this,
If this e"act name is not used blender will crash during the render process and all work will be lost.
(his limitation will be removed in the future.
(he following sections discuss volumetric settings and parameters in detail.
Bolu0e Inte(rator.
(he volume integrator settings are located in the 0orld tab of the Yafaray /I! underneath the
background settings. (he settings here for the #ingle #catter integrator pertain to the global
precision of volumetric calculations. (hese settings have a considerable impact on render speed!
and so they are important to control the balance of speed versus quality.
,te ,iMe.
(his parameter is the main control for the precision of volumetric rendering. Eonsider the
following e"ample setup with a volume! a camera! and a light source,
"See i*age belo-!!!#
5hen a viewing ray shot from the camera *the blue lines+ intersects a volume! the portion of the ray
inside the volume is subdivided into 0steps!0 with the length of each step being the value of the step
siAe parameter *in blender units+. )t each step shadow rays are traced to all the light sources in the
scene *the red line+ to determine how much light reaches the step! and then from this information
the total light contribution to the viewing ray is computed. (his calculation at each step is called
attenuation.
#o the following conclusions about step siAe can be drawn,
Decreasing the step siAe value means more steps along the viewing ray and more attenuation
calculations. (his leads to a more accurate result! at the e"pense of increased render times.
@onger viewing ray segments inside a volume have more steps and therefore require more
attenuation calculations than shorter ray segments.
+t#er Bolu0e Inte(rator ,ettin(s.
Mere are the rest of the volume integrator settings,
Adaptive, optimiAes stepping calculations for ;oiseDolumes! resulting in reduced render
times for certain situations. (here is no visual change to the render result by using this
option.
$pti*i3e, attenuation calculations can be computationally e"pensive for certain volumes.
(his setting speeds this process by precomputing attenuation in the entire volume at a 'd
grid of points. (hese results are then interpolated and used as attenuation values at each step
of a viewing ray! rather than calculating attenuation directly at this point. (his function is
very helpful for reducing render times for ;oiseDolumes and 9"pDensityDolumes.
Att! Grid Resolution, since the attenuation grid is an estimation! lower values can result in
reduced detail in shaded areas. 3or many volumes a value of > or ' is sufficient! but for
darker ones a higher value may be necessary.
Exa0les.
(he volume on the left is grainy because the step siAe is too high *7.=+. ) lower step siAe on the
right *7.6+ corrects the issue! but is of course slower *four times slower in this case+.
Dolumes with Att! Grid Resolution of 6! '! and =! plus another with $pti*i3e off for reference.
;otice the improved shading detail with higher grid resolutions. 9ven at a grid resolution of = the
render time was about one third compared to the render without $pti*i3e on.
3or reference! the te"ture settings used for the ;oiseDolumes in the previous e"amples are shown
below,
Bolu0e Re(ions.
(he volume region defines the general shape and characteristics of a volumetric effect. Dolumetrics
only occur inside of a volume region! allowing control over placement of a volumetric effect in a
scene. 5hen a volume region is the active ob4ect in a scene the volume settings in the
$b%ect&'ig(t&)a*era tab of the YafaRay /I control specific aspects of how a volume renders.
Bolu0e Re(ion Tis.
#ome quick notes on volume regions,
(he siAe of a volume region has a direct effect on render times. 3rom the discussion on step
siAe it is clear that a bigger volume requires more steps along a viewing ray and more
attenuation calculations than a smaller volume. #o it is important for efficient rendering of
volumetrics that the volume region be as small as possible.
)s noted earlier! volume regions cannot be rotated in a scene. (he edges of the volume
region ob4ect must remain aligned with the global coordinate a"es.
?bsortion and ,'atterin(.
(he volume region settings in the &b4ect-@ight-Eamera tab control specific qualities related to the
look of a volumetric effect. 9ach type of volume region */niformDolume! 9"pDensityDolume!
;oiseDolume+ may have its own unique set of parameters! but every volume region type has
parameters controlling two fundamental properties %% absorption *sig*a?a+ and scattering
*sig*a?s+.
sig*a?a *absorption+, some volumes absorb a certain amount of light that they receive! for
e"ample black smoke from a fire e"hibits a lot of absorption.
sig*a?s *scattering+, scattering occurs when light traveling along a path encounters a
particle in a volume and is redirected to a new path. #cattering affects how the camera
detects light in two ways, light rays heading towards the camera can be redirected away
from the camera! and light rays not originally aimed at the camera can be scattered in its
direction. (he 0beam of light0 effect is the result of light being scattered towards the
camera.
Exa0les.
&n the left is a volume with only absorption *sig*a?a O 7.=+! and has a dark smoky appearance.
&n the right is the same volume but with scattering added *sig*a?s O 7.7=+! and has a denser! more
comple" look.
3or reference! these are the te"ture settings used to create the previous e"ample image.
(hese show the effect of scattering on light from spot lights. ;otice how the the monkey ob4ect
blocks light from the lamps! creating a shadowed area in the visible cone of light. )lso note the
interaction of the colored lamps in the volume.
(hese show the result of area lights in a volume. Mere light from the area lamps is scattered widely
across the volume.
Bolu0e Re(ion Tyes.
(his section discusses the different types of volume regions! including parameters and workflow
specific to a particular volume type.
Unifor0Bolu0e.
(he /niformDolume type provides a basic uniform density volumetric effect within the volume
region.
(he parameters for the /niformDolume are limited to controls for absorption and scattering. (hese
parameters were discussed in a previous section.
Ex"ensityBolu0e.
(he 9"pDensityDolume defines a density within the volume region that decreases with increased
height *in the direction of the positive A%a"is+. (his decrease is an e"ponential rate of decay!
controllable using the two parameters (eig(t and steepness. (his volume type is useful for effects
such as ground fog where the effect is most pronounced close to the ground.
In addition to parameters for absorption and scattering! the 9"pDensityDolume has the following
settings,
(eig(t, controls the density of the volume before it starts to fall off. Bigger height values
will result in a denser volumetric effect close to the ground.
steepness, controls how quickly the density falls off. Migher steepness values will result in
a quicker transition between the areas of ma"imum density and no density.
Exa0les.
In the above e"ample M is height and # is steepness. ;otice that increasing the value for height
results in a denser volumetric effect near the floor! while decreasing the value for steepness results
in a longer and slower transition from dense to not dense.
!oiseBolu0e.
(he ;oiseDolume type allows the density of the volume to be controlled by a blender procedural
te"ture. YafaRay translates the intensity values of a blender te"ture into density! with darker values
on the te"ture corresponding to lower density and lighter values corresponding to higher density.
(his provides a method to appro"imate the look of different variable%density effects such as steam!
smoke! clouds etc.
!oiseBolu0e ,ettin(s.
(he ;oiseDolume has the following unique parameters,
S(arpness, controls how sharp a ;oiseDolume looks at the border between areas of high
and low density. 5ith higher values of sharpness a ;oiseDolume will look crisper and more
distinct at the edges.
)over, has the effect of defining what percentage of a procedural te"ture maps to Aero
density. )s values for cover decrease from 6! a greater percentage of the te"tures lowest
intensity values map to Aero density! creating a sparser volumetric effect with more empty
spaces.
.ensity, a global density multiplier. )t the default density value of 6 a procedural te"ture
can sometimes correspond to densities too high or too low to give a useful output. )d4usting
this density parameter can bring the result back to a workable range.
(he above e"ample illustrates the effect of both the sharpness and cover parameters *#Osharpness!
EOcover+. 3or those interested! the te"ture settings used to create this e"ample volume are included
below,
T#e !oiseBolu0e Texture.
(he blender procedural te"ture used to control the density of a ;oiseDolume is the primary control
for how this volume type looks. 3irst! even though this information was mentioned earlier! it is so
important that it will be repeated,
Important, when using ;oiseDolumes the blender te"ture used must be called (9myte"! so that the
te"ture setup looks like this,
If this e"act name is not used blender will crash during the render process and all work will be lost.
(his limitation will be removed in the future.
)ll settings relevant to the use of a procedural te"ture for a ;oiseDolume can be found in blenders
te"ture buttons panel *3H+. )ny procedural te"ture supported by YafaRay can be used as a te"ture
for a ;oiseDolume. 1ore information on YafaRay and procedural te"tures is available in the
Procedural (e"tures section of the manual.

Вам также может понравиться