Post date: February 16th, 2011 | Category: 3D Rendering and Visualization

Photorealistic Rendering With VRay - Materials Kickstart

If you checked out some renderings with VRay on various site and forums, you probably wonder how the hell did they do it? Well, there are a couple tricks I’m going to share with you about photorealistic rendering using Vray materials and rendering setups so you can too have photorealistic renderings using VRay materials!

Materials in the Real World

Vray has a very interactive and handy material setup interface, which you will surely love once you familiarize with it. The usual settings that are basically in the default material editor if you are using Max or Maya are more close to the model that is used in computer games. It is also quite old, and is only an approximation of the real light behavior model.

Photorealistic Rendering Using VRay - a cup of coffe

Photorealistic rendering using VRay - a simple cup of coffe

To get you more interested in the subject, here’s an image (on the right) I rendered using VRay as a demo of using some advanced VRay materials and render setups. You like it? Good! Let’s party then!

VRay materials lets us define actual physical properties of materials that are based on light physics, so once you understand this model you will be able to create any custom material for any purpose.

For a brief moment, let’s stop and take a look around out rooms. Everything we see has 5 major characteristics:

  1. Diffuse texture
  2. Specular texture
  3. Reflection factor
  4. Refraction factor
  5. Bump texture
  6. Displacement texture

And a couple minor characteristics which we are not going to get into this tutorial, except for bump mapping which is quite basic, and the displacement feature of VRay materials that is actually a “sin” not to mention.

Note that the term “texture” can also be referred to as “color” of the surface, but I used the “texture” term deliberately because no object in the world has the absolutely same color all over it’s surface – so we are actually talking about textures all the time.

Unless, it’s something we can approximate with a constant color. A glass window, for instance. Still, even in that case, it’s advisable to add some very light texture on the glass surface adding realism. If you do not do that you will end up with a perfect rendering and that’s not photorealistic.

Next, let us go over all these Vray materials characteristics with rendering examples how they actually work. Later I will do a combination of VRay materials properties to simulate real world situations, and at the end we shall do a simple rendering of a coffee cup. I’ll also explain how to set up the materials for that one.

Defining VRay Materials

Diffuse Properties

Diffuse Properties

Diffuse property

The diffuse texture has been used around for quite a long time. Back in time, when the CPU/GPU power was pretty low, we were all happy that we had at least have that one. Basically, it describes colors that are present on the surface. So I applied a simple stone texture to the sphere over at the right image using VRay materials. This is as simple as it gets regardless of what model of light or renderer you use.

Note that you can click on any image to see it larger.

Specular property

Specular Properties

Specular Properties

In this simple example of specularity, I’ll only add a 100% specular property to the surface – which means it’s fully reflecting the environment. Let’s check out the image on the right. Not that I also added (my favorite) checkered marble as a floor so we see how the sphere is reflecting it.

Vray materials here are doing a pretty good job here specially if you take into account the next feature.

Let’s take a look at the Reflection Glossiness (Refl. Glossiness) parameter. It basically defines how uneven the surface is on a molecular level. Think of it as really, really small bumps that you need to zoom in pretty much to be visible. What it does is that it adds a bluriness factor to the reflection, so we can simulate surfaces that are not mirror flat. Adding a subtle bump map and tiling if a lot of times over the surface would produce a similar effect – and that is actually what happens in nature. But, to speed up things the Reflection Glossiness is added so we can take advantage of it.

Specularity with a blurry reflection

Specularity with a blurry reflection

Let’s check out the results at the right image. The additional VRay materials parameters applied here are:

Refl. Glossiness: 0.9
Subdivs: 32
Interpolation: No
Max depth: 5
Exit color: Black (RGB: 0,0,0)

There are some additional parameters that are associated with the Reflection Glossiness – namely the Subdivision (Subdivs.) that is defining how many test rays are to be shot out to sample the surroundings. Basically, the lower the Reflection Glossiness the higher the Subdivisions settings need to be. If the Reflection Glossiness is set to 1 this parameter is ignored, and only one ray is shot out to sample the reflection of the VRay materials.

The Max. Depth parameter defines how many times the ray shot out to determine the reflection can be bounced from other reflective or refractive materials. The Exit Color defines if the number of maximum trace depth has been reached what color to apply at the end of the trace point. Note that this does not mean what color will be applied as a final color to the pixel in question.

I basically never use the Interpolation parameter, as it actually blurs the result. It is to be used when the Subdivs value is low, and you still want to have a render that is relatively decent, not blotchy. It is also recommended to use this VRay materials feature if you are creating an animation because it causes severe flickering of the rendered solution.

Fresnel Reflections

Fresnel reflections

Fresnel reflections

