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!

Introduction:

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!

 

Advertisements

Actions

Information

3 responses

5 11 2011
Veku

Would be happy for the part 2.

30 11 2011
lilmac024

Veku,

Sorry. It will be coming within the week, I promise! I have already begun planning on the next 2-3 posts also, so please stay tuned!

18 12 2013
VRAY MATERIAL BASIC – 2 | berita dan informasi arsitektur

[…] ) Vray-material-tutorial-part-1/ […]

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s




%d bloggers like this: