Vray Dome Light Tutorial via Chaos Group

15 02 2012

So because I have been a bit behind on my promise to upload the tutorial about the new features to Vray for Rhino v.1.5, I thought I’d cheat it a bit and point you in the direction of a video done by the Chaos Group, describing the dome light.
Dome Light Tutorial

Hope this tides everyone over for a day or two…


Vray Materials Part 5 – Emissive

28 01 2012

Ok, so I just finished my Architectural Registration Exam study session, my wife is out for a while, and I’ve got a few hours before I’m meeting my sister and her boyfriend for dinner, (for those keeping track of my day)…let’s see if we can finish up the last material layer…Emissive Materials.

Emissive Layer:

The emissive layer is the final tutorial on the various layers for Vray.  An emissive layer allows the material to emit light.  These types of material can be used to create effects such as a neon sign, a glowing lamp shade, or a tv/computer screen.

I will bring up a few things to keep in mind when using a material that uses an emissive layer.

  1. These materials will increase render times, possibly to extreme amounts
  2. Do not use these materials as the sole lighting for a scene.


Now let’s jump right into it!  First we’ll create a new material (which I’ll cleverly name “Emissive Material”).  There are a lot less parameters than the previous two layers, and luckily, they are all fairly straight forward.  First I’ll render the scene that I’ve been using previously with a default material.

Now let’s create an emissive layer and look at the default parameters.

…and we’ll apply it and render

Now to better show the emissive quality, I’m going to turn off the lights and the environmental light, leaving the material as the only thing in the scene emitting light (I know, I know I told you never to do this in Rule 2 above, but take a look and you can see why never to do this).

Notice the “Splotchy-ness” and uneven lighting quality around the objects?  That’s because our render settings are fairly low for the amount of light that is needed to calculate.  Essentially, we need more light or to increase our light in the scene?  The increase of render settings will increase our rendering time (potentially substantially i.e 10-100 times)  As a result, it’s suggested for best results, let’s use a light in the scene and only use emissive materials for the glowing that they’re meant for.

Notice the Splotchy-ness (Note you may have to view enlarged full scale image)

For the sake of working correctly, and speed, I’ll turn the lights back on and turn them all down to .125 on the multiplier and then turn the environment on and turn it down to .1 on the multiplier.  Render again and see the splotches have pretty much gone away  (there’s still some, but not to the extent previously.  I could tweak settings to make them completely disappear but don’t have the time nor patience right now, you get the idea).

Turning the lights and environmental lighting on, but low multiplier

It’s important to remember that the changes that we make in the Emissive layer will effect the light emitted from the material, not the underlying color itself.  While these two work in conjunction with each other, there is an important and distinct difference especially when working with lower emiited lighting materials.  I’ll change the Color parameter to a red color and re-render.

Emitting Red Colored Light

Now I can hear you from the depths of the internet looking at that last image and questioning my credibility right now.  “Matt you said it wouldn’t change the color of the object, but the light.”  Well that’s true, but think about it this way…the light is being emitted from the material so especially when the amount of light being emitted is fairly high in relation to the existing light in the scene, you’ll get a larger influence than if it’s a lower amount of light being emitted.  Also, it doesn’t help that our underlying diffuse color is something light, in this case white, and our light is emitting a very saturated color like this red.  So we’ll turn the lighting Intensity down.  In this case, I’ll turn it down to 0.1 for a dramatic difference.  Let’s re-render and see what we get.

Turn the Intensity down to 0.1

I can tell, even less confidence in the last few hours you’ve spent listening and reading through my blog, huh?  Well the light being emitted from the material certainly is less.  The amount of red “glow” that we were getting is non-existent (0.1 was intentionally used as it’s WAY too low).  There’s one last parameter in the emissive layer that we still need to talk about.  The “Transparency” parameter!  This one is what controls the transparency of the light emitted from the material.  You have no reason to trust me, so let’s test it out together.  First thing first, I’ll change the diffuse color to something obnoxious (cyan usually does the trick), ensuring that my transparency map color is set to 100% black.

Change diffuse color

Now I’ll set the Emissive transparancy to Light Grey (230-230-230) and increase the Intensity back to .5 and re-render.

All the sudden, we can see the objects are no longer red, but instead have some of the cyan showing through with the light still glowing a bit of red.  Increase the Intensity to 1 and still see a muted red color on the objects, with stronger red lighting around the edges.

And for good measure let’s change the diffuse color to a Yellow.  Leaving everything else the same.

Change Diffuse Color to Yellow

You’ll notice there is a lot that affects the output color, the color of the light, the transparency of the light, the intensity of the light and underlying diffuse color.  The relationship of color values and saturation between the diffuse and light color also has an impact on the output as you can see.

When, Where, and How to use Emissive Materials

The next thing we’ll look at is when and how to use this in your work flow.  Let’s take a look at an interior scene that I’ve showed before and we’ll get back to in the next tutorial.  I have used an emissive material in two places throughout this scene.  Can you find them?

Spot the Emissive Materials?

If you said the TV screen and the light bulbs on the wall sconces, you’d be correct.  You’d also be able to remember that I mentioned that about 1000 words ago at the beginning of this post, so congrats on either or both accounts.  How and why did I do this?

Let’s take a look at the TV screen first.  If you sit in a dark room, turn on a tv, or open your laptop.  Then move to the side of the object or better, move behind it if possible.  You’ll notice that it sends a massive amount of light out projecting from the screen.  This should seem fairly obvious when take the time to think about it.  That is EXACTLY how tvs work, LED TVs, LCD Monitors, etc.  they are all Light Emitting (I.E. the “L” and the “E” of LED).  Now turn the lights on and look from the same views.  Even during the daylight and with the lights on in the room you can still see the light being emitted from the TV or Monitor.

