61
  Modeling
  Wings3d
 
Making a barrel
 

This tutorial was on the wiki pages of the Aw-Europe universe, but the a few years ago, the website has been stopped. The original tutorial for the barrel was written in dutch. This is another tutorial about how to put a texture upon a mesh (=object without texture).

*1* Making the cylinder

Start Wings3d and we see the Geometry-window (=title of this window) and we right-click in the middle of the screen and we choose Cylinder. Now you will have a cylinder with standard sizes and with 16 faces on the side. Now we will make the cylinder a little bit longer : type "b" (body mode ) and we select the entire cylinder with is completely coloured in red now.

Then we right-click in the screen and we choose : Scale Axis. On the next window we choose Y. (=for the Y-axis) , and we press the TAB-key and in this tab-window en we put 130% .
If you don't use the TAB-key , then you need to determine the height with your mouse, or you press the CTRL-key , and then the height will increase each time (with each CTRL) with 10% .
Now deselect with the spacebar : the cylinder has again a grey colour.
*2* Texturing the faces on the side
Now we will give a texture to the side faces of the cyliner. Type "x" or "z" to see the cylinder from the side (x-axis or z-axis). Now draw a rectangular selection for alle side faces : you can do this by pressing the leftmousebutton and continue pressing while you draw a rectangle by grabbing your mouse above all the side faces. Finally you loose the mousebutton and you will see that all the red side faces are selected in red (but not the upper and bottom face of the cylinder) : on the objectinfo line you will see : 16 faces selected, and you see also 16 green help lines.
No we right-click in the middle of the screen and choose at the bottom of this list that appears : More - UVmapping. Now there will appear a new window : AutoUVSegmenting: cylinder1, where you see again the cylinder but without the upper face and bottom face, so only the sides faces you had selected in red.
             
Now press "e" ( edges) and select 1 vertical line (randomly) of this cylinder, so that you have 1 vertical red line. Now right-click and choose "Mark edges for Cut". (= this means : The texture that we will put on this cylinder, will start and end on this line). Now we right-click again , and we choose "Continue" , and there appear a new window and choose here "Unfolding" , and now there appears a new window : AutoUV:cylinder1.
This AutoUV-window consists of a pattern of coloured characters , and a part that has been covered by a red selection. This red zone is equal to the selected faces of the Geometry-window. And when you look now at the AutoUVSegmenting-window and also the Geometry-window, you will also see the coloured pattern of the characters under the red selection.
Now we close the AutoUV-window (with the cross in the corner of that window) and we continue in the Geometry-window. We deselect with the spacebar en we see the coloured pattern at the side of the cylinder.If you want to view the cylinder from another corner, type "r" (reset view) , or use the ALT+leftmousebutton and then grab with your mouse and look around the object. With the arrow keys you can look higher or lower upon the object.
*3* Texturing the lower and upper face
Press "f" (faces) and we select the upper face of the cylindern and then we press the ALT+leftmousebutton and grab with the mouse to see the bottom side of the cylinder, and we select the bottom face as well.
Now we right-click in the screen and we choose for : "More" "UVmapping" and the AutoUVsegmenting-window appears , and now we only see the upper and bottom face, because we have only selected those faces in the Geometry-window.
This time we are going to select nothing and we right-click and choose "Continue" en on the next screen we choose "Projection Normal".
Now the AutoUV-window appears, this time with 2 red circles and the coloured background. We close this AutoUV-window and we return into the Geometry-window. Press upon the space bar to deselect, and now we see that the cylinder is entirely covered with coloured characters. Now we are ready to put the texture upon the cylinder.
We are going to save this models first, before we continue : File - Save as : barrel -->(barrel.wings)

             
*4* Adding the texture
We are going first to the Outliner-window, this window you can get by choosing in the menu : Window - Outliner.And in this Outliner-window we can see auvBG and cylinder1_auv : these are the AutoUV textures that we have just made for the cylinder.
uvbarrel2.jpg -> This is the texture that we are goint to use , and as you can see , this textures is for the sides and also for the upper and bottom part. And we are going to wrap only 1 texture upon the entire cylinder.
So you can download this texture here (right-click upon this picture and save it on your computer) : uvbarrel2.jpg. We import the texture in Wings3d : File > Import Image and we select uvbarrel2.jpg .

 

uvbarrel2.jpg
We can see now that the texture uvbarrel2.jpg has been added to the Outliner. The symbols in the outliner with 2 white and 2 black square are textures, the symbols with M are materials. The barrel hat we have made has the name "Cylinder1_auv". Click upon the texturename "uvbarrel2" , select with the leftmousebutton and keep pressing the mousebutton and grab this texturename to the material name "Cylinder1_auv" and then you loose the mousebutton. . You will see a small window, and here you choose "Diffuse". And we see in the Geometry-window that the cylinder has got the texture uvbarrel2. But we also see that the texture isn't placed correctly : the upper face must have another texture.

             
To change this, we will select again the entire object : "b" (body) , en we select the object. Then right-click on the screen , and choose here in the list below "UV Mapping" (or :"More" - "UV Mapping"). And the AutoUV-window will open , and we see that the red circles are not positioned correctly. The upper red circle is equal to the bottom side of the barrel and needs to be moved to the right , whereas the lower red circle need to have the texture where you see now the upper red circle.
 
