Vray Materials – Part 2 – Reflection

Reflections, or specular reflections are what we see when the light is reflected back from the outermost layer of the surface.
For non-metals 99% of the time, these reflections are grayscale.

They also always have something called the Fresnel effect, which means that the strength of reflections depends on the angle of incidence. The reflections are at their weakest when the surface normals are pointing directly at the viewer (0 degree incidence angle) and they are 100% strong when the surface normals are pointing at a perpendicular angle relative to the viewer (90 degree incidence angle)

Measured data for real world objects (non-metals) defines the strength of reflections at 0 degree incidence angle to be about 2~5%. No more and no less.

This part is actually easy to do in vray, no calculations or anything. Just set the Reflection value to pure white and make sure Fresnel is on and set to the IOR value of 1.5
The frensel calculation takes care of the rest and the reflectivity at 0 degrees is exactly 4%
For liquids, lower the Fresnel IOR 1.3~1.49
If you need to boost reflections a bit increase it up to 1.6
That’s it, 90% of the shaders should just use 1.5 value.

reflect

A lot of folks take the measured reflectance values and use them incorrectly – The reflection amount combined with Fresnel makes sure that the full strength is only reached at grazing angles, The measured amount at 0 degrees is set by the IOR. You don’t have to calculate anything, just use white and adjust Fresnel IOR. Even adjusting Fresnel IOR for non liquids is non essential. It’s quite hard to tell the difference between 4% reflectance and 6% reflectance, so you probably shouldn’t even bother.

Here’s a simple test setup so you can see that it works correctly for yourself. Pure white environment, simple sphere with pure black Diffuse and pure white Reflection.
When measuring linear reflection channel values in VFB we can see they match perfectly.

test_percent

The only exception for non-metallic materials, where you might go higher with the Fresnel value is for gemstones and coated reflective glass. These can have the IOR go up to 2.4 (actual reflectance at 0 degrees up to ~17% )

The specular look of the shader is mostly controled by the Glossiness, or roughness. This value imitates microscopic imperfections of the surface and makes the reflections appear blurrier.
For pure, clean materials you don’t need to use a Reflection texture, only a Glossiness map.

It get’s a bit more complicated for dirty/layered/mixed/rough/metallic surfaces but I’ll cover that later.

The glossiness itself is worthy of our attention – there is something similar to the Fresnel effect going on in respect to the blurriness of reflections. Even relatively rough surfaces have sharp reflections at grazing angles.

Here’s a simple example photo (yes, that’s my actual phone, I’m still stuck in the last century).
As you can see the reflection becomes sharper as the viewing angle approaches parallel to the surface normals.
Try it for yourself with a relatively rough object against a brighter object.

gloss_falloff

Even things like cardboard have sharpish, strong reflections at glancing angles.

To imitate this effect, my standard practice has become using a Falloff map with a custom curve in the Glossiness slot.
The texture, if needed is used in the First color slot, while the second slot sets the upper limit for Glossiness. For most materials it should be just pure white. For rougher surfaces you should lower it to medium/light gray, as rougher surfaces never seem to reach full sharpness even at grazing angles.

gloss_fall

The falloff curve itself looks something like this. It’s not set in stone and you can tweak it a bit in either direction, I’m afraid there’s no convenient measured data to use here, so you will have to use your own judgement. The important thing is that the effect itself is present.

gloss_curve

I use this approach for all my shaders, except for perfectly smooth surfaces (float glass, water, etc)

Interestingly enough, even things like painted walls, fabrics, bricks and other surfaces that don’t ‘seem’ reflective, should have pretty strong reflections.
They should just be blurred quite a lot.
Here’s a link to an interesting article with some examples of specular reflections – http://filmicgames.com/archives/557

Overall the light is bounced more around the scene and it looks a bit brighter and more physically correct, when using reflections for all surfaces, even ones where the reflections are very blurred. The downside is longer rendertimes than with “cheat” materials (no reflections on things like plastered ceiling, or other seemingly non-reflective objects).

To make things a bit more balanced, reduce the amount of bounces on materials with blurry reflections, it could help out a bit with rendertimes, while still keeping a more physically accurate look. I’ve found that 1~2 bounces on blurry surfaces is all it takes to make a difference.

bounces

One final note about reflections – you really should be using the new GGX (GTR) BRDF for all your shaders, it gives a much more realistic rendering of the highlight areas ,especially when using falloff maps in the glossiness slot.

ggx

In the next lesson, I’ll focus on Metallic materials. They are a whole different beast and require some advanced techniques, so stay tuned!

12 thoughts on “Vray Materials – Part 2 – Reflection

  1. Nice work on all your Tutorials Visco, you are a true help to all 3D artists!

  2. Hey Austris, thanks for the tutorials. Keep up the good work! It seems that you are using the falloff map/glossiness method/hack popularised by Grant Warwick, which as far as I understand, was developed to simulate GGX BDRF before it was implemented in to V-Ray. Is this not a little bit of an unnecessary extra step now that GGX has been integrated into V-Ray 3? In your experience, can you see any real benefit from this? On the whole, while using this method, I noticed increases render times and GGX alone pretty accurately simulates a realistic BDRF. What do you think?
    Best wishes,

    Matt Cooke

    • *somehow my original comment disappeared

      Hi Matt,

      not exactly. Grant’s technique was meant to do 2 things at once.

      1st – simulate the multiple lobe specular (now replaced by GGX)
      2nd – make the reflections become glossier as they approach grazing angles.

      The second part is not solved by simply switching to ggx, reflection glossiness still stays constant, regardless of the viewing angle. In reality it should increase as the angle of incidence increases.

      So we can throw out the first part – multiple layers in a blend, but we still need some way to simulate the changes in glossiness. Falloff map in gloss slot works perfectly for that (it looked crappy when we only had blinn/phong, but quite good with ggx)

      So no, I don’t think this step is redundant at all :)

      Cheers,
      Austris

      • Cheers Austris, thanks for getting back to me – That’s useful to know. I still need to try this method with V-Ray 3, as I am yet to upgrade and have still been using the maya equivalent of the falloff map hack and spending the rest of my time in Unreal Engine. I was hoping that the glossiness viewing angle issue had been resolved with the ggx integration in a similar way as renderman.
        Keep the tutorials coming, as they are really helpful and I have followed many of them over the last few years.
        Best wishes,

        Matt

  3. Thanks for your tips Austris,
    You gonna open a brand new chapter in realistic vray materials. I’ll bewaiting for your new tips. However it would be great if you do some videos testing your methods in action.

    Regards,

  4. Thank you, Austris, great read.

    It would be nice, since you’ve mentioned PBR, to have some of your insight on linking maps coming from PBR software/workflow like substance painter into vray workflow.
    Cheers.

  5. Hi Austris,

    Great article.

    GGX is been implemented to VRay 3.1. However is it possible to get it for older VRay version? I can’t seem to find any information related to this.

    Kind regards,

    Eric

  6. Hi Austris,

    Thank you for all of your most excellent tutorials and posts. I have benifited greatly from many of them, including this one.

    I am still a bit uncertain regarding reflection glossiness.

    Do I understand correctly that you typically leave the reflection glossiness at 1.0 and control the amount of reflection blurr with a fall off map?

    I understand that the fall off map may use a texture in the first slot and the second slot varies from white to mid gray. Would the texture used be base d on the diffuse texture? A gray scale / bump map type veriso of th ediffuse texture or…?

    thanks again for all of your help!

    • Hi Mark,
      Yes, that’s the basic idea – leave the gloss at 1 and control it with a falloff map.
      The texture in the first slot, can be based on diffuse or not, it depends on the result you need. For example dirty, damaged surface would most likely have these dirt spots in diffuse and in glossiness map, but a surface that just has oily smudges on it would have a gloss less independent from the diffuse, and so on.
      So think about what is causing the different glossiness.

  7. Thanks for these tutorials Austris! (My comment keeps disappearing ? Third time I’m posting this. )

    What do you do with the reflect channel when dealing with rough / dirty materials ? I’m trying your reflection method out on a rooftile material but with reflect on pure white the highlights are very strong. (screenshot here: http://i.imgur.com/z2K25MT.jpg) They looks like glazed tiles which is not the look i’m after.
    I assume I have to do something with a reflection map in order to give a rough look ? I hope you can confirm or deny my assumption, otherwise great article but this is throwing me off big time. Many thanks!

    • Yes, you are spot on. Once you get out of smooth/clean material zone you need to start using some lower reflection values and dirtmaps for composite/aged shaders.
      The surface roughness actually scatters the light in different directions and some of that incoming brightness is lost. The rougher the surface, the more pronounced this effect becomes.

Leave a Reply

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