Attaching an Image File to an Object
by Ryan Neily

Purpose of this Tutorial:

This tutorial is meant to explain in consecutive steps exactly how to take one of your really neat 2D images you created in a program such as GIMP and attach it to an object you will create in Blender (in this case you will create a plane).

I have chosen to demonstrate using a plane as it is a simple object that will illustrate the methods involved. Once you have mastered this procedure, it is not too difficult to add objects to produce more complex final rendered images.
How to Prepare:

There are two or three tutorials that if you go through them before you attempt this one, you will have a greater understanding of what you are doing. (I know 'cause they are the tutorials that helped me do this image attachment thing :-) My tutorial "Attaching an Image File to an Object" stands on it's own, however it is written to complement the tutes listed just following.

The tutorials can be found at:

http://www.blendermania.com/tutbook/interface.php3
(this is a run through the basic Blender interface by Vincent Stoessel)

http://www.blendermania.com/tutorials/tutor/xaymaca/objects1.php3
(this is a quickstart howto with blender also by Vincent Stoessel)

http://jmsoler.free.fr/didacticiel/blender/tutor/texture_plaq.htm
(this is the subject of my tutorial, it is written in French by jean-michel soler, you may find it helpful, I did)
Ladies and Gentlemen, time to start your engines:

Open up Blender, (just move the mouse a bit and the Blender Flypage will evaporate) and you will be looking at the default window arrangement that you saw in "The basic Blender interface by Vincent Stoessel". For this tute (tutorial) we will actually start with the default square plane in the middle of your "3D window".
Note on usuage of capital letters:

I am using capital letters to denote which key on your keyboard to punch. If one should use the "SHIFT" key in conjunction with that letter key it will be designated like this: SHIFT A KEY for example, otherwise A KEY means hit just the one key, the A KEY.
Note on active window input:

Make sure your cursor is inside the window (for example the 3D window) before you feed input as the presence of the cursor makes it the active window.
Let's go!

Note: to scale, put the cursor very near an edge of the plane.

1) Hit your S KEY to scale the plane.

You will notice that by moving your mouse cursor you can control the size of the plane. Enlarge the plane until it is almost but not quite touching the camera. (The camera is that little triangle in the 3D window) Left mouse click to complete the sizing action.




We will now rotate the plane so the face of the plane is being viewed by the camera:

To put things in the perspective "of looking at the plane from the right side" go to the numpad on your keyboard.

1) Hit NUM3 and you will now be looking at the thin slice of the plane with the camera at the left of the plane.



4) Hit R KEY to rotate the plane on its axis to a vertical rather than horizontal position.

Controlling rotation of the plane:

By moving your mouse cursor in a counterclockwise direction you can control the rotation of the plane. When the plane is in a vertical position, left click your mouse to complete the rotation action.
Special Note: Counterclockwise plane rotation will result in a rightside up, front on image. Clockwise plane rotation will result in an upside down, mirror image when we get to the actual image attachment stage.

Your 3D window should now look like this.



This is a good time to save your file so that you have a starting point farther along than zero. Blender does not have an undo button. Save frequently!

To save your work:

1) Hit F2 KEY

2) On a line just above the top of the 3D window will be the name of your file. If you have not named it already then untitled.blend will show. Replace untitled with "whateverNameWorksForYou.blend" :-)

3) Click on SAVE FILE, then click on the field in the window that appears with the full file name and path.

Presto! You are back in your 3D window ready to continue!


 

The camera is how we see our work so we need to keep an eye on what is happening with the camera. This seems a good time to add lamps, one sees nothing without light so let's add some lamps :-)
Adding lamps:

1) Click on NUMPAD 7 to to get bird's eye view.

2) Left mouse click in the 3D window where you would like the first lamp to be. (NOTE that I added two lamps just behind the camera in relation to the plane) The 3D cursor (looks like a lifesaver) will go to where you have clicked.

3) Hit SPACEBAR to get your popup menu. Go ADD-->LAMP Left mouse click. You now have a lamp.

