In this series of Turbo Tips, we’re giving you an in-depth guide to regular V-Ray Material. We’ll cover the theory behind many of the features of the material and give you specific examples of settings and tricks to use. While the example images are from 3ds Max, the same concepts and settings can be used in V-Ray for Maya. The information covered here is generally useful in V-Ray for C4D, but the specific fields and values may be different.
The VRayMtl is the main workhorse for creating shaders in V-Ray. Eighty percent of the time, it is all you’ll need to create realistic results that also render quite fast. It is optimized to work with all other aspects of V-Ray (lights, GI, sampling, etc.), so it should always be used instead of 3ds Max native materials.
Generally, the main components of a CG shader are:
These are the names that V-Ray uses. They may have different names in different renderers, but the functions are pretty much the same.
Diffuse gives the basic color to the shader; reflection controls how the the shader reflects light; refraction controls how it lets the light through; and bump simulates a distortion of the object’s surface.
With the exception of the refraction, the other 3 components should be present in all materials.
This week, we’ll talk about the first of the main components:
The easiest way to understand Diffuse is to think of it as the color of the object. For example: what color is a tomato? Red! So, the Diffuse color of a tomato is a red color.
Adding Realism with Variation
But wait! Most objects have a multitude of colors in them. Even a tomato has a light green patch where the stem connects to the fruit. The red is not the same in all spots, so it could be more pink on the bottom and slightly greenish on the top. Most of the time, you should use an image (a Texture or a Procedural Map) to define those colors. Even objects like a blue plastic ball are not perfectly blue a couple of days or weeks after they leave the shop. Everything gets a bit dirty or faded out there in the real world.
The obvious exception to this is if you are creating shaders for studio renders of product design, where everything has to look like it just came out of the packaging box – clean, shiny, perfect. In this case, you may use solid colors as the Diffuse of your VrayMtl. Use your judgement and decide whether the material needs to be super slick for a studio render, or a bit weathered to make a believable real-world scene.
Setting Up the Diffuse (2.2 gamma Workflow)
Ok, so how do we actually set up the Diffuse?
You can either use a color, by clicking on the color swatch (green rectangle, above), or you can set up a Map by clicking on the small square next to the color swatch (orange rectangle, above). You can also scroll down to the Maps tab and assign the texture there. Most maps in V-Raywork this way (below)…
If you are working by eye and accurate colors are not required, choosing the color from the 3ds Max color picker is fast and easy. The problems start when you want to match a color from an external application like Photoshop. If you choose the same RGB value in both applications, the result will be different (if you are using proper gamma 2.2 setup in 3ds Max).
This problem comes from the Gamma correction. Essentially, the RGB values are brightened in 3ds max with the Gamma curve.
To fix it, you must use a Vray Color map in the Diffuse slot.
Set the same RGB values in the color slot and change the Gamma correction settings to “specify” and make sure it’s set at 2.2
Now, the color of the material matches perfectly with the color you took from Photoshop.
This may seem a bit complicated for just getting a simple color in 3ds Max, but currently, there is no automatic way to do this.
For realistic results, the Diffuse must use colors or textures in the range of 10~230 on the lightness scale. Most things we think of as pure white are actually ~75%-90% white (190-230). The whitest snow has only 90% albedo (reflectance rate). The same goes for blacks: only black holes absorb everything and the rest of the world reflects at least a small portion of the light. Even the darkest coal has an albedo of ~4%. Using overbright colors will not only look non-realistic, but it will also increase the render times as the light needs to be bounced around more.
The 10 to 230 range is for Photoshop textures and Vray Color gamma-corected colors. If you use the regular color picker, the range gets converted to about 1~205.
If your Texture image has brighter or darker areas, it’s easy to fix using the Levels tool in Photoshop: just move the Black point to 1 and White point to 230 as in the example image below.
Using Bitmaps and Understanding Filtering
Now let’s try using our adjusted Bitmap in the Diffuse slot.
So, here is our next problem– notice the blurry areas on our model.
This blur is caused by Texture Filtering. It is used to avoid moire artifacts on small, sharp patterns by blurring everything.
Obviously, this is not at all what we want. We want nice, crisp renders. There are a couple of ways to solve this problem.
You can reduce the blur setting in the Bitmap Coordinates tab. Something like 0.01~0.6 is usually the most useable range. (See below.)
Another option is to disable the filtering altogether in the Bitmap Parameters tab. This works just as well for making everything sharper, but is not as flexible. Most of the time we prefer reducing the Blur so we can keep at least some control over the softness of the texture.
It is very important to reduce blur or turn off filtering for all the textures you are using. Especially so with the Diffuse and Bump textures. If you do not do this, there will be parts of your render that will look ‘blurry’, not to mention loss of the fine details in textures. Keep in mind that sometimes, the results might be too sharp. In that case, slowly increase the Blur value until the render looks good.
The Diffuse tab has one more option: Roughness. It controls how ‘flat’ the shading of your object looks.
There are not a lot of materials where it is useful, but some common examples are chalk and dust. Higher values, flatter look: use your eyes to make a judgement on how much the materials need it.
Diffuse Color vs. Refraction/Reflection Color
To wrap things up on Diffuse, let’s talk about one more important point. Sometimes the Diffuse color is not obvious. This happens with materials that are identified not by their Diffuse color, but by their Reflections or Refractions.
The most common examples are metals and glass. For extremely Reflective/Refractive materials, use near black as the Diffuse color [1;1;1;]. If the material is ‘aged,’ you can increase the lightness a bit, but try to stay in dark grey area of the lightness scale. This is just a general guideline– sometimes you might need to give a bit of a color tint to a metal (or glass) to match your photo reference– but still, be start with near black and adjust it only if necessary.
To illustrate this example, here’s a gold material (below). To the left, you have an incorrect approach with yellow Diffuse and yellow Reflections, and to the right, you have a physically correct look with near black Diffuse and yellow Reflections.
Next week: V-Ray Material, Part 2: Reflection
This series of tutorials was made with our friends at Viscorbel.
If there are any topics you’d like to see in a future edition of TurboTips, let us know in the comments below, or Tweet your question to @TurboSquid with hashtag #TurboTips.