Greetings!

Welcome to Scifi-Meshes.com! Click one of these buttons to join in on the fun.

Local TutorialBlender For The Faint Hearted - 05 - Material Basics, part 1

SphynxSphynx195 Posts: 461Member
edited April 2008 in Tutorials #1
Blending for the faint hearted - Sphynx's guide to Blending

Tutorial 5: Material Basics, part 1
It's easy to see why people would give up with Blender if all they had to go on were the official manuals. Within the first three pages of the Materials chapter, we go through angles of incidence of lightwaves, diffuse and specular reflection and (of all things), radiosity. Not the way to really start a discussion on materials for most people, let alone newcommers. The irony is, that the little helpful information in the two or three page quick start guide at the start of the manual, which is meant to be expanded upon in the full chapter, never actually materialises (most certainly, no pun intended there - it's not really funny).

In fact, throughout the entire Blender v2.3 manual chapter on Materials, there is next to nothing on the basics of using Blender materials. It tends to jump to high-brow stuff very quickly, and leaves the 'how do I get started' stuff alone.

Needless to say, that is not the way we're going to learn it here...

What's a Material?
To start off with, we really need to know the difference between a Material and a Texture. Between different 3D applications, and across various 3D forums, the term Material and Texture are used interchangeably. Indeed, you will often hear a 3D modeller talk about x{201C}and now its time to texturex{201D}, or x{201C}when I get around to texturingx{201D}. Coming from the NewTek (ie. Lightwave and Inspire) environment, I find that I am guilty of it myself. It is very important however, to distinguish between the two in Blender. They are very, very different things.

