Textures in Blender

Exclusive offer: get 50% off this eBook here
Blender 3D Architecture, Buildings, and Scenery

Blender 3D Architecture, Buildings, and Scenery — Save 50%

Create photorealistic 3D architectural visualizations of buildings, interiors, and environmental scenery

$26.99    $13.50
by Allan Brito | January 2009 | Open Source Web Graphics & Video

In this article by Allan Brito, we will learn how to use textures to give our materials more realism. The biggest problem of working with textures is actually finding or creating a good texture. That's why, its highly recommended that you start as soon as possible to create your own texture library. Textures are mostly image files, which represent certain kinds of surfaces such as wood or stone. They work like wallpaper, which we can place on a surface or object. For instance, if we place an image of wood on a plane, it will give the impression that the plane is made of wood. That's the main principle of using textures. We will make an object look like something in the real world using a texture. For some projects, we may need a special kind of texture, which won't be found in a common library. So we will have to take a picture ourselves, or buy an image from someone. But don't worry, because often we deal with common surfaces that have common textures too.

Procedural Textures vs. Bitmap Textures

Blender has basically two types of textures, which are procedural textures and bitmap textures. Each one has both positive and negative points. Which one is the best will depend on your project needs.

  • Procedural: This kind of texture is generated by the software at rendering time, just like vector lines. This means that it won't depend on any type of image file. The best thing about this type of texture is that it is resolution independent, so we can set the texture to be rendered with high resolutions with minimum loss of quality. The negative point about this kind of texture is that it's harder to get realistic textures with it.
  • Bitmap: To use this kind of texture, we will need an image file, such as a JPEG, PNG, or TGA file. The good thing about these textures is that we can achieve very realistic materials with it quickly. On the other hand, we must find the texture file before using it. And there is more. If you are creating a high resolution render, the texture file must be big.

Texture Library

Do you remember the way we organized materials? We can do exactly the same thing about textures. Besides setting names and storing the Blender files to import and use again later, collecting bitmap textures is another important point. Even if you don't start right away, it's important to know where to look for textures. So here is a small list of websites that provides free texture download.

Applying Textures

To use a texture, we must apply a material to an object, and then use the texture with this material. We always use the texture inside a material. For instance, to make a plane that simulates a marble floor, we have to use a texture and set up how the surface will react to light and texture, which can give the surface a proper look of marble using any texture. To do that, we must use the texture panel, which is located right next to the materials button. We can use a keyboard shortcut to open this panel: just hit F6.

Textures in Blender

There is a way to add a texture in the material panel as well, with a menu called Texture.

The best way to get all the options is to add the texture on the texture panel. On this panel, we will be able to see a lot of buttons, which represent the texture channels. Each one of these channels can hold a texture. The final texture will be a mix of all the channels. If we have a texture at channel 1 and another texture at channel 2, these textures will be blended and represented in the material.

Before adding a new texture, we must select a channel by clicking over one of them. Usually the first channel is selected, but if you want to use another one, just click on the channel. When the channel is selected, just click the Add New button to add a new texture.

Textures in Blender

The texture controls are very similar to the material controls. We can set a name for the texture at the top, or erase it if we don't want it anymore. With the selector, we can choose a previously created texture too—just click and select.

Textures in Blender

Now comes the fun part. Having added a texture, we have to choose a texture type. To do that, we click on the texture type combo box.

Textures in Blender

There are a lot of textures, but most of them are procedural textures and we won't use them much. The only texture type that isn't procedural is the image type.

We can use textures like Clouds and Wood to create some effects and give surfaces a more complex look, or even create a grass texture with some dirt on it. But most times, the texture type that we will be using will be the Image type.

Each texture has its own set of parameters to determine how it will look in the object. If we add a Wood texture, it will show the configuration parameters at the right.

Textures in Blender

If we choose as texture type Clouds, the parameters showed at the right will be completely different.

With the image texture type it's not different, this kind of texture has its own type of setup. This is the control panel:

Textures in Blender

To show how to set up a texture, let's use an image file that represents a wood floor and a plane. We can apply the texture to this plane and set up how it's going to look, testing all the parameters.

Textures in Blender

The first thing to do is assign a material to the plane, and add a texture to this material. We choose as texture type the Image option. It will show the configuration options for this kind of texture.

To apply the image as a texture to the plane, just click on the Load button, situated on the Image menu. When we hit this button, we will be able to select the image file.

Textures in Blender

Locate the image file and the texture will be applied. If we want to have more control over how this texture is organized and placed on the plane, we need to learn how the controls work. Every time you make any changes to the setup of a texture, these changes will be shown in the preview window; use it a lot to make good changes.

Here is a list of what some of the buttons can do for the texture:

  • UseAlpha: If the texture has an alpha channel, we have to press this button for Blender calculate the channel. An image has an alpha channel when some kind of transparency is stored in the image. For instance, a .png file with transparent background has an alpha channel. We can use this to create a texture with a logo, for a bottle, or to add an image of a tree or person to a plane.
  • Rot90: With this option we can rotate the texture by 90 degrees.
  • Repeat: Every texture must be distributed on the object surface, and repeating the texture in lines and columns is the default way to do that.
  • Extended: If this button is pressed, the texture will be adjusted to fit all the object surface area.
  • Clip: With this option, the texture will be cropped and we will be able to show only a part of it. To adjust which parts of the texture will be displayed, use the Min/Max X/Y options.
  • Xrepeat / Yrepeat: This option determines how many times a texture is repeated, with the repeat option turned on.
  • Normal Map: If the texture will be used to create Normal Maps, press this button. These are textures used to change the face normals of an object.
  • Still: With this button selected, we can determine that the image used as texture is a still image. This option is marked by default.
  • Movie: If you have to use a movie file as texture, press this button. This is very useful if we need to make something like a theatre projection screen or a tv screen.
  • Sequence: We can use a sequence of images as texture too; just press this button. It works the same ways as with a movie file.

There are a few more parameters, like the Reload button. If your texture file suffers any kind of change, we must press this button for the changes get accepted by Blender. The X button can erase this texture; use it if you need to select another image file.

When we add a texture to any material, an external link is created with this file. This link can be absolute or relative. When we add a texture called "wood.png", which is located at the root of your main hard disk, like C:, a link to this texture will be created like this: "c:wood.png", so every time you open this file, the software will look for that file at that exact place. This is an absolute link, but we can use a relative link as well. For instance, when we add a texture located in the same folder as our scene, a relative link will be created.

Every time we use an absolute link and we have to move the ".blend" file to another computer, the texture file must go with it. To imbue the image file with the .blend, just press the icon of gift package.

Textures in Blender

To save all the textures used in a scene, just access the file menu and use the Pack Data option. It will make all the texture files embedded with the source blend file.

Mapping

Every time we add a texture to any object, we must choose a mapping type to set up how the texture will be applied to the object. For instance, if we have a wall and apply a wood texture, it must be placed like wallpaper. But for cylindrical or spherical objects, or even walls, we have to set up in a way that makes the texture adaptable to the topology of the surface, to avoid effects such as a stretched texture.

To set this up, we use the mapping options, which are located on the Map Input menu.

Textures in Blender

On this menu, we can choose between four basic mapping types which are Cube, Sphere, Flat, and Tube. If you have a wall, choose the option that matches the topology type with the model. In this case, the best choice is the Cube.

Another important option here is the UV button, which allows us to use another very powerful type of texturing, based on UV Mapping.

Normal Map

This is a special and useful type of texture, that can change the normals of surfaces. If we have a floor and a texture of ceramic tiles, the surface can be represented with smaller details of that tiling, using this kind of a map. It's almost like modeling the tiles. But everything is created using just a normal map.

Textures in Blender

To use this kind of texture, we must turn on the Nor button on the Map To menu. When this button is turned on, we can set up the Nor slider to determine the intensity of the normal displacement.

It works based on the pixel color of the texture. With white pixels, the normals are not affected, and with black pixels, the normals are fully translated. If you want to optimize the normal mapping, using a special texture is much recommended. Some texture libraries even have this type of normal maps ready for use. They can be called bump maps too.

Here is an example of how we can use them. We take a stone texture and a tiled texture with a white background and black lines.

Textures in Blender

The stone texture is applied to the floor, and the tiled texture is used to create a tiling for the floor. The setup for that is really simple. Just apply the texture at a lower channel, and turn off the Col button for this channel. Turn on the Nor button, and this texture will affect only the normals and not the material color. Any image can be used as a normal map, but we will always get better results with a greyscale image prepared to be used as a normal map. Now, just set up the Nor intensity with the slider, and see the render.

Textures in Blender

Textures in Blender

Turn on positive and turn on negative
Some of the buttons on the Map To menu can be turned on with positive and negative values. For instance, the Nor option can be turned on with one click. If we click on it again, the Nor text will turn yellow. This means that the Nor is inverted with negative values. Some other buttons may present the same option.

Blender 3D Architecture, Buildings, and Scenery Create photorealistic 3D architectural visualizations of buildings, interiors, and environmental scenery
Published: May 2008
eBook Price: $26.99
Book Price: $44.99
See more
Select your format and quantity:

UV Mapping

For some models, just placing an image at a surface is not enough. We have to take more control over all textures, and even create a more personalized texture for a model. With UV Mapping, we can create a texture image that fits exactly with all the surfaces of a model, with the possibility to add details, such as dirt and small imperfections to the texture image. Some of the painting of a texture can be done in Blender.

This kind of editing has to be done outside Blender, with painting software such as Gimp or Photoshop. Once this editing is created, we have to just apply the new texture again to the model.

What do we have to do to create a texture like this? The process for using this kind of texture is simple, although the task can demand a bit of editing. We must mark the model with some cutting lines called seams.

Let's see how it works with a wall. The first step is to select the model and change the work mode to UV Image Editing.

Textures in Blender

Change the selection mode to edge, and select a few edges. Press the CTRL+E shortcut, and choose the Add Seam option. With this, we will mark the cutting for the model. What's the best edge to mark? Well here, we will have to use a bit of imagination.

Textures in Blender

To choose the best edges, we must imagine the best places to mark and unfold the model. When the seams are marked, open a new window, and change the window type to UV/Image Editing.

Textures in Blender

When this new window is opened, press the U button. It will call the unwrap function and create a flat layout with the unfolded model. Sometimes this operation requires a lot of testing and adjustment to produce a good result. But with the right seams, it will produce a nice and good flat image with all surfaces.

Now, we have to export this layout as an image. To do that, we use a very good script called "Save UV Face Layout...". Just access the UV menu in the UV/Image Editing window and choose Scripts | Save UV Face Layout....

It will call a small menu, with the options for this script.

Textures in Blender

To set up the layout, we must change the following parameters:

  • Size: Here, we can set up the size of the image. Always use a big value to create high-resolution textures. Use 1024, 2048, or bigger.
  • Wire: The layout will be saved with the wires from all faces. This option will determine the width of these wires.
  • Object: With this button turned on, the object name will be used for the file name.
  • All Faces: This button sets up the script to export all faces, and not just the selected ones.
  • Edit: With this button turned on, an image editing software is opened right after the layout is exported.

After editing the layout, we can apply the layout as a texture. But we must turn on the UV button at the Map Input menu. It will make the material look for a UV Mapping image to be shown.

Textures in Blender

Now, all we have to do is press F12 to render the image, and the texture will be applied to the object.

Unwrapping Scripts

The operation of creating a UV Mapping can be very annoying for some people, because we have to imagine the unfolded model to mark the seams. To help us in this task, there are a few Scripts to automatically create the seams and unfold the model. One of them is projected especially for architectural models.

