Category: Blender 3D
Published on Saturday, 26 January 2013
Blender 3D + Cycles 2.63 BASIC tutorial: UV-mapping, texturing and rendering a box (with subs)
Hi, this is a BASIC tutorial made “on demand” for a Blender user who wanted to map an image on a box in order to reproduce an antivirus box, so we are going to deal with unwrapping, uv-mapping and texturing in Blender 3D 2.63 + Cycles.
We will use World background to light up the scene too.
We are using the default cube to model the box: we have to scale it on one or more axes by pressing S followed by the letter of the axis – twice (because we want to scale on a local axis) – so for example S X X to scale on local X axis, then left mouse button to execute.
We can do the same on Y and Z, so S Y Y – mouse and S Z Z – mouse.
If we know the dimensions of the real object we can open the Transform Window by pressing N when the mouse cursor is in a 3D View and enter the values (or proportional values) in Dimensions X Y Z fields.
Ok, now let's move the Camera down (with G Z) and rotate it (for example with R X X or R Z) to frame the object (we can also use Location and Rotation in the Transform Window).
Ok, let's talk about unwrapping, uv-mapping and texturing; we will talk about the lighting later.
First of all, when uv-mapping an image on an object we have to work on 2 faces: we have to unwrap the mesh on the image (to do the uv-mapping) and we have to apply the image to the mesh as a texture for the material of the mesh.
Let's switch to UV-EDITING layout in Screen Layout and start with the first operation: unwrapping the mesh.
In the UV – Image Editor window, on the left, let's click on Image – Open Image and load from disk the image we are going to use to wrap the box.
In the 3D View window, on the right, let's set View – Camera, set Viewport Shading to Texture (to see a real time preview of the mapping), switch to Edit Mode and Face Select Mode.
Since our object has 6 faces and we have to map just 2 of them, we are going to unwrap and map the faces one by one, without a general unwrap or marking seams and so on.
Let's select the first face of the object, then press U and choose Unwrap.
In the UV – Image Editor window we can see a rectangle on the image: it is the selected face, unwrapped on the image, and we can see a preview of the final effect on the right.
We can select, grab, rotate and scale the vertices of the unwrap, on the left, as we do with the vertices of a mesh, in order to frame the image in the selected face.
So let's do this job for the first face with B, G, S and so on... then let's select, in the 3D View, another face, and do the same in the UV – Image Editor window... here we can also rotate the selection, for example with R 90 – left mouse button, and so on...
We can zoom with the mouse wheel and – by clicking on the wheel or middle mouse button – pan on the view (and we can use numpad shortcuts as we do in the 3D View, too).
Ok, we should do this job for the other faces but I'm not doing this because we can't see them!
Let's switch back to DEFAULT Screen Layout and Object Mode.
Let's press F12 for a quick render: the box is grey!
We have defined the UV Layer Mapping of the image, not the Image Texture!
Let's switch to Cycles Engine and, then, to Rendered Preview in the Camera 3D View to look at a low quality, real time preview.
The box selected, open the Material panel, in the Properties Window, then click on Use Nodes.
The default Shader (Diffuse with no Roughness) is OK, so click on the button close to the diffuse color box and choose Image Texture.
Let's click on Browse Image icon and select the image used for unwrapping and uv-mapping.
In Cycles, the default mapping method for an image is UV Mapping, so we have to do nothing here, as we can see in the Rendered 3D View.
Ok, let's talk about lighting and rendering: select the default Lamp object and... delete it!
Let's open the World panel, in the Properties Window, Use Nodes and change the colour to white, then tweak the Strength parameter to light up the scene.
Before pressing F12 to render, let's open the Render panel and check Film – Transparent and PNG – RGBA to get an image with a transparent (world) background: this will allow us to edit easily the image with a photo editing or a desktop publishing software.
Ok, let's set x and y resolution, render samples... and press F12 to render, then save the result.
We can render many objects for a catalog, a leaflet, and so on... I have to say that if you want to render a glossy object you should use a HDR background image, but this is another topic and maybe we will talk about it another time...
That's all, I hope you liked it!