With that being said, let’s look at how to make that material.  First thing I do is take a screen shot (if doing a CPU monitor {make sure you don’t have anything embarrassing on the screen when you do that}) or google your favorite tv station or program and search through google images until you find something that you want to put on the TV screen.  Save the image.  In this case, I used the following image.

Who can get upset or offended by Anderson Cooper?

I created a new material, named it, and added an emissive layer.  I immediately added the .jpg as a map to the Diffuse Color and the Emissive Color maps.  I adjusted the diffuse transparency color to 100% white.  Adjust the Emissive Transparancy color to Light Grey (230-230-230).  Render.  Adjustments will need to be made to the Emissive Intensity according to the scene.  For my scene, I ended up at an Intensity of 20.0.  Previously I’ve been anywhere between 5 and 100.  It’s unfortunately a trial an error process but it’s also a judgement call on the digital artist’s part.  Remember after all you are an artist, not just a render monkey!

If you’re having trouble with getting the image to look the way you want it to, check out the UVW mapping tutorial.


Now onto the light bulb.   Look at the wireframe image of the lamp.

Wireframe of Lamp - Notice Rectangular light

As you can see, I have a rectangular light (the golden colored rectangle) that fits inside the lamp.  Because I want the light to go both up and down, I simple click on the check box that makes this light double sided.  See the Lighting Tutorial for more info)  Because I wanted the lamp shade to be something semi-transparent (a linen in this case) I knew that you would see the actual light bulb and thus wanted to give it an emissive material to give the effect of slowing through the linen.  However, (back to rule #2, I didn’t use the emissive material as the light source to light the scene, hence the rectangular light).  I then created a new emissive material that I applied to the light bulb.  When I got my linen set the way I wanted to, I was able to see the glow from the bulb through the translucent shade.  To adjust the color of your light to the actual color temperature of your particular light, use this website that translates color temperature into color pixel RGB values.  It’s a quick way to add a good amount of realism to your scene!

Final Lamp with rectangular light and emissive material


Coming up next: Putting it all together: Tips and Tricks

Vray Materials Part 4 – Refractions

18 01 2012

For those who aren’t keeping up, I have gone through a brief explanation of the differences between reflection and refraction in my previous post.  But to review, refraction is the visual distortion that occurs as a result of a transparent or translucent material having some level of density to it.  The light waves are deflected or change angle between the top surface of the material and the back surface.  As a result, any object that you apply a material with a refraction layer to MUST have a thickness.  Otherwise, the computer will try to calculate this difference, but be unable to (think of it as dividing by 0) and freak out, resulting in a black output.  As a side note, you will notice that adding a reflection layer and/or a refraction layer will cause an increase in render time because of the increase in computing the machine is asked to do.  It now must not only calculate the lighting and material, but also the way in which the light/materials reflect or refract and what will be seen as a result.  It’s just something that needs to be kept in mind, especially when working with large scenes, tight deadlines, slow machines, and impatient clients/bosses.


Refraction is often found in conjunction with reflective surfaces, think of a window that you can both see through and has a reflection, so it is most likely the case that you will add both a reflection layer and a refraction layer to your material.  I’m going to start by simply adding those two layers to a brand new material I’ll call “Refraction layer”.

When I apply that material to the scene, I find that our initial rendering shows the highly reflective material, but no refraction.

Let’s remember that in order to see the refraction, we are seeing through the material.  How do we see through a material?  The  diffuse transparency!  Right now, it’s showing as black which makes the object 100% opaque.  Let’s change this to white, making it 100% transparent and there we go!

It’s important to make sure that you change the transparency color on the diffuse layer, not on the refraction layer.  We want the overall object to appear transparent, not the amount of refraction.  I will be sure to explain this further later in this tutorial.  Looking at our rendering we can see that these objects, specifically the sphere are beginning to show a bit of distortion and look very glass like.  To accentuate this, I’m going to change the floor material to a check board pattern and re-render.

With the new rendering we can better see how the materials both reflect the light (which is why the pyramid to the left is all white…it’s reflecting the direct light at a harsh angle) and refract the light.  Now that we understand what these features are and how they work and are applied to materials, let’s look at how to better control the features of the refraction layer.


The IOR as it deals with refraction will increase the amount of distortion in the material as the IOR increases.  It’s important to keep in mind that the IOR for refraction and reflection are different, however for the most accurate results they should be the same.  A few good values to keep in mind according to the Rhino Manual:

Vacuum = 1.0          Air = 1.00029          Alcohol=1.329          Ice=1.309

Water=1.33          Glass=1.517 (I like to use 1.42)          Crystal=2.0          Diamond=2.417

 For a full list of IOR listing, check out http://en.wikipedia.org/wiki/List_of_refractive_indices

Below I have borrowed a matrix created by Chia Fu Chiang and Damien Alomar that shows an incremental increase in IOR and the amount of distortion.

Matrix part of Vray for Rhino Manual by Chia Fu Chiang and Damien Alomar


Similarly to the IOR, Glossiness is a  parameter in both Reflective and Refractive layers.  The difference between the two is that the Reflective Glossiness deals strictly with the amount of reflection dealing with the surface.  The refraction glossiness will have an effect on what happend inside the material, therefore having and effect on the transparency.  It’s through this parameter that the materials can appear frosted.  The refraction will become more blurry based as the Refraction Glossiness decreases.

Again, below I’m borrowing a matrix from the Vray for Rhino Manual.  The matrix below sets the IOR at 1.55 but changes the Glossiness.  It’s important to see that the transparency changes rapidly between a glossiness of 0.80 to .75.

Matrix part of Vray for Rhino Manual by Chia Fu Chiang and Damien Alomar


The Fog parameter allows you to give a refractive surface a tint of color.  This can be useful when attempting to create a tinted glass, blue, green or otherwise.

I have added a color (63-191-191) to the fog, see settings below:

Notice how the color is added to the material.  The strength of the color depends on both the thickness of the material and the fog color multiplier.

Notice that certain geometry above appears to have black refraction.  This has to do with the “Exit color” and the Abbe number of the Dispersion.  These are new parameters to VfR 2.0.  I will go over all of the new features in an upcoming tutorial.

Below is a sample of the fog multiplier color number.  From left to right the number is 0, 0.2, 0.5.  It’s clear that the higher the color multiplier, the more more the color affects the material.  As a side note, I find that for a tinted glass, a fog number between .15 and .4 generally work for the my taste.

2" thick glass - Fog Color Multiplier L to R (0, 0.2, 0.5)

General Settings


The two parameters that I’ll discuss in this tutorial is the “Affect Shadows” and “Affect Alpha” options.  The “Affect Shadows” does what the name would suggest.  It uses the color and refraction to affect the shadows being cast.  This will give the shadows a hint of the color of the glass or refractive material.  The “Affect Alpha” option also is fairly straightforward and affects the alpha channel, giving a colored tint to the alpha channel.

Affect Shadow only L to R Fog color (0, 0.2, 0.5)

Affect Alpha only L to R Fog color (0, 0.2, 0.5)

Affect Alpha + Shadow L to R Fog color (0, 0.2, 0.5)


Again, because I feel the need to be 100% honest to you, my loyal readers, I must disclose to you that I have a tough time with the Translucency parameters (and considering I haven’t been able to find anything online that really makes sense, I feel that you don’t get it either).  I think that I struggle primarily because the numbers mean absolutely nothing and as far as I can tell just are a value relative to each other.  However, in an effort to gain your faith back, I will tell you know I do know or have figured out for Translucency.  This type of material is often referred to as Sub-surface Scattering material (SSS)

Translucency will have an effect on the material, allowing light to penetrate through the material based on the thickness of the material at a given point.  As a result, this is a very helpful material type to use for wax, skin, milk, plastic, etc.

1)  Always change the IOR to 1.0

2) Change the transparency away from pure white.  Try value 80-150.

3) Uncheck Double sided material under “Options”

4) Lower the Refraction Glossiness to something under 1.0

5) Be careful that your light is properly adjusted to ensure material appears as desired.  A light that is too strong will not give the desired effect, and will appear washed out.  A light that isn’t strong enough will not properly penetrate the material’s surfaces, giving it a dark or black look.

Translucency with Value 80

Please follow back up and check out my Research section.  As I have more time and will investigate some of these parameter, I will post it there, giving us all a better understanding of the stuff I haven’t fully explained here.

Coming up next:  Lesson 5 – Emissive Layer

Vray Materials Part 3 – Reflections

5 01 2012

So, as I tend to start my posts, I must apologize for not being as timely and frequent as I’d like, but none the less here you are, so you either 1) forgive me or 2) just found this site and therefore haven’t been diappointed…yet.  🙂

Let me also say that I have downloaded the new Beta version of Vray for Rhino and therefore my User Interface may or may not look like what you have, but rest assured, the content of the tutorial is still the same.  I will try my best to clarify the reflection layer and the refraction layer, what each is used for and how they work well in combination WITHOUT getting too nerdy and stuck in the physics behind the way things work.

Reflection and Refraction:

What are they and what’s the difference?

For those, like me, who haven’t taken a physics class in a number of years, let’s review what a reflection is and how it’s different that refraction.  It’s important to remember that both reflection and refraction have to do with the way that light reacts to a material.  Reflection deals with the way that light bounces off of the material while refraction deals with the way that a material passes through a material.

I have created a small diagram below that explains how when looking at reflection, the light wave comes from the light source and makes contact with the front face of the material at a given angle.  This is known as the angle of incidence.  The light wave then bounces off the material at the exact same angle, known as the angle of reflection.  Going back to my high school physics class, the angle of incidence is equal to the angle of reflection.

Refraction on the other hand is the way that that the light wave travels through the material.  Because the material has a thickness and a density, the light wave is refracted in the thickness of the material as it bounces off of the “stuff” in the material.  The angle of the light coming out of the material isn’t the same as the angle of the light entering the material.  This difference is measured by the Index of Refraction (IOR).  This is the EXACT reason that when you put something in a pool, the object appears to bend.  The IOR of air in a vacuum is 1.0 (meaning the angle is the same coming in the material as exiting the material).  As the IOR number increases, the more refraction occurs.  To see a list of the IOR of various material, google it or check out http://en.wikipedia.org/wiki/List_of_refractive_indices.

Reflection Layer:

The reflection layer controls the amount that a material reflects the surround scene.  This goes anywhere from a mirror like surface to a much more subtle reflection off of a hand railing, glass on a table, or piece of plastic.  it is important to think of the reflection layer as dealing with simply the REFLECTIONS of that material, regardless of the transparency, etc.

To add a reflection to your material you will have to add a reflection layer to your material.  This will allow you to control many of the properties of the material’s reflection.  To do this, create a new material and rename it appropriately.  Then right click the name of the material and a new pop-up menu will give you many options.  You want to select the “Create Layer” and then “Reflection”.  When this is done, you will see under the material name you now have both a reflection layer and a diffuse layer.