The name of this script is ArchiMap UV Projection Unwrapper, and it's very easy to use. Just open a new window and choose a UV/Image Editor as the window type. Then, with the UV menu, choose the Scripts option and call the script.

Textures in Blender

The Angle Limit will determine how the faces will be unfolded. Bigger angles will generate layouts with grouped faces, and smaller angles will create layouts with more islands. The selected faces button makes the script unfold only the selected faces or all faces.

The Stretch to Boun button, makes the layout fit the UV layout. The Bleed Margin determines a limit for the UV layout to grow outside the limits of the window. And with Fill Quality, we can set up the overall quality of the filling for the faces, if the Fill Holes button is pressed.

See how it works for this model:

Textures in Blender

Selecting the model and calling the script will result in the following layout.

Textures in Blender

Summary

In this article, we have learned how to use textures to give our materials more realism. There are basically two types of textures, which are procedural and bitmap. For us, the bitmap textures will be the most useful, for the creation of scenes with more realism.

Besides that, we also learned how to:

  • Choose and organize textures
  • Apply and set up a bitmap texture
  • Map a texture around a model
  • Use normal maps
  • Create UV Layouts to create more complex textures

 

If you have read this article you may be interested to view :

Blender 3D Architecture, Buildings, and Scenery Create photorealistic 3D architectural visualizations of buildings, interiors, and environmental scenery
Published: May 2008
eBook Price: $26.99
Book Price: $44.99
See more
Select your format and quantity:

About the Author :


Allan Brito is a Brazilian architect specialized in information visualization, who lives and works in Recife, Brazil. He works with Blender 3D to produce animations and still images, for visualization and instructional material. Besides his work with Blender as an artist, he also has substantial experience teaching 3D modeling, animation, and multimedia at Mauricio de Nassau College. He is an active member of the community of Blender users, writing about Blender 3D and its development for websites in Brazilian Portuguese (http://www.allanbrito.com) and English (http://www.blendernation.com). Blender 3D Architecture, Buildings, and Scenery is his second book about Blender 3D; the first one was Blender 3D—Guia do Usuário, which was published in Brazil. It's a guide on how to use Blender, covering from the basics to character animation. He can be reached through his website at http://www.blender3darchitect.com, where he covers the use of Blender 3D and other tools for architectural visualization.

 

Books From Packt

ImageMagick Tricks
ImageMagick Tricks

Drupal Multimedia
Drupal Multimedia

Learning VirtualDub: The complete guide to capturing, processing and encoding digital video
Learning VirtualDub: The complete guide to capturing, processing and encoding digital video

Blender 3D Architecture, Buildings, and Scenery
Blender 3D Architecture, Buildings, and Scenery

Drupal 6 Social Networking
Drupal 6 Social Networking

Joomla! Web Security
Joomla! Web Security

Drupal 6 JavaScript and jQuery: RAW
Drupal 6 JavaScript and jQuery: RAW

Drupal for Education and E-Learning
Drupal for Education and E-Learning

Your rating: None Average: 4 (3 votes)
Texture Library by
Texturelib - free texture library. Excellent quality. Conveniently categorized. Most of the images are 3264 x 2448. Free for commercial and personal use.

Post new comment

CAPTCHA
This question is for testing whether you are a human visitor and to prevent automated spam submissions.
E
w
a
i
7
L
Enter the code without spaces and pay attention to upper/lower case.
Code Download and Errata
Packt Anytime, Anywhere
Register Books
Print Upgrades
eBook Downloads
Video Support
Contact Us
Awards Voting Nominations Previous Winners
Judges Open Source CMS Hall Of Fame CMS Most Promising Open Source Project Open Source E-Commerce Applications Open Source JavaScript Library Open Source Graphics Software
Resources
Open Source CMS Hall Of Fame CMS Most Promising Open Source Project Open Source E-Commerce Applications Open Source JavaScript Library Open Source Graphics Software