Next, you can use Fresnel reflections with your VRay materials. A Fresnel reflection is a physical characteristics of the material that is getting more reflective the steeper the angle between the viewer and the surface itself. A perfect real life example is when you are driving on a highway and you see that the road close to the horizon is actually reflecting like a miror – you are actually looking at a Fresnel reflection. Other materials also have this property, for instance porcelain. Here is a material rendered with Fresnel reflections.

Note that you can also tweak the IOR (Index of Reflection) with the Fresnel model – the bigger the value, the sooner it reflects objects around on less steep angles.

Refraction Property

Simple refraction example using VRay

Simple refraction example using VRay

Usually refraction comes with reflection in nature, but bare in mind that these are two different things. Reflection is when a photon makes “ricochet” from the surface, and refraction means that the surface is transparent and the photons are going through the material, breaking the trajectory of light by some angle (IOR, Index of Refraction/Reflection). For this VRay material rendering example I turned on additional render settings so the light that is refracted is properly simulated. I should also have done that for the reflection, but I shall provide a glass example later that will contain both reflect and refract with additional render settings to simulate photons focused from the glass acting as lens.

The refraction has no Fresnel property, but still has an IOR factor which we can play with once we understand the basics how this works.

For rendering refraction and reflection properly using VRay materials you must check out the Caustics section of render settings, which will be further discussed in an article related to glass, refractive and reflective rendering tricks. Note the light refracted to the lower part of the sphere and to the floor.

Bump texture applied

Bump texture applied

Bump Property

The bump texture is used, as you already may know, to simulate uneven surfaces without geometry, so we get faster rendering times for details that are anyway too small to be presented with geometry. I used a simple bump texture accompanying the stone texture we used for the diffuse texture test. There is a factor associated with the bump and it defines in some relative terms how “deep” the bump should be simulated. Setting this property might differ very much depending on the texture you use.

VRay materials using bump has also a nice feature that it will do some displacement depending on the angle of view without making the surface actually come out. This feature is called parallax mapping. The feature that can actually make the bump come out from the surface is discussed in the next secion.

The bump map/texture settings are available a bit lower in the “Textures” section of the VRay material.

Displacement Property

Displacement Texture rendered with Vray

Displacement Texture rendered with Vray

There is a very handy thing you can use with VRay materials – using the previous bump texture we shall apply it as a displacement texture. No you may ask, what’s the difference? Well, VRay calculates the amount of displacement and creates an actual geometry of the surface, so the texture is displacing the surface as it would be a high polygon model. This is really helpful if you want to render a stone wall (for instance) and you are really not in the mood to create actual geometry. Even if you successfully create that geometry it will cost you a LOT of time. So, let’s check you how this looks like in an actual VRay rendering (image on the right).

Beware that the slight changes in the high map can produce a lot of extra geometry and is also quite visible. So, if you are using textures such as the example it is recommended blurring it a bit. It is also recommended to keep an eye on the rendering setup displacement Max. Subdivisions parameter which is controlling how many subdivisions are to be made to the geometry. It’s also a good idea to combine the displacement texture with the bump texture, so you get both geometry plus the small details from the bump.

Using Photorealistic VRay Materials

Now that we learned all these VRay Material properties, let’s take a step further and combine some of the material setups we used thus far. We shall render a stone material that has a displacement, and is wet. This should be the next step taken towards creating your photorealistic VRay Materials setups in the future.

Let’s digress for a moment from VRay and it’s material settings. Let’s try to think in real world parameters. The diffuse texture is simple, just apply it. The displacement is also a piece of cake (except for the renderer, it slows it down quite a bit). Now for the specularity. Wet surfaces tend to have strong specularity, so we shall put that parameter close to 1. As for the others, just leave it as default, except you need to turn on Fresnel refractions.

Combining the material properties - a wet stone

Combining the material properties - a wet stone

If you want to be a professional using VRay to render jaw-dropping scenes, you must understand that the material settings are very subtle, and it’s basically best to observe those in real life situations. With time you will develop an ability to basically “see” parameters you need to set up in VRay to have the same result – or close to it. You will always need to do test renders to see if every material is just as it should be.

OK, let’s check out our stone ball now!

Next, let us explore some more advanced and real life examples of VRay Materials, and as promised, I’ll give you examples of materials used in the first image in this post (the photorealistic rendering of a coffee cup).

Continue to: Photorealistic Rendering With VRay – Material Examples

Have fun exploring VRay materials for your ultimate photorealistic renderings!

Share and Enjoy:
  • Digg
  • StumbleUpon
  • del.icio.us

4 comments to Rendering With VRay – Materials Kickstart

Leave a Reply

 

 

 

You can use these HTML tags

<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

CommentLuv Enabled