4) Hit NUMPAD 3 to put you in right side view. Put your cursor near the purple circle which is your lamp.
Activating an object:

To operate on a given object, it is necessary to activate that object by right mouse clicking with the cursor placed very near that object.

5) Hit the G KEY and by moving your mouse, move the lamp up to where you want it. Left click your mouse to complete the action. Repeat to add another lamp and put a little more light on the subject. You can experiment as you get more comfortable.
This is how your window should look:



Co-ordinating image rendering size and image size:

To make sure the image and the Blender rendering are a similar size I opened up my image file in ImageMagick to get the x and y units in pixels. Note that it helps to co-ordinate image size and object size to have a good result.

To change the x and y size on the render buttons (see image below), put your cursor on the button and hold down left mouse button moving slowly to right or left. Right and you get a larger size, left and you get a smaller size. When you are close on the low side to the number you want left mouse clicks will increment to the desired size.
Note: Change both Size X and Size Y buttons as they are not linked but are independently controlled.

The sample image we will be using happens to be 400x400 pixels so I am changing the x and y render size buttons to 475 and 475 respectively.

[Blender Render Window]
Checking the camera view:

Hitting NUMPAD 0 will put you in camera view.

Hit the Z KEY to "skin" the object and see it as an opaque grey in the camera view rather than just lines. Hit the Z KEY again to "unskin" the plane and see it again as lines.

OK, a quick look at the camera view just below shows us that the plane extends beyond the area the camera can see.





An easy way to adjust that is to move the camera farther away from the plane, exactly as a person would move farther from a building to see more of the building one was standing beside.
Moving the camera:

1) Hit NUMPAD 3 to go to side view.

2) Put your cursor near the camera and right mouse click to activate this object.

3) Hit the G KEY to move the camera, move your mouse (and the camera) away from the plane. Left mouse click to complete the action.

4) Hit NUMPAD 0, to view with the camera, adjust as required to get all of the plane inside the camera viewscape.

 

This is roughly what your 3D window should look like at this point in the tute!




Doing the deed:

1) Hit NUMPAD 1 to go to frontal view.

If the plane is not already a purple color denoting it is the active object, right mouse click near the plane to activate it.

2) Hit TAB KEY to go into EDIT MODE.

3) Hit A KEY to select all the vertices of the plane. (you will recognize them as dots)

4) Hit Material button or F5 KEY and then hit hyphen button and release your mouse button over the ADD NEW menu item.

4) Hit Texture button or F6 KEY and then hit hyphen button and ADD NEW.

5) Click on IMAGE button and this is what you should be looking at.


 


 

Loading the image:

1) Hit the LOAD IMAGE button, see picture below.



2) Follow through to the directory where you have the image file stored that you want to load as a texture attachment by clicking on the left mouse button on each proper choice as it is presented.



3) Click the left mouse button on the image you wish to use to put the file name in the proper field.

4) Right click to activate the image file.

5) Hit ENTER to load the image. This will bring you back to the 3D window. The window should look like this.



Rendering the image:

1) Hit the Display button shown below to get the "Render Controls".

2) Hit the RENDER BUTTON as shown in the image below, OR, hit the F12 KEY.




You should be looking at something like the next image!



Saving your rendered image:

1) Hit F3 KEY

2) In the window arrangement that shows make sure the top field is the correct path to the directory you will save your image file in.




3) In the next field down, fill in the chosen name of your image file. Blender saves as a TARGA file by default so at this point to keep things simple go with it. Filename.tga

4) Hit SAVE TARGA BUTTON and you are done.

Please note that the texture image (baseboxfront.jpg) I have supplied is copyrighted. I am providing it for the limited use within this tutorial.
Summary:

You can now view the image in image viewing software capable of viewing a tga file or convert the image to a jpeg file format or whatever.

There are lots of things to do yet but they go beyond the scope of this tutorial. Attaching a texture image to a more complex 3D object and setting it to different perspectives and different lighting before one renders the image will take advantage of creating in 3D.

To paraphrase "Virginia", yes we are having fun yet! Go for it!