Wednesday, February 23, 2011

Model a Hand Gun - Tutorialized



This gun is made by polygon modeling.

This is a tutorial for beginners:

For people who don't know anything about polygon-modelling or 3D Studio MAX, but want to learn how to use the most important tools fast.
There are a lot of options in 3D Studio MAX, but with the ones I'm going to show you, you will be able to make a gun, and also lots of other objects, easily.

First draw your gun, and put it on a plane. Press the "f" key (to go to the front view). Create a plane (Objects tab / plane object) by clicking once on the screen and then drag.(keep mousebutton down).
Then press "m" on your keyboard to show the Material Editor (can also be found under Rendering>Material Editor).Select an empty slot. Next to the Diffuse color is a button, click on it and select 'bitmap'. Then browse for your gun picture. Assign the material to the plane, select the plane and in the Material Editor you can find the button to assign the material to the plane.
Don't forget to put on 'Show map in Viewport' in your Material Editor.
The plane must be the same size as the picture. So look up your picture size and put it in the plane's Parameters. To find out the size: view the image in the Material Editor (under Bitmap Parameters).Then right click on the picture. The Plane's Parameters are found under the "Modify" tab on the right of your screen.


Now we are going to freeze the plane, so we can't select it during modeling.

In the Display tab (near the Modify tab on the right of your screen.) You will find a freeze section there. If you freeze the plane it will turn grey, therefore you first have to turn 'show frozen objects in gray' off in the 'object properties': Right click on the plane and you will find "object properties". Now you can "Freeze selected".

Create a box to begin (under the objects tab Left on your screen). Click and drag to create a box. You need to resize the depth of the box now. You can use Alt + middle mouse button to rotate the view so you can see the side of the box. Use "f" to return to Front view again.
Use the scale (Select and non-uniform scale) button to resize the box. Pull the Z angle. 
Now we have to convert the object to an 'Editable Poly': 
Go to the Modify tab again. Right Click on the box and select "convert to Editable Poly". Be sure that the Lenght, Width, Height Segments are put on 1 before you do this.


Now you can modify every part of the box, you can move/scale/rotate the different Polygons by selecting the Polygon mode. Or the vertices or edges. Play with them a bit to understand them better.
I'm going to select the upper Polygon and extrude and scale it. Because the next part has to be smaller. Put the "edged faces" on. Do this by right clicking on the text on the left side of your viewport (probably front or user). You will find "edged faces" there.
The Extrude button can be found in the "edit Polygons" section of the Polygon mode.
I pulled the face slighty up and then used the scale button to scale it. Next to the scale button you will find a pull down menu. Put it on local, this way the scaling will be easier to do. The pivot will follow the object rotation.

In the front view you can modify the vertex to fit your picture.
Keep on extruding and changing the vertices untill you've got a good shape.
Now I'm going to apply a meshmooth to this object to make it smooth. Meshmooth can be found in the "Modifier List". Put the iterations to 1 to see the effect.
The whole gun is smoothed, but I want the bottompart to be hard, so put on "Seperate by Smoothing Groups" in the "Surface Parameters" of the Parameter rollout of the Meshsmooth modifier. Maybe your gun still looks strange. This is because you have to assign the different smoothing groups in the Editable poly mode: Click on editable poly and give the different poly's Smoothing Groups. If you want a part to be smooth, give them the same number. If you want a hard corner, give the polys of that corner different numbers.
Toggle "Show end result" on to see how it looks with the meshsmooth. you can put "Edged faces" off again to get a good view.



Here's how I assigned the smoothing groups.

You see a round surface on the gun, this will be created with the cut tool. Can be found (in polygon mode) under "edit geometry".
Put the gun to see through. Press ALT-X or right click on the object and go to "Properties". Now you can see the picture of your gun through your model. Click on "f" to go to the front view.

I'm welding some vertices that I don't need anymore. "Weld" can be found under "Edit Vertices". I used "Target weld". With "Target Weld" you need to drag one vertice to another to weld them. You can also use "Weld", "Weld" welds the vertices you selected in the middle of those vertices.
To get the same shape on the other side copy the mesh (Shift-Click on your object or go to Edit>Clone)
Delete the parts you don't need, delete the meshsmooth. Select the original object, go to Editable poly mode. Attach the second object (attach is found under "Edit Geometry"). Bring the second part to the right place and weld the vertices. You can select all the vertices and use "Weld" to weld all the vertices that are close to eachother.


Hide this object and go and make the other parts of the gun. You can use the same tools.
Begin again with a box. 
You can hide the object in the Display tab on the right of your screen.

To make the Safety lock I made a Cylinder Object (Can be found under Objects, near the box) 2 height segments and 20 sides. I extruded 6 of these sides. Deleted the end faces (red faces in the image).
Create another Cylinder Object with 2 height segments, but now with14 sides. Delete 6 faces (see picture). Put the small Cylinder on the right spot. Attach the objects together. Use Target weld to weld the vertices (Last Picture).



Always try to use Polygons with 4 vertices (quads):
this will give the best result when smoothing the object. Avoid polygons with 5 or more vertices.

No comments:

Post a Comment