Once this is done, you can click the “Preview” to update the material and see that now the material has a bit of reflectivity to it.  You are seeing the light and the checker pattern from the ground on the material.  Also, notice that on the right side, we have a Reflection layer under which there are a lot of controls that will affect the reflectivity of the material.

Applying this reflective material to the existing scene, we can give it a quick render to use as a baseline for some of the upcoming changes we will make.  Below you will see my initial render:

Reflection Map:

The first parameter that we will look at working with is the Reflection Map.  Looking at the Reflection layer, we can tell that by default a reflection map is already been placed because there is a capital letter “M” next to Reflection.

When you select this Map, you will notice that the Texture Editor opens and by default the Fresnel map is applied.  A Fresnel map varies the amount of reflection based on the viewing angle.  This is why the edges of the preview sphere seem to give the material that distortion, that we as humans come to expect from a reflective sphere.  Let’s take a look at some of the options that we can control through the texture editor.  First we’ll look at the Perpendicular and Parallel colors.  **Please note that Perpendicular and Parallel are the omenclature with the new Vray for Rhino version 2.0 Beta.  Previous versions of Vray for Rhino used the names “Fresnel Color and Refract Color”**

I’m going to use the preview sphere to test out how these changes will affect our material.  So as you can see below, by changing the Perpendicular color, the color of the reflection will change.

In a streak of honesty, I must fully disclose that I sorta understand what changing the Parallel color does, but certainly not well enough to explain how it works and affects the material as I have always left this value at black.  I have however run a similar test to that above.  See below for a test with the Parallel color at Black, and then changing it to yellow.

Now that we understand what these parameters do, we can adjust them when we are looking to get away from the mirror/chrome look and attempting to give a bit more realism to our scene by adding color to our reflections.  The last parameter that we will explore under the Fresnel map is the IOR.  This number determines how reflective a material is.  To be technical (I know I tried to avoid being all physics nerd, but bear with me) As the Fresnel IOR (Index of Refaction) gets lower, the larger an angle is needed to have the material reflect.  A higher IOR means that a smaller angle is needed to create a reflection.  What’s that mean to you??  Take a look back at our previous reflection diagram:  A higher Fresnel IOR means that at a slight angle, I can see reflections.  At a lower IOR at the same angle, I might not see the material as reflective.  As previously mentioned, you can find many websites that give a close approximation for the IOR of various materials.  Lets’ try manipulating this parameter to allow some experimentation using our previous scene:

As an aside, I know I didn’t tell you what the Refract IOR does here, but if I never change the Parallel (Refract) Color, you really think I have the foggiest clue what the Refract IOR does here??

Filter Color:

Very quickly and simply, the filter color changes the color of the overall reflection.  If I want all my reflections to appear red, I’ll change the filter color from white to red.  The amount that this color is taken on in the reflection is directly correlated to the strength of the reflections.  This is similar to how the Perpendicular Color works, but see below to see the difference between the two.

Reflection Glossiness:

The Glossiness parameters allow you to control how the reflections look as they are being reflected off of a material.  Think about some of the highly reflective materials that you have run into over the last 24 hours.  You woke up this morning and presumably brushed your teeth, spitting your toothpaste into a highly reflective porcelain sink, looking up in the highly reflective mirror to ensure your hair was perfectly in place before grabbing your stainless steel travel coffee cup before you headed out the door.  Before you made it out the door to work this morning you have already dealt with three very different levels of reflectivity that couldn’t be established with the previously discussed parameters alone.

The sink is a material that dissipates the reflection a bit because of the natural occurring scratches, dents, etc in the material.  The mirror gives seemingly accurate highly glossy reflections that nearly mimic the actual objects.

The stainless steel travel mug is a good example because it really depends on the type of mug that you have.  Mine for example is a brushed stainless, which means that it is much less glossy and doesn’t give the clear and highly articulate reflections that my wife’s, whose is closer to a mirror finish, does.

The control over the definition or articulation of a materials’s reflection due to it’s uneven nature (such as the brushes stainless) can be controlled with the Reflection Glossiness.  The amount of reflection glossiness is actually a two part equation that deals with the Highlight Glossiness number and the Reflection Glossiness number.  When these are both set at 1, the material will be mirror like.  As these numbers are reduced, the material’s reflections become much more blurry.  **Don’t reduce these numbers to below .5 because you will find HIGHLY increased render times and no sort of reflections)**

I am attaching a matrix from the Vray for Rhino Manual written by Chia Fu Chiang and Damien Alomar.  If you haven’t already, check out this manual, it’s a GREAT reference!  It can be found at the Chaosgroup website or Spot3d.com

Matrix part of Vray for Rhino Manual by Chia Fu Chiang and Damien Alomar

Coming up next:  Lesson 4 – Refraction Layer

Vray Materials – Part 2: Transparency Maps + UVW Mapping

11 12 2011

Well, I’m back from the LEED studying abyss.  So I figure it’s about time to get back to helping those of you following me with more Vray material tutorials.

Transparency Maps:

In the previous tutorial, I have shown how to create a diffuse material and even how to add a jpeg to create a brick material.  Let’s take that a step further to look at how to add a sense of transparency to our materials.

Open the material editor, in the diffuse tab, I’ve added a color again (removing the .jpeg map).  Now notice the Transparency color swatch.  This color swatch works primarily on a grayscale.  Solid black swatch = 100% opaque, Solid white swatch = 100% transparent.  Thus if we want a material to be 50% transparent, we should use a medium gray (128-128-128 on the RGB).  Click the update preview button to see the transparency of the material.

Let’s try a simple test render to see how it looks:

We can now begin to see how the material shows a sense of transparency.  This works great if we want the entire material to be a uniform transparency.  Now let’s look at if we wanted to create something like a chain link fence that doesn’t have a consistent transparency.  Just as we previously used a jpeg to create a material, we can use a gray-scaled jpeg to create a transparency map.

Let’s take a look at using this same idea to create a cut out (for example a chain linked fence).  Just as we had previously used a brick .jpeg image to show a pattern in the diffuse layer, we can also add a .jpeg image in the transparency map to create a cut out to match a certain pattern or image.  For this example, I will borrow a few maps that come standard with 3D Studio Max, so thank you to the people at Autodesk for allowing me to use these maps.  I will use a diffuse map to give me the color and pattern that I want, I will then add a gray-scale image (actually this one is just black and white) to show add the cut out.

This is the image to be used and placed in the Diffuse Layer color map slot.

One that is rendered, you should see an image similar to below:

In order to change the black background into something transparent that can be seen through, we will have to add the image below to the Transparency map under the diffuse layer.  Notice the image is black and white.  Just as when we previously used colors only to affect the transparency, white will be completely transparent, black areas will be completely opaque and the gray scale will affect the amount of transparency accordingly.

Chainlink cut out image to be placed in the transparency map under the diffuse layer

Follow the same methods as previously to add the cut out image below to the transparency map and we will get the following render.  The transparency objects are completely opposite of what we want.

The reason for this incorrect transparency actually goes back to the fact that I borrowed these images from 3dS max.  In Max transparency white is opaque, black is transparent.  In Rhino, black is opaque and white is transparent.  Since there is so many existing 3Ds max materials out there, the good people of Vray for Rhino made this transition as easy as checking a single box.   While in the material editor, when the texture editor is open, notice the “Invert” button under the preview image.  Select this when applying the Transparency map and notice the black and white areas have been inverted.

Re-Render and see what we get!

This technique can allow us a lot of flexibility that can save time both modelling and when it comes to render time.  It also allows us to place things such as trees, people, etc. in our scenes.  A future tutorial will further go in depth as to these possibilities.

Let’s now however take a second to discuss UVW mapping.  The reason this is a good time is because we have our chainlink fence that appears to be scaled too large.  We need to adjust the way in which the map (jpeg image) is applied to the plane on which the material is applied.  To do this we will adjust the UVW map of the plane.  The way to think of a UVW map is a coordinate system that is relative to the object that it’s applied onto, NOT world coordinates.  XYZ coordinates refer to the way in which an object is situated in world space, hence UVW are similar coordinates, but relate to the way the material is applied onto the object, having nothing to do with the way that the object is situated in world space.  We actually have the ability to adjust the scale, position, and rotation of the way our material appears on our geometry.  Let’s investigate how to manipulate these parameters to scale down the size of the chainlink.

Select the object that you wish to change the UVW map on.  In the Properties Palette, select the dropdown that currently says “Obejct”.  Change that to the last selection, “Texture Mapping”.

Select the “Custom” radio button and a new set of options will appear.  Take some time to familiarize yourself with these options and test them out.  I will do another tutorial later that goes more in depth with some of these options, but right now you need to understand that the “Projection” setting determines how the image is applied to your geometry.  For example, surface just applies the material to the surface of the object and then “pulls” the image through, often creating weird results if the object has any depth to the geometry.  In that case, box might be a better option.  for more information on these various projection types, look at the Vray for Rhino manual.

For now I will make the change in projection type to “Planar”.  First we will turn on a graphical representation of the image to be applied to the geometry.  Select the “Advanced UI” and then the “Show Mapping” button.  Now we can see a flat rectangle that is perpendicular to the plane.  This object is called the “gizmo” and represents the jpeg image that you are applying to the geometry.  If you rotate this object, the jpeg applied to the material will be rotated.  If you scale it up or down, the map will appear scaled up or down.

Note the Gizmo located in the center of the object, perpendicular to the geometry

We will rotate the gizmo so that is parallel to the plane.  Do do so, either select the gizmo and rotate it in 3D space or under the Rotation, change the X number to 90 (rotating it 90 degrees in the X axis.)  Now to adjust the size of the holes between the chainlink, I will change the size parameter.  Instead of the current numbers, I will change the “Size” parameters to 12 for all three (X, Y, and Z although in this case the z parameter won’t matter I just like to be consistent).  This means that the JPG we have applied is a 12″ x 12″ square.  This becomes important when working with real world scaled objects such as brick or wood flooring, etc.

Notice the gizmo size has now changed.  A re-render shows the geometry with a smaller scaled pattern of chainlink.  We can continue to adjust these numbers until we get the desired result.

A rendering with the rescaled UVW map

Remember that the UVW mapping is based per object.  If I have 4 brick walls, I will need to take the time to adjust their individual UWV maps, one adjustment won’t apply to all object with the same material.

Please come back later this week to get part 3 of this tutorial: Reflection and Refraction Layers

Vray Material Tutorial – Part 1

4 08 2011

So after a much longer than expected hiatus from the blog world, I have finally begun to break down the mystery of Vray materials for my faithful followers!  I have been excited to receive comments and questions on my previous tutorial on lighting in Vray and hope that this tutorial will promote further discussions on various techniques and uses of this very powerful render engine.

I have been asked a few times why I’m creating this line of tutorials and giving away some “trade secrets”.  The answer is quite simple.  I feel that these are not actually secrets, but instead it is my responsibility to spread the knowledge that I have gained with those who are trying to learn the program.  It wasn’t that long ago (although some days it feels like it) that I was new to the digital visualization industry.  Without the help of others, I wouldn’t be where I am today, nor would I have the skill set that I feel fortunate enough to share with others.  My honest hope is that sharing my knoweldge is as influential on others as some have been on me.