Now we deselect the lower red circle and the red rectangle,just by clicking on it, so that finally only the upper red circle is selected. Now we move the circle to the other side , and there are several ways to do it : Or you press the mousebutton and drag the circle to the right side and then loose the mousebutton. Or you right-click and choose "Move", "Horizontal" TAB "0.5" and enter. Or right-clcik "Move" "Horizontal" and then grab with your mouse and end with the leftmousebutton.
Now we select the 2nd circle (below) ,and we deselect the other circle. And we move this circle upwards : right-click "Move" and then choose "Vertical" , TAB , and "0.5" and the circle is at the right spot.
         
Now we still need to do the side , because we see that the red selection does not cover entirely the texture of the barrel. So we need to bring the red rectangle a little bit higher , up to the edges of the circles. So we continue working in the AutoUV-window.
Select the red rectangle (=the side face of the barrel ) and select the 2 red circles, so that only the rectangle is selected in red . Now right-click and choose "Scale" , "Vertical" , TAB and type 120 . The red rectangle is now hight , but is still a bit too low. The red rectangle is even a bit outside the AutoUV-window : if we move it up , then it will fit perfectly.
We right-click again and choose "Move" , "Vertical" , TAB and we type 0.04 . The red rectangle is now on the right spot. We can close now the AutoUV-window and we are now again in the Geometry-window, where we press upon the spacebar to deselect everthting, and we see the final result. And we save this file.
     
*5* Scaling and positioning the object
But we are not ready yet : the cylinder has been created witth the standard size of 2 meters heigth, and we have even enlarged the cylinder to make it longer. Now we are going to measure the height of this barrel . Type "e" (edges ) and select 1 upper edge and 1 bottom edge of the barrel . Now look at the objectinfoline (above the screen below the icons) ,and you will see that the distance is 2.6 meter. Normally, a barrel is ±80cm high, so if we calculate, we have to reduce this model to 30% of its size. And if you look at the side of the barrel using ALT+leftmousebutton and grab with the mouse to look around, then we see that the barrel isn't positioned on the ground (of the grid).
We will scale first : type "b" (body) and select the entire object. Then we right-click and choose "Scale uniform" , then press the TAB-key and type 30 % .
Now to position the object on the ground : choose above in the menu : "Tools"and then "Put on ground". Now we deselect with the space bar in order to see the result. Finally we click upon the "smooth shading" -button (2nd icon at the right above), and we press "r" (start view postion) and we can zoom in and zoom out with the mousewheel : we are going to save this model and it is ready to be exported.
                 
One remark : as you can see upon the texture, the barrel has also 2 thicker lines, but which we haven't modeled : the texture itself needs to fulfil that funciton, because in an online 3d world, it is important that you dont go too much into detail , otherwise you would easily have too many polygons, which will lead to a lower speed in your world , and a lower frames-per-second rate. If you press "b" (body) and select his model , then you will see upon the objectinfo line : 18 polygons, 48 edges, 32 vertices : so this is a very good model.
 
*6* Export the model to .obj (Wavefront)
We first need to reduce the model 10 times, because in Accutrans the model wil become 10x larger. Press "b" (body) and select the entire object and we right-click and choose "Scale Uniform" , then TAB and we type: 10 % . Now we zoom in with the mousewheel and we see that the object isn't on the ground anymore due to the scaling. Press "b" (body) and select the object. Then go to the menu and choose : Tools - Put on ground. And we will finally save this file : barrel (barrel.wings)
Now we export this file in Wavefront (obj) : File - Export - Wavefront (obj.). Now we also have the file: barrel.obj
What is the difference between Export and Export Selected ? If you got a modeling scene with several objects, then you can select 1 object and export this object only . If you choose Export Selected, then you always need to select something (1 or more objects) first , otherwhise you have an empty file.
*7* Accutrans : converting into .rwx (RenderWare)
Now we open Accutrans and we load barrel.obj ,and we see the model again . We are going to save this immediately as barrel.rwx : File - Save As : barrel (Renderware.rwx).
 
*8* Putting the object in your objectpath
Search on your computer for the file barrel.rwx. Then you right-click upon this file and you choose : "Copy to.." and then "Zipped map" and then you have also the zipped file : barrel.zip.
In total we have 4 files of the barrel that we have made : barrel.wings, barrel.obj , barrel.rwx and barrel.zip.
This zip-file (barrel.zip) will be used to upload with your FTP-program and then you put this in the models map of your objectpath. After that, you also put the texture file uvbarrel2.jpg in the textures map of your objectpath .And now you can test and view this model in your 3d-world of activeworlds.