Tutorial : setting up Yaf(a)Ray shaders

I started to use Yaf(a)Ray for my current project. The successor of YafRay has came up with many new features, and the new shader system wasn’t the less interesting.

As I stated it as an objective for the project, I wanted to create all my shaders on my own. Here’re the current settings I’m using and how they look like.

Murcielago render #00005

Of course they can’t be considered as definitive shaders. But they can be of interest for your own work and experiments, so here they are.

Clay

Clay may look useless, as Yaf(a)Ray offers an option to render a scene in clay, no matter what shaders have been defined (or not)

But how can you render a whole model in clay except the windows ? You can’t with the builtin feature of Yaf(a)Ray. Here comes the need for a clay shader. The main advantage of the settings below is that they are the very same settings used internally by Yaf(a)Ray. So a whole model rendered clay by Yaf(a)Ray and a model using only this shader will look the same.

Yaf(a)Ray clay Murcielago clay #00050

Car paint, glass, rim alloy : most noticed shaders

The car paint lacks some metallic flakes within it, I will work on it later and post updates here : don’t miss them !

Yaf(a)Ray orange car paint

The glass shader is the default setting from Yaf(a)Ray. It just does the job, provided your windows have some thickness (otherwise Yaf(a)Ray can’t compute refraction properly) and you set enough rebounds in the Depth parameter. Especially, you need to increase this setting if you have a window laying behind another one, like I do have in my render.

Yaf(a)Ray glass

The rim alloy is a glossy, dark one :

Yaf(a)Ray alloy

Plastics

Below are a mat plastic and a shiny one. Both are black, but notice I didn’t use #000000 as color : in real world, a black object is never completely black as #000000 is, because it actually does reflect a bit of light.

Yaf(a)Ray black plastic Yaf(a)Ray glossy plastic

Rubber

Below are a mat rubber and an attempt for a waxed rubber. Mat rubber perfectly does the job for joints around windows, for example.

The waxed rubber was intended to look like a brand new shiny tire : waxed. This attempt is a failure so far, so I will have to fix this as soon as possible. Stay tuned for updates here.

Yaf(a)Ray joint rubber Yaf(a)Ray tire rubber

Chrome

Chrome has never been a complicated shaders : setting a fully reflective shader will work most of time. I didn’t need more complicated solution so far, so here’s a simple shader.

Yaf(a)Ray chrome

3 thoughts on “Tutorial : setting up Yaf(a)Ray shaders

  1. It’s just the Sun&Sky feature integrated within Yaf(a)Ray. I’m using it with a pretty low sun, it adapts light color automatically.

    I’m writing a tutorial about rendering with Yaf(a)Ray, please stay tuned for it.

Leave a Reply

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