And now on to the learning!


For the purposes of this tutorial, I am using a very simplistic scene that utilizes the Vray Express Scene as a background.  This can be found if you have the “Vray Express” toolbar installed under the “Vray Express. Vray Express Studio Scenes” button.  To get to this, right click on any empty portion of the tool bar area and scroll to the proper check box and ensure that it’s checked.  A ewtoolbar should pop up and you can select the appropriate size studio scene for this tutorial.  This is a handy way to create proper lighting and ground/background plane for your scene.

I have created a few solid objects that we will use throughout this tutorial.  For illustrative purposes, I have used various shapes as the light and materials will all interact differently depending on the shapes.  For now I have created all these objects on the same layer, but we will change this soon.

Basic Scene Set Up

Material Editor:

The first step that we will take is to open the Vray Material Editor.  To do this, either select the material editor tool bar or go to the Vray drop down and select “Material Editor”.

Material Editor Selections

This will open the Material Editor as shown below.  This is the interface we will use to create, manipulate, and apply the materials that we create to objects in the scene.

As you can see, we already have a few materials in our workspace.  The Default_VRay_Material is a material that we will work with and begin to manipulate.  The Floor material is a material that was automatically created for us because we are using the Studio Scene as a background.  This material is automatically assigned to our ground/background plane.  If we wanted, we could also manipulate this (but I won’t).  Because I’m an organizational freak when it comes to my scenes, I will immediately rename this Default_Vray_Material to something that is more appropriate.  To do this, right click on the name of the material that you want to rename and select the Rename option.  Because we’re going to begin by working simply with the Diffuse layer, I will change the name to DiffuseMaterial.

Rename to DiffuseMaterial

Diffuse Layer:

We will now work with Diffuse Layer.  The best way I’ve found to think of this layer is the general color that you’d describe a material to someone.  If I were to look at an orange sphere, I wouldn’t describe it as orange, but peach at the edges…I’d simply describe it as orange.  So with that being said, let’s change the color of our material to orange!  Under the Diffuse tab, select the color swatch next to the word “Color” and select your favorite shade of orange.

Change the Diffuse Color to Orange

When you are finished click “OK”.  We will then update the preview of this material by selecting the “Update Preview” button under the preview.  Now our preview sphere is orange!

A quick test render shows that the objects in our scene haven’t changed though.

“Why is this?” you will (hopefully) ask yourself.  The answer is very simple!  You haven’t told the computer which objects this material should be assigned to!  We will do that now.  There are fundamentally two ways to assign a material to an object, on a per object basis and on a per layer basis.  For the most part, I like to assign most materials by layers.  This makes it easy for ensuring that all objects on a layer are assigned the same material.  For example, if I’m creating an exterior architectural rendering where I want ALL my exterior walls to be brick, this technique saves me time from having to select each individual wall to ensure that the material is assigned to those walls.  However, there are certain times that assigning a material on a per object basis is more advantageous.  Let’s say I’m doing an interior architectural rendering where I have 5 magazines laying on a coffee table.  I want each magazine object to be the cover of a different magazine and therefore would rather assign each magazine on a per object basis (so I don’t have to create 5 seperate layers for what is essentially the same object).  At the end of the day, the choice is yours, I only suggest you think through the ramifications of your selection of these techniques.

There are also various ways to assign a material to a layer or object.  For now, we will right click the DiffuseMaterial name and select “Apply Material to Layer(s)”.

Apply Material to Layer

This will open a dialogue box that allows you to check which layers you wish to assign that material.  For now, select the layer that you created the objects on and re-render.

This seems like as good of a place as any for me to interject with a tip that will make you question your grasp of physics, and color.  White isn’t REALLY white.  “What does that mean?  Matt have you gone mental?”, you may ask yourself.  Rest assured, I haven’t.  There are actually people who have done experiments to show that that 8.5×11 piece of white paper that you are looking at isn’t really white (atleast in the computer RGB value sense of the word).  Because of the way that materials are made, and the way that light interacts with them the white that you perceive is actually only about 90-95% (depending on who you ask) true white.  This means that you should never create anything in the diffuse color that has an RGB value of 255, instead you should take 90-95% of that number which is 230-242.  Anything over that will simply slow your renderings down because the computer is calculating extreme values that aren’t perceptible and don’t occur in real life.  Some visualization artist bring this number down to 75% (RGB value of 192).  That’s just some food for thought…back to the lesson and adding transparency!

The previous render is beginning to look good, but perhaps we want to add a bit of transparency to our objects.  It’s relatively easy.  We’ll go back to the material editor and select our DiffuseMaterial.  This time, instead of selecting the color swatch next to the “Transparency” text.

Select Transparency Color

Unlike the Diffuse Color swatch, the Transparency swatch works on a grey scale.  When this color is 100% black (RGB value 0), it’s 100% opaque.  When it’s 100% white (RGB 255…yes, it’s ok to use in cases that aren’t the diffuse color), it’s 100% transparent.  If I wanted the material to be 50% transparent, I would change the transparency swatch to be medium grey (RGB value 128).  Let’s try this and see what happens.

50 % transparent - RGB value of 128

Click ok, and update the preview.  Notice how the material appears to have some transparency, as we can partially see the checker background behind the sphere.

Preview Update

Let’s re-render our scene and see what happens…

Notice that our objects appear to have transparency and we didn’t have to re-assign the material to the layer or objects!  Depending on where you created the objects, you may notice the bottom surfaces of some objects appear to have some splotchiness (called artifacts).  The reason for this is that in the computer world those faces are sharing the exact same space as the ground plane.  If this really bothers you for these tests, move your objects up slightly (1/4″ or so) and re-render…the artifacts are magically gone!

