Current stable version: 0.1.1

Objects, Lights and Camera settings

Table of Contents:

Object, Lights, and Camera settings.

In general, settings under this section of the YafaRay UI are used to give specific YafaRay properties to light sources and cameras in the Blender 3D scene. Only a limited number of Blender settings are taken into account by YafaRay. The general workflow is:

  1. Create or select an existing object (camera, light or mesh) in the 3D scene.
  2. Give it YafaRay specific settings using the YafaRay settings UI.

Object (meshlight).

With this feature, objects in the scene can act as area light sources. The soft shadows produced by area lights need to be sampled several times and then interpolated to reduce noise. This type of light takes more time to render in contrast with point light types such as spot and point.

First of all, you must select the mesh you want it to act as a light source. Then you must click on the Objects main button. Finally you must activate the Enable Meshlight button. To change the light color, just click on the rectangle next to Meshlight color to open a Color Picker.

  • Meshlight color rectangle: opens a Color Picker.
  • Power: intensity multiplier for meshlight color.
  • Double Sided: considers both sides of the mesh as arealight sources.
  • Samples: defines the amount of samples taken to calculate the soft shadows. The more samples, the less noisy the shadows but the longer it will take to render. The total amount of light sampling depends as well on the anti-aliasing settings, as explained in this section.

Example of Meshlights, rendered with Bidirectional.

Related articles:

Other area light types:

Lights.

Lights settings are mostly controlled by the YafaRay UI. In Blender, the only actions required are placing lights and choosing a Blender light type. Arealight size and spot beam parameters are controlled in Blender panels though. In YafaRay, lighting power is controlled by a couple of settings (Color and Power) available in the python UI for every light type, therefore the Blender Distance and Energy buttons don't have any effect at all on YafaRay.

Once a light is placed and its type defined in Blender, select it and press Object/Light/Camera main button. The python UI 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 Sphere.

When you create or select a Lamp light in the Blender 3DWindows, the python UI will let you choose between two options to do this kind of job, Point and Sphere. A Point light is a typical omni directional point light source as in Blender Internal with hard shadows, while a Sphere light is a spherical area light source which can produce soft shadows.

The Sphere light settings are:

  • Light color rectangle: opens a Color Picker.
  • Power: intensity multiplier for light color.
  • Radius: sets the radius of the Sphere light in Blender units.
  • Make light visible: area light gets rendered visibly.
  • Samples: defines the amount of samples taken to calculate the soft shadows. The more samples, the less noisy the shadows but the longer it will take to render. The total amount of light sampling depends as well on the anti-aliasing settings, as explained in this section.
Comparison between point light (left) and spherelight (right). Notice the different shadows.

Related articles:

Other area light types:

Directional and Sun.

When you create or select a Sun light in the Blender 3DWindows, the YafaRay UI will let you choose between two kind of lights to do this kind of job, Directional and Sun. Directional light is a traditional sun light model which produces parallel rays and hard-edged shadows.

  • Light color rectangle: opens a Color Picker.
  • Power: intensity multiplier for light color.
  • Infinite: 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.

The 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 object, as in real life. The angle button sets the visible area of the sun. Real Sun is visible in a cone angle of about 0,5º. A bigger angle mean a bigger sun, as well as softer shadows, which could be interesting for dawn or sunset scenes. A very big angle can be used to simulate sun light filtered by an overcast sky.

  • Light color rectangle: opens a Color Picker.
  • Power: intensity multiplier for light color.
  • Angle: visible size of the sun light. Affects shadows.
  • Samples: it defines the amount of samples taken to calculate the soft shadows. The more samples, the less noisy the shadows but the longer it will take to render. The total amount of light sampling depends as well on the anti-aliasing settings, as explained in this section.
Comparison between Directional (left) and Sun (right). Notice how, with a Sun light, shadows get blurred as the distance with the casting object increases.

Area.

Arealight is a area light type that can produce soft shadows and its shape can be seen in reflective surfaces. The arealight shadows need to be sampled several times and interpolated to reduce noise. This type of light takes more time to be computed in contrast with point light types such as spot and point.

The area light size is controlled by the Size setting in the Blender Lamp panel. The rectangular shape option in that panel is not supported, although you can get a YafaRay rectangular arealight by scaling on axis in the 3DWindows.

When the Make light visible button is enabled, a rectangle in the size of the area light is generated, so that the area light gets rendered visibly. More lighting power is added as well to the scene.

When photon mapping is enabled, arealights cast photons. The Make light visible option only makes the arealight visible from the camera and in reflective surfaces. When pathtracing is used, the Make light visible option also creates caustics paths, although there exist an option to not trace caustics paths with path tracing as they tend to be extremely noisy ('none' option in Pathtracing settings, see 5.1.1).

  • Light color rectangle: opens a Color Picker.
  • Power: intensity multiplier for arealight color.
  • Make light visible: area light gets rendered visibly. In path tracing, it shoots caustic path rays.
  • Samples: defines the amount of samples taken to calculate the soft shadows. The more samples, the less noisy the shadows but the longer it will take to render. The total amount of light sampling depends as well on the anti-aliasing settings, as explained in this section.

Example of a rectangular visible arealight.

Related articles:

Other area light types:

Spot.

Spot is a common point light with directional properties. Light color and Power settings work like in the other light types. Beam properties (angle and edge softness) are defined in Blender panels (light select. & F5) with SpotSi and SpotBl sliders:

Camera settings.

First a camera should be created or exist in your scene. Lens angle and ortho scale must be configured in the Blender Camera panel (F9). Then select the camera and press Object/Light/Camera main button. The python UI will automatically change to show specific camera settings. There are four camera types in YafaRay: Architect, Angular, Orthogonal and Perspective.

Architect/ DOF.

This 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 Field settings are available for this camera type as well. DOF settings are explained in the Perspective/DOF section.



Comparison between Perspective (left) and Architect camera (right). Notice the lack of vertical convergence in the Architect camera. Scene by Kronos

Angular.

A camera type useful to produce up to 180 degree panoramas, like the ones produced by fish eye cameras. Alternatively 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 subject and angle of view.

 

Angle of view of a camera

  • Mirrored: Mirrors the render in the x direction, as the reflections on a light probe.
  • Angle: Horizontal opening angle of the camera, takes into account camera aspect ratio to calculate the vertical opening.
  • Circular: Creates a circular render and shades areas outside.
  • Max Angle: Diagonal opening of the circular render.

Example of an angular camera, used to create perspective distortion. Scene by Gabich.

Orthogonal.

A camera type that renders an orthographic (perpendicular) projection of the scene, without perspective effects. Camera only setting is:

  • Scale: Specify the scale of the ortho camera, to control camera zoom.


Comparison between perspective camera (left) and ortho camera (right).

Perspective / DOF.

Perspective is the standard camera mode that simulates a lenses photographic camera with perspective effects. All settings available for this camera type are used to enable and configure the depth of field (DOF) effect. The depth of field is the distance that objects appear in focus. DOF settings are:

  • Bokeh type: controls the shape of out of focus points when rendering with depth of field enabled (blur disk). This is mostly visible on very out of focus highlights in the image. There are currently seven types to choose from.
  • Bokeh rotation: rotation of the blur disk.
  • Aperture: The size of the aperture determines how blurred the out-of-focus objects will be. A rule of thumb is to keep it between 0.100 and 0.500 (0 disables DOF).
  • Bokeh bias: controls the accentuation of the blur disk. Three types available, uniform, center or edge, with uniform the default.
  • DOF distance: set the focal point in which objects will be in focus.
  • Obj: Enter the name of the Blender object that should be the focal point.
  • Calculate distance: it calculates the distance between the object entered in Obj and the camera, and writes this value in the DOF distance button.

The DOF effect depends also on the render anti aliasing settings to get a nice blurred effect. First of all it is recommended to lower AA threshold a bit, but not set it to totally zero. Setting a high number of AA 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 AA samples. A single pass with a high number of samples may be sufficient.