When this button is enabled, the texture works in conjunction with three other controls on this panel: the mixing dropdown which shows Mix as a default, the Col slider just below it, and
Trang 1Figure MTD.18: The Map To tab
There are lots of options in the upper set of buttons, and these determine which properties of the material the texture will affect Mousing over the buttons will bring up a tool tip that describes what each button does The most commonly used ones are Col, Nor, Spec and Alpha, which we'll look at now
Col: Color When this button is enabled, the texture works in conjunction with three other
controls on this panel: the mixing dropdown (which shows Mix as a default), the Col slider just below it, and the color picker immediately to its left As this is just the basics, leave the Mix dropdown alone (if you are familiar with mixing modes like Add, Multiply, Screen, etc from other applications, you'll find all of your favorites there.) The Col slider sets the strength of the texture's affect on the base color of the material on a simple scale - 1 is 100% strength, 0 is 0% The color picker sets the color that will be used for blending
Nor: Normal Using textures to vary the normal of a material simulates bumps and detail across the surface Use this button with the Nor slider to set how deeply the bumps appear This is commonly referred to as "bump mapping"
Trang 2Spec: Specularity A piece of metal that has dirt and corrosion on its surface will be rather shiny
in clean places, but dull in the dirty spots Using a texture to affect specularity allows you to simulate this effect The Var slider determines how much of the texture is used for specularity, from 0 to 100% It's important to note that properties like specularity (and emit, translucency, alpha, etc.) still use the settings from their main sliders in the Material Buttons as their baseline This means that if you leave the Spec slider on the Shaders tab at 1, you most likely would not see any effect from the texture Think of it this way: the Spec slider in the Shaders tab sets the lowest amount of specularity for the material, while the Var slider sets the maximum amount of specularity that will be created by the texture So, the way to show the greatest range in values of specularity would be to set the Shaders tab Spec slider to 0, while setting the Map To tab Var slider to 1
Alpha: Opacity The alpha setting works exactly the same way as the Specularity one Just a reminder, though, to think of alpha as opacity, not transparency, so everything works intuitively The greatest range of Alpha variation will be achieved by setting the Material tab "A" slider to 0 and the Texture tab Var slider to 1 Make sure to click ZTransp in the Links and Pipeline tab to get an accurate material preview and correct rendering with Alpha
Many of these buttons are not normal toggles, but three-stage toggles For example, clicking the Nor button once turns it on, while clicking it again leaves it on and turns the label yellow
Clicking once more turns it off That third state with the yellow label is a "reverse" setting It uses the texture, but backwards Under the Nor setting, what would have bumped out now bumps in, while what would have bumped in now bumps out Likewise, the Neg (Negative) button can be used to invert a texture, and due to complex technical reasons this will not always produce the same result as the third toggle state of one of the property buttons
You are not constrained to using a single property on each channel of the texture stack Careful selection and adjustment of the property buttons (say, Col, Nor, Spec and Alpha) along with their respective sliders (Col, Nor and Var) can produce complex effects within a single channel So, with ten channels to work with in the texture stack, you can produce some incredibly complex materials
We've reviewed the four main components of Blender materials (base colors, shaders,
reflection/transparency and textures), and explained the most common options relating to them There is a wealth of additional features and options within Blender's material and texture system that we did not cover, but the basics presented here will give you a good starting point to begin exploring on your own The Blender 2.3 guide and official online documentation contain
explanations for every button and switch in the Blender interface and would be a good
companion for users wishing to go beyond these basics
Trang 3Chapter 9: Materials and Textures in Blender
By Colin Litster
Blender, like any 3D design suite, is essentially a simulation program Points (vertices) are placed
in a virtual 3D space and these points are joined to form faces Faces are then lit with simulated lights, and a simulated camera is placed to look at your virtual object All this has to be done before your simulated object and world can be rendered in all its glory
Blender's Material and Texturing system provides the tools that help you simulate a surface color
or property that will turn a boring, gray plastic-looking object into something much more
interesting
Figure MTT.1: A photorealistic render from Blender
Trang 4This could be based on a photorealistic interpretation of a real material or on some artistic style, like a cartoon, or an impressionistic painting
Figure MTT.2: Line illustration render from Blender that simulates a hand drawn look
In other words, Materials and Textures offer an enormous palette of color, style, and effect that can be applied to untextured 3D objects, turning them into a truly inspiring picture or animation
Of course, this means that there is no magic button to press in Blender, or any 3D package, that will automatically produce realistic, or even good-looking, materials You have to make decisions about many settings, as well as to apply observational and artistic skills All of these choices can appear daunting to the beginning 3D artist Indeed, many artists find it difficult to move from more traditional forms of art because of the apparent need to know every aspect of a 3D tool before attempting a still image or animation Really, though, you only need to know the basics in order to get started From there, you can build on that knowledge
In this section of the book, we will show you how to quickly simulate a realistic looking material,
as well as provide a more general strategy to apply to any material situation You will also see that you can start to achieve some very good results with only a few tools
Trang 5The Material Interface
For purposes of this tutorial, you are going to use the default Material Screen provided by
Blender Start the Blender application, then use either the keyboard shortcut Ctrl-Left/Right Arrow or the Screens dropdown menu to choose the provided Materials editing screen, which looks like this:
Tip:
Blender comes pre-configured with a Materials editing
screen
Figure MTT.3: The default Materials editing screen
Approaches to Simulating a Real Material
Time to get down to creating materials in Blender For this exercise you will look at how a
relatively complex surface material can be created with just a few commands and settings Also, you'll see an approach to simulating a real material that you can use time and time again to speed
Trang 6up your production pipeline Don't worry that some commands will be glossed over and given without explanation we're doing a run-through to get you familiar with the basics In most cases, we will come back to those areas in more detail later, and in the discussion section after the chapter
The best tools you can employ in creating any material are your eyes Direct visual interpretation
of what you are trying to simulate really is the best way to start material and texture creation For that reason we will start with a surface to which all of us have fairly easy access
Figure MTT.4: A photograph of an office desk
You will start with the simple desk surface, ignoring for now the power adapter and cables
Creating the Object and Setting the Lights
Any surface, such as your desktop, either scatters the light toward your eye (this kind of light is called Diffuse), or reflects it directly (called Specular) This means you require some simulated lights to represent the light sources that exist in the real scene If you need to learn Blender's approach to lighting, you can refer to Chapter 11
Diffuse Light
Any surface, such as your desktop, has small crevices, nicks and irregularities that prevent light from reflecting perfectly, as though it were a mirror In fact, most natural surfaces have so much irregularity that they scatter any light that hits them, so the light that reaches your eye from any point on the surface may have come from almost any direction
Trang 7photograph Without doing that, you can't get a good read on how to set up your Materials
In the example there are 3 lights
Light 1 represents the outside sunlight that is coming through the window
Lights 2 & 3 are there to represent light bouncing off of the walls and the artificial light source in the room
Trang 8It is possible to set up very realistic lighting that will accurately mimic the properties of real lights, but it is often better to use quite simple setups that copy the general location and
brightness of real world lights Simple setups mean that you can easily arrange and fine-tune their effect and therefore concentrate on making a material perfect
Figure MTT.6: The desktop with the three lamps
Trang 9Figure MTT.6.render: The provided scene, rendered with no materials
If you've worked through the modeling and lighting chapters, you should be able to easily make a nice approximation of this setup For later in the tutorial, you will also need a simple model of the power supply and cables If you are just working on materials and don't feel like modeling
anything right now, you can find the file, called "materials_desktop.blend", with the models and lights preset in the "examples" folder on the included CD
An Approach to Materials
Adding a New Material
In order to begin, you need to create a new material for the plane surface Select the plane that is your desktop with RMB
Under the Links and Pipeline tab in the Material buttons is the Add New button Select this so that a new material will be created for your desktop object
Trang 10Figure MTT.7: The Links and Pipeline tab, before clicking Add New
Trang 11Figure MTT.7.clicked: The default Material
As you can see, Blender creates a default gray material for your object It's from this default that you will make modifications to turn the material into more of a wooden, desktop-like surface Don't worry about all those controls At this stage only a few of them are necessary to produce your wooden desktop
Material Base Color
One of the easiest things to do is to set up the base color of the material
Just below the preview tab you should see a Material tab with settings for the color LMB inside the gray color area just to the left of the Col button, popping up the color picker
Trang 12Figure MTT.8: Blender's color picker palette
Here you can drag across the color panels to select any color you like Try it LMB a color then confirm it by pressing the Enter key
The material will now have a diffuse color based on your choice You are also able to manipulate the R, G, and B sliders directly in the material tab or to enter values with the keyboard to
accurately obtain the color you require
That is what I want you to do now LMB on the R value (Red) so that the number there becomes highlighted for direct numeric input
! Enter 1.0 for R(ed) and press TAB to move down to the G(reen) entry
! Enter 0.837 and press TAB to move down to B(lue) entry
! Enter 0.438 and press the Enter key
I chose that color after very careful observation of the desk in the original photograph (obviously, the real desk is not black and white like the photo) When trying to determine the base color to
Trang 13use for a material, you must try to imagine what the real material would look like if illuminated evenly with a balanced white light
Tip:
Diffuse and Specular colors are set on the Material tab
Even though you've defined the basic color of the material, you haven't told Blender anything about how this material reacts to light Is it shiny, like wet rock, or does it have a soft, extremely diffuse appearance, like pool table felt?
Blender implements both Diffuse and Specular shader models under the Shaders tab of the
Material buttons
Figure MTT.9: The Shaders tab
The Lambert model is one of several available for Diffuse shading and the CookTorr is one of a series of Specular models Later you will learn about the others but for now we are going to stick with the defaults In fact, the default specular model settings of Spec 0.50 and Hard of 50 are fine for your desk surface
Trang 14Tip:
Diffuse and Specular shaders are chosen on the Shaders
tab
Variation Across the Material Surface
Almost no surface has a totally uniform color, shininess, or flatness In fact, variation across a material surface is the single most important thing that will transform a dull and obviously computer-generated material into an authentic surface representation, or at least a more
interesting one Observation of the desk surface reveals that apart from the wood grain there are some subtle and random variations in color across the surface You therefore need a similar random texture to give color variation to your shading model
In order to simulate these variations it's necessary to add textures to your material
Textures
Blender offers the ability to apply up to 10 texture layers within a standard Blender material Each texture layer offers a huge range of possibilities to help modify your material For this reason, things can appear a little daunting when beginning to work with textures We will be covering the details of textures in the discussion section So for now, just follow along with the suggestions and see what happens
! Switch the buttons view window to Textures (F6 or LMB the textures icon)
! LMB on the Add New button
Trang 15Figure MTT.10: The Textures tab, before adding any textures
Trang 16Figure MTT.10.clicked: The same tab after clicking "Add New"
A new texture is created in the first slot with a default name Currently there is no texture type assigned so the preview is blank
! Click the Texture Type button, where it says None, to display a list of available textures, and from the list, select "Clouds"
The Preview tab gives an indication of what the texture looks like This one, as its name suggests, looks sort of cloud-like
Trang 17Figure MTT.11: The Texture tab and Preview tabs with a preview of the Cloud texture type
! Change the Noise Size to 0.158 and the Noise Depth to 3
! Switch back to Material buttons (F5 or LMB the materials icon)
Tip:
Textures provide variation to a material
As soon as a material has a texture attached, a lot of new options appear We will be dealing with most of these later, but for now you only need to worry about three things:
! How will the texture be projected ("mapped" is the proper CG term) onto the surface?
! What will be the size and orientation of that projection?
! And how will the texture interact with the underlying material?
Mapping