Move objects vertically and No Artifacts!

 Using Maps:

Thus far, things have been fairly straightforward and as a result fairly easy.  We can change the color of our objects and add transparency.  Not everything in the world is simply one color however.  At times, we may want to map an existing image, onto an object to use it as our color.  Bricks are a great example of this.  Perhaps I want these objects to be bricks and I’ve got a nice image of bricks (such as the one below) that I would like these objects to be without modeling each individual brick and grout line.  Well thankfully we don’t have to waste all that time needlessly modelling.  We can use what’s called a map.

Let’s go back to the diffuse tab and change the transparency color swatch back to 100% black to make our objects completely opaque again.  Next select the lowercase “m” between the diffuse color swatch and the Transparency text.

This will bring up the Texture Editor dialogue box that will allow us to utilize the brick image as our diffuse output.  In the texture editor, change the type from “None” to “Bitmap”.  Even though we aren’t using an actual .bmp bitmap, it’s ok…in this case bitmap is used as a general term for any image type (.jpeg, .bmp, .png, etc.).  Once this is done, select the lowercase m (a lowercase m means there is no map assigned, upper case M means a map is assigned).  Navigate through the file structure to your brick (or other) image that you would like to use.

Change Type to "Bitmap" then select the Bitmap File Map button

The lowercase m is now changed to an uppercase M, showing that the map is now applied.  Select Apply to exit the Texture Editor.  Notice again that the Diffuse color map that was lowercase is now an uppercase M.  We’ll update the preview and see that the sphere now shows our brick image mapped to it!  Note: when the diffuse map is used, the diffuse color swatch no longer has any effect on the output!

A quick re-render will show that our objects now have the appearance of the brick image!

Brick Image mapped to objects

Coming soon!

In the next lessons we will discuss:

  • how to use maps to add transparency for things like a chain-lined fence or brick screen walls with holes
  • adding depths to our materials using bump maps
  • adding a reflection layer (giving our object shine or glossiness)
  • adding a refraction layer (mimicking glass, water, or other refractive materials)
  • adding emissive layers ( giving our objects a “glow” to them)
  • different material types (2 sided material, toon material, etc.)
  • importing existing vray materials (creating and organizing material libraries)
  • UVW mapping (controlling the size, scale, and projection of maps such as the brick we’ve just applied)
Look for this next tutorial by the end of the weekend!
As always, let me know if there are any questions or clarifications!


Introduction to Vray Part 1 – Lighting

28 04 2011

As it’s getting close to finals in architecture schools across the USA, I felt it was a good idea to create a small tutorial to help all those students pulling their hair out because of rendering issues.  In this tutorial, I hope to shed some light (literally) on some of the nuances to my favorite render engine.  This tutorial is based on the course that I taught while I was a student at Washington University from 2008-2010.  I have modeled this scene in Rhino and will be using VRay for Rhino, but rest assured that these are basics that translate across programs, so if you’re using VRay for Sketchup or 3ds Max, the fundamentals are the same, I simply used an existing model I created in Rhino.

I will start with an interior model, with furniture and windows.

The initial model from Rhino

The next major step is to place lights in the scene.  The reason to implement the lights before adding material is simple, with good lighting the materials will fall into their own. Once the lighting is set correctly, you will then have a realistic feeling for what the materials are doing and how they react to subtle changes.  I then add an exterior light to simulate the sun coming in from each window.  To do so, I use the sun tool that comes with Vray for Rhino.  This allows the user to have advanced control over the exact sun angle given a particular time of day and geographic location, or you can manually place the angle of the sun if specifics aren’t important.

The exact location that the sun is placed in the scene doesn’t matter at all because, like in the real world, the sun shoot an infinite number of rays in a parallel direction to each other throughout the entire scene.  It should be noted that this sunlighting system works only when using the Vray Physical Camera in the Camera settings, but I will go more in depth about this later.

The next step is to add rectangular lights at the openings to supplement the sunlight system.  This helps to create additional light as well as add a bit of realism to the scene by focusing more light at the openings, a phenomena that also occurs in nature.  To do so, create a rectangular light that is slightly larger than the opening, ensuring that the light is pointing into the room.

To manipulate the lighting settings for the rectangular lights, select the light and in the properties tab, select the roll down and change it from “Object” to “Light”.  The multiplier value for these rectangular lights will depend on a few factors (camera settings, and size of the light mostly), but a few things to keep in mind, that you should select “light portal”.  This tells the program that it is to be used to supplement the existing light from the exterior, similar to the way a light comes into a window.  We also want to ensure that the light is “invisible”, so we can see through it and see the exterior of our scene. In this case, we don’t need to have the light be double sided because we’re only interested in focusing the light’s energy to the interior of the scene.

Light Multiplier settings:

Light Multiplier Values change intensity of light source

Visible Light vs. Invisible Light Source, notice the intensity doesn’t change:

Visible Light Source vs. Invisible Light Source

One sided light source vs. double sided:

One sided vs. Double sided Light Source

Below is the settings that I used for this scene, but note that your values may need to change depending on your particular scene.

Rectangular Light Properties - careful, these are scene dependent!

To ensure that I’m not getting any material interference, I have added a neutral material to the material override in the vray option settings.  In this case I check the overrride material box under the “Global Switches” tab.

Override Material with color over 128-128-128, a medium grey

In order to allow the light to come through the openings, I must hide the windows in the Rhino model, even if we’ve added a glass material to the windows because the material override will override all materials including the glass.

This seems like a good time to do a test render, but first we must look at some of the other rendering settings in our render options.  The first tab that we should focus on is the Global Switches tab.  We want to ensure that lighting is checked, letting the program know that it needs to calculate the lighting.  We however don’t want to have the Hidden Lights boxed checked because if we hid some lights in the scene, we shouldn’t have those calculate, we just want to see the effect of the lights that are shown in our scene.  We also don’t want to select the Default Lights box because we have placed lights in our scene and want to use only the lights that we have placed and have control over.

Global Switches Tab

The next tab in our options that we should be concerned with is the Camera tab.  Because we are using the sunlight system, we should ensure that the physical camera box is selected.  If we forget to check this box, the scene will be WAY too bright because we’re not allowing the calculations to compensate for the incredible intensity from the sun.  For those who have used a digital SLR camera or a film camera should quickly recognize the controls over the physical camera.  Here you have the ability to control the camera’s shutter speed, the F-stop number, and the film speed.  These three numbers work in conjunction with each other to create how the camera compensates for the exposure of the lighting.  This may take some time to get comfortable with if you have never used a SLR camera before, but the Vray manual has a very through explanation of how each of these controls works.  It can be found at ASGVIS.com under the software and support tab.

Camera Tab

The Output tab allows a user to override the size of the image that they wish to output.  If, for example, I know that I need an image that is 1500 pixels by 800 pixels, this is the place to input that information.  It also allows a user to obtain the aspect ratio from the existing scene for easy scaling, by first selecting the “Get View Aspect”, locking the ratio, and then changing the pixel size.  This is useful if a user wants to ensure what they see on the screen is what is rendered for a given size.  If I set up my scene and like how it looks on my screen, I’ll use this technique and then tell the program that I need a maximum of (for example) 1500 pixels wide.  However if I’m simply doing test renders, the output size isn’t an issue yet.

Output Tab with ability to change rendering size

The Environment tab gives the user the ability to create the environmental lighting (not the direct sunlight, but the light from the sky) and control how it is handled in the scene.  Because we have created a sunlight system, it’s possible to link the position of the sun light to the environmental light.  By linking the two, we will get a reddish light as the sun approaches the horizon as occurs in nature, as the light comes closer to noon, the environmental light will become more blueish.  To link the sunlight position to the environmental lighting, select the little “m” next to the GI (skylight) check box.

Select the little "m" to apply a map

When this is selected, a new Map texture editor pop up will appear.  Change the type from “none” to “Sky”.

Before selecting apply, we must make sure that the program knows which light source we want the sun to be.  Select the button next to “Sun-light source”.  A new pop up menu appears and now allows us to select the sunlight we previously created.  If we leave this at “Default”, we will not create a link between the sun light and the environmental light.  Once we select the proper light, click apply, to get back to the the Vray Texture editor.  Make sure that you unselect the check box next to “Override Sun’s parameters” and finally click “apply”.

We have now created a link between the light from the environment (in this case the sky) and the sun’s position in the sky.  The next option in the environment tab is the Background.  We can follow the same process that we just went through to add a background that matches the sun’s position in the sky, or we can add a background image if we have a jpeg that we want to use as a background.  This can be helpful if we have a site photo, a stock image of a nice sky with some clouds, etc.  Since I am creating an imaginary scene, I’m going to apply the link to the sun’s position as previously mentioned following the same processes.  At the end of this process your Environment tab should look similar to that below.

Completed Environment Tab with mapped GI and Background

The next tab we’ll talk about it the Indirect Illumination tab.  First, ensure that the box under GI is turned on.  The allows the light waves to bounce off of geometry and give reflected light, ensuring that light bounces off the floor and continues to bounce and light the scene.  If this isn’t turned on, the only thing we will see in our scene is the direct light from our light sources which will cause a very harsh and yucky (yes, that’s a technical term) lighting results.  Next we get to select what types of rendering engines we will use.  These deal with the way that the program calculates how the light reacts in our scene.  Some teams way smarter than I am created various algorithms for how light reacts and that’s essentially what we will be selecting.  I won’t go into the boring details of each one right now, but I will tell you that I use the Irradiance Map (IR Map) as the primary engine and the Light Cache (LC) as the secondary engine.  I have found that these two in combination give me the best quality and the lowest render time.

Indirect Illumination tab

For test renders I use the following value under my IR Map tab, in the next tutorial I will further explain what these mean and how to control quality output:

IR Map settings

And the following are the typical LC settings I use for test renders, please note depending on the scene the subdivs can be between 100 (quicker, less accurate) and 500 for tests:

LC settings - note: subdivs can vary between 100 and 500 for tests

We can now run a quick test render to ensure that our exterior lighting is working correctly and with a short render time we get decent results.  It’s a bit grainy, but we will take care of that later.  At this point, we’re strictly focusing on the lighting.  Notice the blueish tint that we are getting on the floor close to the windows as a result of linking the environmental lighting to the sun’s position.  This is what we might expect in nature.

Test Quality Rendering - Exterior Lights Only (16.6 second render time)

We can now continue adding lights to our scene.  In the wall sconces, I prefer to add double sided rectangular lights because 1) they are faster at render time and 2) that’s the way the light actually comes out of a sconce like this, primarily from the top and bottom (yes, I know the shade will glow, but we’ll take care of that in the next lesson when we talk about materials).  Finally because there is a door opening and I want to add a bit of life to the scene, I add a rectangular light at the ceiling level of the adjacent room, giving a slight amount of light added to the room that our scene is focused on.  When all is said and done, we have the images below:

Test Quality Rendering - all lights (27 second render time)

Medium Quality Rendering - all Lights (1 min 29.3 seconds)

Come back soon to learn how to add materials to create this rendering:

Final Rendering with Materials