Imagine a cube (yep, we're back to cubes...). Say we want to make that cube into a dice - seems nice and logical seeing as how the shape maps perfectly.

In some ways, each side of the dice is going to be the same - the dice is all made of the same substance, and as such will reflect light in the same way. In some ways however, each side is also going to be different - each side has a different number of spots for example, and some sides may well be scratched. Chances are therefore, that we would need to treat each side differently - we would assign a different Material to each side. A Material therefore, is the total, complete appearance of one or more faces, combining all of the different factors that we wish to include in its appearance.

Once we have established what a Material will look like of course, we can re-use that material. If you have three dice in a scene, why create the same '1-spot' material each time? Instead, we would probably create a single '1-spot' material, then assign it to one side of the three different dice. If we did this, then the material would be called 'multi-user' or would be said to have '3 users' (you'll see that phrase appearing in various places in Blender documentation).

As a side note, if we created our material and did not use it, it would be said that the material had 'no users'. This is the state that I described in the first tutorials about data-blocks that are not in use (if you hadn't guessed already, we will be setting up materials as material data-blocks). If you have defined a material and it is not in use, make sure that you click the [F] button to force it to be saved if you want to keep it - otherwise, next time you load your blend file the material will have disappeared.

OK, then what's a Texture?
A texture is a much smaller component of how a material is constructed. Imagine a scratched wooden desktop that someone has cut their initials into. Let's deconstruct it.

First of all, its wood. But wood is not so simple. Very often, there are several sets of ring sizes at different angles, all interacting and having an effect on each other. Next, there is also a grain that runs through the wood, independantly of the rings, but which may also effect the appearance of the rings. All three of these together will also vary very distinctly for different types of wood. If the the wood is a desktop, then at some time it may well have been polished, so it will reflect light. Then there is the everyday use of the desk with people putting their hands on it, dropping objects it and a thousand and one other things - all of which cause scratches. Then finally, we have the initials themselves - probably indentations in the wood surface that mean that it is no longer the smooth surface that it once was.

We would probably build this material in Blender by using a series of Textures - each one being a distinct piece of the puzzle telling Blender how to construct the appearance of the desktop. We could probably have two textures defining different ring systems, and another defining the grain. We can tell Blender how each of these textures effect each other and interact. We could globally set the reflectivity and specularity (we'll look at what these are later) that comes from the polished material, but we could also define this in another texture - some parts of the wood may reflect the light differently. We could also add a texture to define those scratches, and finally we could also add a texture to define the bumps caused by the indentations of the initials. All in all, thats 6 different texture definitions - all of which combine to make the overall Material.

Like a Material however, we can also re-use Textures.

Remember our dice? We could define all of the attributes connected with what the dice is made of in a set of textures - then reuse them on each of the materials of the six sides of the dice. In fact, the only unique texture on each material, could be the image of the number of spots.

Before we begin...
Before we begin looking at materials however, there is something that we need to do - namely, set up small scene that we can render. In theory, we could setup our materials totally in the modelling environment, but they simply wouldn't give us a realistic idea of what was going on.

To start of with, follow the next little set of exercises to setup a small scene - we'll explain it all as we go.

Exercise - Starting the scene
Start a new Blender file - we want to look at everything that we need for a scene, so lets take it all back to basics. Make sure that there is nothing selected in the scene, then press [Space] to get the main menu, and select [Select] > [Select all by type] > [Mesh]. That will select all of the meshes in the scene. Hit [Del] to delete them (if there isn' anything present, [Del] will do nothing). Do the same again, but this time select [Select] > [Select all by type] > [Lamp]. Hit [Del] to delete them. You should now only have the camera in the scene.

Select the camera and press [n] to bring up the 'Transform Properties' dialog. The camera, lamps and most other things in the scene are all 'objects', so functions like this will work on all of these things as well. Use the dialog to set the position to LocX= 5, LocY= -5 (note the minus sign) and LocZ= 5, then the rotation values to RotX= 55, RotY= 0 and RotZ= 45. All of this should place the camera above and to the right but still pointing roughly towards the centre of the scene. We'll look more at moving and pointing the camera in a later tutorial.
sb005_001.jpg
For the purposes of this exercise, we are initially going to use three layers - in other words, the squares in the grid that sit in your 3D view menu-bar. We are going to use the first layer to hold the camera (which is where it already is, so we don't need to do anything else), and the second for lights. We are going to use the first layer of the second row for our objects. This is not the only way to do this - and you'll grow your own style. It just helps for this tutorial as it gives us some room to expand and look at other options later within the same scene for comparrisons.
sb005_002.jpg


Exercise - Layer shortcuts
Now a quick keyboard shortcut exercise. Press [shift+2] and take a look at your layers. Layer 2 should just have become active. Press [shift+1] and layer one should have just deactivated. Press [shift+1] again, and layer one reactivates. As you can see, they are toggles - on and off with each press. Press [shift+alt+1] and you should get the first layer of the second row become active.

The rule is [shift] plus a number (1 - 0 on the keyboard) activates a layer on the top row, [shift+alt] plus the number activates a layer on the bottom row. I prefer to use this system only to bring layers into and out of a scene however - to simply work on a layer, I still like to use the mouse as it deactivates everything else at the same time unless you use [shift] for multi-selection.
Now, the thing about using a camera to take a picture of a black object in a black room is that we're not going to see much. As such, we need a light.

Exercise - Adding a lamp
Use the mouse now to select the second layer on the top row, and we'll add a lamp. Hit [Space] and select [Add] > [Lamp] > [Sun]. Note however, what 3D view your cursor is in when you create a lamp. If you create a lamp that can point in a particular direction (like a Sun), the lamp will always point 'into' the view where it is created. Create one in top view, it will point down. Create one in front view, it will point into the distance away from you, and so on. We'd like it to point down for now, so create it when you are in the top view.
sb005_003.jpg

The lamp will now exist where you last had your cursor - probably in the very centre of the scene. We want it 'in the air' however, so we need to move it. We'll not bother dragging it this time in grab mode - we'll just position it directly. Hit [n] and change its [LocZ] value to 10.000 - if for some reason you created it at the wrong angle, just change all of the Rot values to 0 to get it point straight down again. While Blender's units of measure are not directly specified, we'll assume for the moment that 10 translates to 10 metres. While we are in the 'Transform Properties' dialog, we might as well also use it to change the name of the lamp as well - change 'OB:Lamp' to read 'OB:My Sun' in order to give it a useful name.
OK, if you can't see the new lamp, zoom out a little until you can see it, and the full length of the dotted line that is extending down from it. This dotted line is important as it indicates the total distance that light is going to reach from that lamp. Different types of lamp indicate this differently - a spot lamp for example, uses a cone as light is more confined in a spot lamp.

Click on the [Shading] menu button or press [F5]. This set of buttons is where you create materials, but the light that is emitted from a lamp is also regarded as having properies like a material, so we'll configure the lamp here as well. In this case, you'll notice that the 'sub-menu' (for want of a better word) already has the 'Lamp Buttons' icon selected for you.
sb005_004.jpg

You'll also notice that in the section labelled [Lamp] there is a drop-down menu that contains something like 'LA:Lamp'. Don't be confused by the fact the word 'Lamp' is being used again - Blender has just used that word as a default because you just created a 'Lamp'. You can change it to whatever you want. What is important to know is that, yet again, this is the name of a data-block that contains all of the lamp configuration.

You therefore now have a Sun called 'My Sun', and all of its configuration (such as it currently is) is stored in a data-block called 'Lamp'. (Let's do ourselves a favour - change that name to 'My Sun Data' now to avoid confusion). This data-block however, as always, can be used elsewhere - we could create a second sun for example, and attach this data-block to it. To change the configuration of both lamps at the same time therefore, we only need to change one of them - they would both be using the same configuration.

Now, take a look at the button that is marked [Dist:20.000]. Now take a look at the dotted line that we talked about earlier. See some sort of relation between 20.000 and the grid? You should do - that [Dist:20.000] button is what you use to define how far the light will reach, but we'll leave it at 20.000 for now. We'll go through all of this in much more detail when we talk specifically about lighting. For now, this is all we really need to do with lighting our scene.

Now we need to add an object.

Exercise - Adding the cube
Well, you should know how to do this by now - but before you do it, remember which layer you are on! Switch to the first layer in the second row and add a primitive cube.
If you create an object on the wrong layer, or you otherwise want to move an object to another layer for another reason, select the object and press [m] (for move). A small dialog appears mimicking the layer-grid. Choose the layer that you want it to go to and hit [OK] and the object to be sent to that layer.
Right, now let's take a look at what we have. Click all three layers (using [shift]) so that they are all activated - with all three activated, you should see the camera, a cube and the lamp at the same time. If you have a camera view window open, you should also be seeing (in wireframe at present) what the camera is seeing - a cube, three-quarters on. If you can't, temporarily put your 3D view into camera mode ([numpad 0]) and take a look.

Now let's render it up - hit [F12], or use [Render Current Frame] in the [Render] menu and we have... ugh? A grey diamond - no cube. What happened?
sb005_005.jpg

OK, so I misled you a little. We're not finished with lighting. Take a new look at the render window - what are you seeing? Think of a dark room with a dim light above - what you are seeing is the top of the cube, dimly lit. It would seem, that we need more light. Turn up the light! If you are not there already, select your lamp and hit [F5] to switch to the [Shading] menu. See that button called [Energy]? Turn it up to 10 and hit [F12] again, and instead of a grey diamond, we get a... white diamond...hmm.

OK, don't panic. This is deliberate. I have dealt with this now, as it is a common mistake. This may be an extreme example, but it proves a point. If you try to use one single lamp to light a scene and need more light, all that is going to happen is that the scene is going to become more harsh - not better lit. In real life, light comes from everywhere at the same time. It may sound like this discussion should be in our Lighting tutorial, but it is important for materials as well - you will only know if you are getting your materials correct if you can see them properly.

In Blender, we could just create a 'World' so that we could set up some environmental conditions in the form of ambient light - that light which originally came from the Sun, but which has now bounced off so many objects that there is now no definite place that it is coming from. It just seems to come from everywhere at the same time. But we want to leave 'Worlds' to a later tutorial, so we'll set up a very basic three-point lighting rig. It will not be the best, but it will show off what we want to see in our materials tutorial. We'll not go into details of why it works for now - just follow the instructions and have some trust.

Exercise - Creating a basic 3-lamp rig
First, lets undo our mistake and take the [Energy] of that lamp back down to 1. Next, on this same page of buttons change the lamp from [Sun] to [Spot], change the name of the data-block to 'Camera Lamp Data' and change the [Dist] to 30. Press [n] to call up its settings and change the position to LocX=10, LocY=-10 and LocZ=10; its rotation to RotX=55, RotY=0 and RotZ=45; and it's name to 'Camera Lamp'. This will place our first lamp above and behind our camera and will provide the general front-on lighting for our cube. Your could try an [F12], but it won't show much - the best lighting rigs are made from several dimmer lamps working together, not one single bright lamp.
sb005_006.jpg sb005_007.jpg

Next, add a new spot lamp to the scene in the same lights-layer, and if its not already displayed press [n] again to call up the 'Transform Dialog'. For this lamp, change the location to LocX=-10, LocY=10 and LocZ=10; it's rotation to RotX=55, RotY=0 and RotZ=225; and change it's name to 'Back Lamp'. Press [F5] to go into the [Shaders] menu and change the LA data-block name to 'Back Lamp Data' and its [Dist] to 30. This lamp provides some back light so that we can see some of the material effects that we want to see.

Finally, add a new spot lamp to the scene in the same lights-later and press [n] again. For this lamp, change the location to LocX=10, LocY=10 and LocZ=10; its rotation to RotX=55, RotY=0 and RotZ=135; and its name to 'Side Lamp'. Press [F5] for the p[Shaders] menu and change its data-block name to 'Side Lamp Data' and its [Dist] to 30.
sb005_008.jpg

Press [F12] and you should see a pretty well lit grey cube.
We'll only do one more thing with the scene and then get back to materials properly. All we have for now is a cube sitting in space. Let's make things a little more comfortable to the eyes (and the brain).

Exercise - Creating the ground
Select only the layer with your cube in it so that the camera and lamp disappear, then select the cube. Hit [n] and use the dialog to change LocZ to 1. This will sit the cube on the 'ground'. Saying that, we should really add a ground plane as well.

Objects always get created flat-on to the 3D view that you are in, so lets not complicate matters. If you are not already in it, switch to top view, then hit [Space]. Add a primitive mesh plane and it should get created flat on the ground. It may not be easy to see however, as it will be in the same place as the cube. Hit [Tab] to switch back to object mode, then [n] if the 'Transform Dialog' is not around any more. Use the dialog to change SizX and SizY of the plane to both being 4 (remember that your plane is not 4 units wide - geometrically, it' still only 1, but doing this has 'scaled' it to 4 times as big as it really is). You now have a grey box sitting in a grey plane.
sb005_009.jpg
Hit [F12], and you should see a much better lit scene, with some shadows thrown in as well. This is not the best lighting setup (far from it...) but it should do us sufficiently to take a look at materials. If you want to see you scene at any time, remember to activate all three of your layers. If you don't the camera is just going to be seeing... nothing. There is nothing else in the camera's layer except itself.

If you are using a big monitor, and you think that the render window is a little small to see, you can increase the size of the render by switching to the [Scene] buttons (or hit [F10]) and changing the size in the [Format] section. Personally, I think that the button marked [PC] is a good option, as this gives a nice traditional 640x480 resolution. Also check the [Render] section on this same page however - you'll see some buttons marked 100%, 75%, 50% and 25%. These modify the selected resolution before rendering in order to increase speed if you just want a quick check - if you want the full 640x480 pixel window, make sure that you select 100%.

On this same page, you will also find a button marked [Shadow]. If for some reason, you do not have shadows appearing in your render, make sure that this toggle button is selected. If it is not, Blender will not calculate any shadows for you at all.

Right - onto materials properly, but before we do anything else, lets save out Blender file. Save the file as 'Tutorial5_00.blend' in a place that you can find it again - we'll be using it for various material exercises later.

Attaching a material to an object
Follow the next little exercise to attach a material to your cube.
Post edited by Sphynx on

Posts

  • SphynxSphynx195 Posts: 461Member
    Exercise - Attaching a material to an object
    Select your cube - you don't need to turn off the other layers as we'll be specifically configuring the cube itself. As long as it is the only thing pink, we're safe.

    Press [F5] or otherwise switch to the [Shader] page of buttons. You'll see this time that Blender has automatically selected the [Material Buttons] instead of the [Lamp Butons], as denoted by the small 'red ball' icon. At present, you should be able to see a button marked [ME:Cube], two buttons marked [OB] and [ME], and a final button marked [0 Mat 0]. This latter button is in the same format that we've talked about before - it means that we are looking material 0 of a total of 0 materials. Pretty logical as we've not actually created any yet. Above these buttons, you'll see a button marked [Add New].

    First of all, lets attach a material in what I consider 'the bad way', for want of a better description. It has its uses, but it's just that little bit more limiting which is why I personally never use it. Select the button marked [OB] and that first button we described will change to [OB:Cube].
    sb005_010.jpg

    Next, select [Add New]. This has an immediate effect - the words [Add New] switch to the word [Material], and a whole host of new buttons appear. It is these buttons that allow us to configure the material. Let's also get into a habit however - that new word [Material] is what Blender has cause our new material to be called. Logical, but not very informative. Change it now to 'Cube Material'. You'll be seeing a pattern by now as well - each of those data-blocks are prefixed by a few characters indicating what type of data-block it is. In this case, it's 'MA' for material. This is a pretty useful feature that helps you from getting confused about where you are in Blender and what type of data-block that you are using.

    You'll see a button in the [Material] section called [Col]. Select this, and it will place the three colour sliders to it's right into 'colour' mode. In other words, we can use these three sliders to select the Red, Green and Blue components of the material colour in the same way that we could do in any art application. You'll see at the bottom of this section a button marked [RGB]. Selecting [HSV] or [DYN] will place these sliders into alternative colour selection modes - unless you know what you are doing however, stick to RGB.

    Change the sliders to read R=0.25, G=0.25 and B=1.0 to give us a mid-blue. The box to the left of the [Col] button will change to reflect the new colour. We could also have just clicked this colour box - do it now. A colour-selector will appear that will allow us to select the colour directly. Press [Escape] to get rid of it. We are not going to use it this time. In future, if you do select your colours this way press [Return] to accept the new colour selected.

    OK, press [F12] to take a look at your render. You now a have a cube with a single blue material added.
    Now that was not exactly difficult, was it? To be honest, at this level, attaching basic coloured materials is not hard at all. The problems are not adding materials, but understanding the concepts of how to build all of the components that go into complex, realistic materials. We'll try to look at these as we go and de-mystify them a little.

    Before anything else however, let's examine why I said that I did not like this method. You'll notice that before adding the material, I had you select the [OB] button. The indicator also changed to read [OB:Cube].

    What you have effectively done is to attach a material to a mesh - which is exactly what we said that we were going to do in the first place. What we have explicity done however, is to to attach it directly to the mesh. There is nothing wrong with this, and it does not limit us - we can still attach up to 16 different materials to the object; we can still assign those materials to different parts of the object; If we want to re-use those materials, they are all still globally available and can therefore be attached to other meshes in the same way. So what's bad about it?

    In reality, not much. My best guess is that you could always attach your materials in this way, and never see any limitation to what you are doing. For future expandability however, there is a (slightly) better way of doing it. We'll take a look at that next, but first, we've added a material so lets fnd out how to get rid of it.

    Exercise - Getting rid of the material
    Select the thick, black cross next to the name of our material. When your mouse hovers over it, the tool-tip that appears reads 'Deletes link to this datablock' and not 'Deletes material'. Why?
    sb005_011.jpg

    Well, since you clicked it, the buttons have all flipped back to the way that they were before and the material selection button now reads [Add New] again, which gives the impression that the material has gone. But it hasn't.

    Click the up-down arrows next to the [Add New] button and it will display a drop-down list of available materials. Guess what - there is our material, still sitting in the list. What you have actually done is delete the link between this object and the material, and not the material itself. You should see a '0' next to the material - this is a warning. It essentially means 'see this data-block? It exists, but nobody is using it'. Sounds pretty obvious, but it is really a warning regarding something that I've pointed out a few times already. If we save and reload our file, that data-block is going to disappear. In this case its fine - we can just ignore it. We may no longer want it, and next time we load our Blender file it is going to disappear anyway.

    The slightly better way to attach materials
    The (slightly) better way to attach a material to an object, is via an intermediary. All this really is, is another data-block that sits between the object and the material that you want to attach. This sounds a waste of time and energy, but it can be quite useful.

    The reason that it is useful, is that in the same way that we have previously discussed, data-blocks can be reused.

    First we would create some textures and add them to a material. We can reuse those textures in different materials, but if we wanted exactly the same appearance, we would just reuse the material itself.

    In the same way, we could created our materials and attach them to an object. We can reused those materials in different objects, but it means that we have to attach them all to the new object separately. By attaching them to an intermediary, it means that we can attach all of those materials to a new object in one go. All we then need to do is to assign them to the correct faces. This does not sound like to much of a saving, but if you are using all 16 materials possible in one link, it saves a lot of time in hunting them all down and attaching them in the same way as the first object.

    The heirarchy of the two methods, with their data-block name prefixes are:
    Texture (TEX) > Material (MA) > Object (OB)

    or
    Texture (TEX) > Material (MA) > Material Entity (ME) > Object (OB)

    So how do we do attach a material to an ME data-block instead of an object? Isn't this just more work for something I may never need? In fact, no. Which is why it is a better method. There is so little extra work to this, that it is also the default way in which Blender operates.

    Exercise - Attaching a material to an ME
    In actual fact, attaching a material to an object via an ME is just as easy as attaching it directly to the object itself.
    sb005_012.jpg

    If it's not already selected, select your cube and go into the [Shader] page (or press [F5]). This time, make sure that the button marked [ME] is selected - which it normally will be by default, so you are actually going to be doing less work than before.

    To add a material, either click the [Add New] button to create a new material, or as our old material is still around, click the up-down arrow to display the material list and select it again. If you have created a new material, give it a logical name and make it blue again, as before.

    Make sure that all three of our layers are selected and hit [F12] to render the scene. As you can see, there is no difference whatsoever in what you are seeing in comparrison to our last render. In fact, the only differences are internal - how we added the materials, instead of what we added.

    Just so we can play with some effects, select the ground plane and add a material to that as well. Just leave it with all of the default settings for now.

    An overview of the [Materials] section
    There is of course, a lot more to materials that just changing their colour - a lot more. We will deal with textures in the next tutorial, but for now, lets have a look at the other ways in which we can modify the basic material that we have added - we don't really need to add any textures just to see a plain, coloured cube and the effects that these buttons will have on it.

    I would suggest at this point, that you save your Blender scene down as Tutorial5_01.blend. For each feature that we look at, we'll change some of the values and render the scene to take a look at the effect. If you want to keep the scene, save it down again with the next number (02, 03 etc), then reload the 01 scene file to get back to basics before we look at something new.

    Preview
    On the far left of the [Shaders] menu, you will also see a larger square area displaying the current appearance of the material. This area is called the preview area and contains the sample of the material; three buttons allowing you to change the shape of the object that the material is being mapped to in the preview; a single button that allows us to modify the background on which the material is being previewed; and two buttons allowing us to turn on and off the lamps that are lighting up out preview.
    sb005_013.jpg

    As you modify values, take a look at this preview area change to reflect you settings - it can be a good way of seeing things go wrong before you comitt yourself to a render.

    Col (Colour)
    As we've already seen, the colour button, in conjunction with the RGB slider and accompanying colour swatch, allows us to modify the base colour of the material. Unlike other applications that have a habit of working in Hexadecimal (00-FF) or the equivalent decimal range (0-255), Blender's settings invariably work in the range of 0.000 to 1.000. Theoretically therefore, there can be 1000x1000x1000 (1,000,000,000) distinct combinations.
    sb005_014.jpg

    Exercise - Selecting the material colour
    Play around with the different ways of selecting colour and try a few renders. Become comfortable with setting the colour of the material and in the use of the sliders. When you are finished, save your work if you want to, and reload your Tutorial5_01.blend file for the next exercise.

    Spe (Specularity)
    By selecting the [Spe], we can use the sliders to set the colour of the specularity. Specularity is the amount of distinct 'shine' that comes off a material - not, as some people confuse this aspect of materials with, general reflectivity. Reflectivity and Specularity are two very different things. Think of an otherwise 'dull' object rather than a shiny one, but with a single point of bright, distinct light reflecting off one edge directly into your eyes - this single point of light is an example of specularity.
    sb005_015.jpg

    While this [Spe] allows you to set the colour of the specularity, three buttons in the next button panel allow you to configure its shape and intensity. You should find a drop-down menu that is currently labelled [CookTorr] - this is the default algorithm that is being used to generate the specularity and is probably the one that you will use most of all. [CookTorr] has two settings next to it that you can change, marked [Spec] and [Hard]. [Spec] modifies the intensity of the specularity, while [Hard] allows you state whether the specularity will be sharp and well defined (but smaller), or more blurred and soft (but larger).

    [Phong] uses the same settings as [CookToor], but [Blinn] introduces one more setting - the Index of refraction. It is logical therefore, that [Blinn] is geared towards transparent objects that will refract light as it passes through the material. [Toon] is a special shader that produces 'cartoon' style shading - it has three settings that you can modify. The [Spec] and [Size] settings are pretty much the same as [Spec] and [Hard], though in this case the difference between the 'sharp' and 'blurred' is not to obvious, hence the name change to just 'size'. Finally the [Smooth] setting indicates how much the specularity is 'smoothed' over the material as a whole - the smaller the value, the sharper the specularity while the larger the value, the more scattered over the material.
    sb005_016.jpg

    Exercise - Selecting the specularity
    Play around with the specularity of your material and see how the different settings change the way that light is bounced off your material to form specular highlights. Also try changing the algorithm that is in use to generate those highlights and see how they change the appearnce of the object. You won't see much change in some - but some will be very different.

    When you are finished, save your work if you want to, and reload your Tutorial5_01.blend file for the next exercise.

    Mir (Mirror)
    The [Mir] button allows you to control the colour of light reflected from the material. If you come from another 3D application, you may be more familiar with this setting being called the 'reflectivity' colour.
    sb005_017.jpg

    The amount of reflected is specified using two buttons in the next panel, just above those of the specularity buttons that we looked at above. First, there is a drop-down menu that allows you to select the algorithm that will generate the reflected light - byt default, this is set to [Lambert]. Next to this is a single slider marked [Ref] which allows you to select the actual intensity. The lower the value, the less light is reflected back off the object. In actual fact, at present you probably won't see much difference in the higher values as it is not this button in isolation that you use to set up mirrored surfaces. You will however, see a big difference if you drop the [Ref] setting down to nothing - the material will reflect no light and will therefore render up as just a grey shape in the scene.

    The [Oren-Nayar] algorithm introduced one more slider marked [Rough]. This sets the 'roughness' of the material for this algorithm to generate its its reflection of light. Finally, we also have a [Toon] algorithm. As with the specularity 'toon' shader, we have our two new settings [Size] and [Smooth].

    The big difference that you will see between the other algorithms (usually called 'Shaders' in this context) and 'toon' is that the edges between colour changes will not be so gradual - there will be sharper, more sudden changes in colour and intensity. The reason for this is simple - the toon shaders are intended to simulate 'cartoons' where there is a much smaller colour palette, and colours are generally more evenly applied without detailed shading.

    Exercise - Selecting the mirror and reflectivity
    Play around with the mirror colour and reflectivity of your material and see how the different settings change the way that light is bounced off your material to form specular highlights.

    When you are finished, save your work if you want to, and reload your Tutorial5_01.blend file for the next exercise.

    Amb (Ambient)
    The Ambient button is the level to which the general, ambient lighting is applied to the material. Changing this level will allow the material to gain a more natural or 'softer' tone, but it's best to leave it alone until we look at Worlds and the concept of ambient lighting in more detail.

    Emit
    The Emit button allows you to tell the material to emit light. The difference between this and a normal lamp, is that the light emitted from a material in this manner does not fall on other faces and therefore does contribute to the general lighting of the scene.
    sb005_018.jpg

    Exercise - Emitting light
    Play around with the Emit setting and see what effect it has to the cube when you render itThe cube will 'light up' but if you look closely at the surroundings, the general lighting of the scene does not change. This can be useful when you want to make a material appear as if it is a light source - even if your light sources are really setup to come from traditional lamps.

    When you are finished, save your work if you want to, and reload your Tutorial5_01.blend file for the next exercise.

    A (Alpha)
    The Alpha button is used by Blender to calculate the transparency of the material. A low Alpha value makes the material transparent, while a high Alpha value makes the material solid. The default for materials when they are created, is therefore 1. Needless to say, that the Alpha button is important when creating glass-like materials.
    sb005_019.jpg

    Exercise - Changing the Alpha
    Play around with the Alpha setting and see what effect it has to the cube when you render it - it may not be quite what you expect. In the current scene, you may actually just see the cube darken and loose definition. Usually, the Alpha setting is used in conjunction with others to get the transparency effects that you would expect.

    When you are finished, save your work if you want to, and reload your Tutorial5_01.blend file for the next exercise.

    Some of the other important buttons connected with transparency are under the next section of buttons. Currently, this section will be displaying [Shaders] and the buttons that we looked at in connection with Specularity and Reflectivity. Beneath this however, is a second page labelled [Mirror Transparency] - select it now.

    Blender does not make any assumptions as to what you want to display in regards to transparency. Many newcommers to 3D, and many who are experienced, do not recognise the fact that the effects of transparency do not come from making an object transparent. Do this by itself, and all you get is what we saw above - our cube got dark, but didn't really look transparent. It is more important to note that what the human brain thinks of as transparency is judged more on 'the other things' that our eyes can see through the transparent object. We need to tell Blender therefore, to start displaying faces on the other side of the transparent object as well - that way our dumb brains will start to make more sense of the image. We'll come back to the rest of the settings on this page however, in the next tutorial.
    sb005_020.jpg

    Exercise - Making an object transparent
    Play around with the Alpha value again, but this time toggle the button marked [Ztransp] so that Blender Z-buffers transparent faces and displays what lies behind them. The [Ray Transp] button essentially does the same thing, but you won't see any effect from it as, as the name suggests, it only works during ray-tracing. These two buttons are therefore mutually exclusive. For now, just stick to and experiment with the [Ztransp] button and Alpha.

    When you are finished, save your work if you want to, and reload your Tutorial5_01.blend file for the next exercise.

    Translusency
    The translusency button (back on the [Shaders] page, rather than the [Mirror Transparency] page) allows us to further modify how the transparent material is displayed. This button allows us to modify how much shading takes place on the back sides of the transparent faces. This can therefore make the object appear more or less dense, amongst other effects.

    Exercise - Experimenting with Translusency
    Repeat your transparency exercise, but this time modify the Translusency setting as well - take a look at how the 'inside' of the object is drawn at the two extremes of the Translusency setting.

    When you are finished, save your work if you want to, and reload your Tutorial5_01.blend file for the next exercise.

    Shadow, TraShad (Transparent Shadows) and Bias
    The [Shadow] button simply tells a material whether it should display shadows that fall on it. The [TraShad] button tells the material to response to transparent shadows, modified by the alpha and colour settings of the object casting the shadow.

    The [Bias] button can be ignored for now, as it only applies during ray tracing. This button is intended for use in preventing some rendering errors that can occur with some types of 'phong' algorithms.

    Exercise - Toggling shadows
    Select the ground plane object and take a look at its material. Turn off the [Shadow] toggle button and render the scene again - the shadow should disappear. Turn it back on before the next exercise.

    Traceable and Radio
    Ignore both of these for now as well. [Traceable] tells the object whether to respond to/cast shadows during ray-tracing, while [Radio] enables the material for Radiosity rendering - both of which we will look at in a later tutorial.

    Whats in Tutorial 6
    We've covered quit a bit in this tutorial - you should now be able to apply basic materials to your meshes. In Tutorial 6 we'll look at other areas of Materials, including Halos, Mirrored surfaces and more on reflection. On top of that, we will also look at assigning materials to specific parts of meshes, and not just the mesh as a whole.
Sign In or Register to comment.