With cordite in the air, splintered steel, shell casings and powder burns, there’s only one explanation...
Let's face it, SG could sure use some talented modellers.

Moderator: Joe Kari

Using Blender 2.49b For Smokin' Guns

Postby Plates » Wed Feb 23, 2011 4:54 am

Last Edited: March 4, 2011.

Blender is an Opensource 3d modeling program which once you setup and learn, it's one way to make md3 files for Smokin' Guns.

I've tried to cover many operating systems (although not mac at time of writing) and use a colouring standard: Yellow for Topics, Green for operating system subsections, Blue for notes, and Red for important.

I've broken this post into a number of posts.

Table of Contents:
Post 1
-> Programs & Files
-> Installation of Blender
-> Getting the Scripts
-> Checking the Scripts
Post 2
-> Making the Mesh
Post 3
-> Texturing
-> Scaling & exporting
Post 4
-> Exporting Models from Blender to Mistfit for Shaders

Problems pointed out by forum goers[i]
Last edited by Plates on Fri Mar 04, 2011 11:56 pm, edited 10 times in total.
Posts: 26
Joined: Tue Nov 20, 2007 4:13 am

Postby Plates » Wed Feb 23, 2011 4:55 am

Programs & Files

Files and Programs used are:
->The GIMP, Gnu Image Manipluation Program. (Win/Mac/Lin)
->Blender 2.49b. (Win/Mac/Lin)
->Some of Xreal Project's Blender scripts (platform indapendent)
->A Configured Smokin' Guns Mapping Setup. (a Randiant and understanding how-to compile)

Installation of Blender

Under Windows (32bit and 64bit) 7 / Vista / XP / 2000:

1) Download Current Blender 2.4 (32bit ((even if you're on 64bit*-see section note, Windows)) and not v2.5) from blender.org
2) Open the Installer and follow the wizard: Next, Read the License agree to continue, Some options for the install, and Choose where to install.
3) Make sure to choose to use the application data Directory when it asks, it should be the default anyways.
"Please specify where you wish to install Blender's user data files.
-> Use the application Data directory ( Requires windows 2000 or better)"
4) Finish the Setup and when it's done make sure blender starts.

* Note: At the time of writing there is only 32bit Blender 2.4 for Windows

Under Ubuntu (32 or 64) in most cases:

1) Open Synaptic Package Manager ( System > Administration > Synaptic )
2) Search for Blender
3) If it's 2.4 version (like 2.49.2-dfsg-2ubuntu2) Right click and select "Mark for installation", if it's 2.5 Read the Installation Under Linux.
4) Hit the Apply button at top of window, and when it's done Blender should be installed.

Under Linux:

1) Goto http://www.blender.org in your web browser and download either Linux x86-32 or Linux x86-64 depending on what linux you're running, with a Version number of 2.49b (2.49.2) or newer.
2) extract it, either with a GUI program or terminal
Code: Select all
tar -jxvf blender-2.49b-linux-glibc236-py26-x86_64.tar.bz2

3) You should now have a working copy of blender, in a folder called something like "blender-2.49b-linux-glibc236-py26-x86_64" if blender isn't opening, try making the binary executable:
Code: Select all
chmod +x ./blender

and hopefully it will run now
4) Optional: If you want you can rename the folder to something like "blender2.4" or moving somewhere else

Getting the Scripts:

You need 5 Scripts from xreal's Sourceforge SVN, Read the next part for your Operating system to find where to save them:

Note: In all the example file paths I'm just using the default name 'Owner' Replace with your user name.
Where to save the scripts under Windows 7 / Vista:

Before you can save the scripts you will have to enable viewing of hidden files.

Open up your Windows "Control Panel"
a) If using Classic/Large Icons/small Icons: Find "Folder Options" Icon
b) If using default Category View: Hit the green text "Appearance and Personalization", and then the Green "Folder Options".
-> Click the View Tab
-> Change the Radio button from "Don't show hidden files, folders, or drives" to "Show hidden files, folders, and drives".
-> Hit Apply button in lower right
-> Hit okay to close the "Folder options" Window.

The scripts should be saved to:
Code: Select all
C:\Users\Owner\AppData\Roaming\Blender Foundation\Blender\.blender\scripts

Where to save the scripts under Windows XP / 2000:

Before you can save the scripts you will have to enable viewing of hidden files.
The "folder options" should just be under the "View" menu of all my computer windows
-> Click the View Tab
-> Change the Radio button from "Don't show hidden files, folders, or drives" to "Show hidden files, folders, and drives".
-> Hit Apply button in lower right
-> Hit okay to close the "Folder options" Window.

The scripts should be saved to either:
Code: Select all
C:\Documents and Settings\Owner\Application Data\Blender Foundation\Blender\.blender\scripts

or you want the scripts for multiple users you can try:
Code: Select all
C:\Program Files\Blender Foundation\Blender\.blender\scripts\

(I Hope this is correct, I don't have a Windows XP or 2000 machine to test this on)

Where to save the scripts under Linux:

The scripts should be saved to:
Code: Select all

Make any folders that aren't there, if you don't see any folders starting with a '.' press "Ctrl+H" and scroll up to top.

Checking the Scripts:
Open Blender and you should now have:
Code: Select all
File > Export > Quake3(md3)...

Code: Select all
File > Import > Quake3(md3)...

If they aren't there You should just have to just have to update the Menus:
->Hit the Button in very top left, the one with a Bold 'i' (called "User Preferences")
->Choose "Scripts Window", the one with little green snake next to it
->Now you will have a "Scripts" Menu, click it and hit "Update Menus"
->Change the "Scripts Window" back to "User Preferences" by hitting the button in top left again

If they still aren't there you may have saved the scripts to the wrong folder, double check their location,. Try moving them around.
Last edited by Plates on Wed Feb 23, 2011 6:13 am, edited 1 time in total.
Posts: 26
Joined: Tue Nov 20, 2007 4:13 am

Postby Plates » Wed Feb 23, 2011 4:55 am

Note: The next part of this Tutorial uses blender and Smokin' Guns fodler structure, which are the same across all platforms. So when I talk about folders they will be inside the '/smokinguns' sub folder, so the models folder is '/smokinguns/models' in your game folder.

IMPORTANT NOTICE To Windows 7 & Vista users : Windows 'User Access Control' will likely cause a lot of problems for you if you have your "Smokin' Guns" folder inside the standard "Programs Files" folder.

I high recommend you create a folder inside your user folder and move it there. Example:
Code: Select all
C:\Users\Owner\Programs\Smokin' Guns\

If leave it in the "C:\Programs Files" Folder UAC will take your changes to files in the folder and cache them in the "VirtualStore" which can leave you with old versions of files, or even files that windows shows you as deleted still being visible to the compiler.

If you choose to leave it there, make sure to check your VirtualStore Folder if you have any problems
Code: Select all

Making a Model

Setting up the Workspace

You should be greated with something that looks like this:


The first thing todo is setup the workspace by creating some more 'windows' by splitting the 3D View window a few times. Todo this hover your mouse along one of the edges around the 3D View window, the cursor will change to a rescaling icon with 2 points, press space and you should get this message:


When you left click on "Split area" you will get a verticle line you can move around, when you left click again it will split the window along that line.

I'm going to split my First "3D View" window into 4 sub Areas so it looks liek this:


the 3 Windows on the right have each been given a view of 2 Dimensions (Top, Side Front or x/y, z/y, z/x) by using the view menu on each.

Some basic ways to adjust the camera are to either use the 'view' menu. You can also use hold the mouse wheel, Shift + Mouse wheel, and Ctrl + Mouse wheel.

You can Select everything, or Deselect anything you have selected by pressing 'a', since the cube is pink in my screenshot it means It's selected. I to select the 'Camera' and 'Lamp' but not the cube, so I press 'a' then use the right click, and Shift+Right click to select them.


I don't want them so by pressing 'delete' key a message will pop-up asking me if I want to erase selected objects, left click and now there will just be the cube.

Now I select the cube (right click) and rename to barrel in the ME and OB boxes in lower left


Also I want to change this object's material to 'barrel' so I go to the Shading tab (f5), and change it's name.


I'm going to be saving this in the Smokin' Guns folder, as models\tutorial\barrel.blend

Editing the Mesh

Hitting Tab with the cube selected will change to "edit mode"

Occlude Background geometry by hitting the 4th button that looks like an opaque cube


Notice the 3 buttons to the left of the "Occlude background geometry", these are the selection modes: Vertex, Edge, and Face.

You should memorize some basic keyboard shortcuts before I continue:
'e' - Extrude
's' - Scale
'g' - Grab
and pressing 'x', 'y', or 'z' after these shortcuts you can restrict the action to just that axis.

"Ctrl + R" - Loop Subdivide

Pressing Space brings up a menu with a lot of other tools that you will find handy.

Animated Gif of making the barrel:

->1 ) The Starting Cube with everything selected in edit mode
->2 ) Subdivide, press space, Edit > Edges > Subdivide
->3 ) Subdivide again
->4 ) Scaling along the Z axis
->5 ) Rounding the barrel out by selecting the Faces on side then grabbing them and moving along either the x or y axis
->6 ) Round out by grabbing the edges
->7 ) Selecting all the faces on the top and Extruding, but not moving them, just left clicking
->8 ) With all the faces still selecting I hover over the top view and scale them down
->9 ) Extrude the faces again but this time along the 'z' axis
->10-12 ) Repeating 7-9 on the bottom
->13-14 ) preforming a Loop Subdivide and placing it
->15-16 ) doing a second loop subdivide
->17 ) Selecting all the faces of what will become the metal straps and extruding them but not moving them
->18 ) Hovering the mouse over the top view I 'Scale' the straps out
->19-20 ) Adjust the straps a bit with grabbing and scaling along 'z' axis
->21 ) Giving the barrel a bulge in middle by selecting the middle ring and hovering over the 'top' view to scale it out.
->22 ) Scale and grab the top and bottom a bit to round out the barrel.
Last edited by Plates on Wed Feb 23, 2011 7:39 am, edited 6 times in total.
Posts: 26
Joined: Tue Nov 20, 2007 4:13 am

Postby Plates » Wed Feb 23, 2011 4:56 am


Now to texture "Seams" must be marked along the barrel to make texturing easier.

The first 6 seams are the two rings around the top and bottom of the barrel, and the 4 rings where the metal straps on the barrel meet the wood.

Now to mark a Seam from the top of the barrel, all the way to the bottom of the barrel.

Now I change the main window from "3D view" to "UV/Image Editor" and create a new Texture (Image > New ((or Ctrl+N)) ).

The New Image is named "barrel" and given a 256x256 size, I changed the colour from Black to a Bright Purple (255, 0, 255).

In one of the 3D view Windows I still have open I hover my mouse over and press 'a' to select everything (still in edit mode).

Then press 'u' to bring up "UV Calculations" Menu and select "Unwrap", there should now be the UV Coordinates layed out ontop on the texture in the "UV/Image Editor" window.


Now using most of the same shortcuts you can select and move vertexes and edges in the UV editor.
's' - scale
'r' - rotate
'b' - Box select
'a' - select all/deselect

I've rearranged the UV coordinates on the texture to help me latter, if this were model you were going to use you would want to fill up a lot more of the empty space I have left.


Now I switch the "UV/Image Editor" Window back to 3D view, and change from "Edit Mode" to "Texture Paint".

Notice the "Paint" Bow in the Panels below the 3D view (If you don't see it hit F9 to switch the panel to Editing).


Change the Opacity to 1.0, and the brush size to something larger, like 80 or so. Changed the colour to Brown by clicking on coloured box above "Opacity", and painted the whole barrel that colour adjusting camera to get everything.


Once everything was covered I went in with darker colour and brush with the size of 6, and drew along the vertical edges of the barrel. (Make sure the view is 'Solid' and not 'Textured' to see edges)


Now I switch the main "3D View" Window Back to "UV/Image Editor" and select my barrel texture and "Save As" /models/tutorial/barrel.tga, then save the model /models/tutorial/barrel.blend


I Close blender and switch to Gimp and Touch up the texture, covering the Pink with basetones. After I'm done editing I just save (/models/tutorial/barrel.tga) and Open blender.

Back in blender I open the model, and select everything in one of the "3D View" Windows. I then move the UV coordinates in the "UV/Image Editor" to line up right on the new texture.


Scaling & exporting

I switch the Main Window back to "3D View" and zoom out until I see the whole grid, and scale the barrel up till it almost fills the whole grid.


I save the model /models/tutorial/barrel.blend and then export. To Export I go File > Export > Quake 3 (md3)... , and export it /models/tutorial/barrel.md3. When asked for a shader path to barrel I put:
Code: Select all

Hit okay and can now open Radiant and use the md3 without problem.
Last edited by Plates on Fri Feb 25, 2011 11:41 pm, edited 3 times in total.
Posts: 26
Joined: Tue Nov 20, 2007 4:13 am

Postby LuckyGenDago » Fri Feb 25, 2011 5:14 pm

Great work!

[IngameName] mS.Dago
TS Admin
Posts: 139
Joined: Fri Apr 10, 2009 1:05 am

Postby ReD NeCKersoN » Fri Feb 25, 2011 10:29 pm

Thanks for taking the time to put this tutorial together. 8)
User avatar
ReD NeCKersoN
SG Team
Posts: 3245
Joined: Wed Mar 27, 2002 6:22 am
Location: VA, USA

Postby MsH » Fri Feb 25, 2011 11:19 pm

Yeah, I'm trying to use Blender for models, and this will help a lot!
User avatar
Posts: 154
Joined: Sun Jun 06, 2010 8:44 pm

Postby !NuB!Donut » Sat Feb 26, 2011 1:44 am

Thank you very much. Actually I tried to use it a long time ago but i failed and i doesn't found a god tutorial but now I will try it again by time.
User avatar
SG Team
Posts: 150
Joined: Wed Mar 10, 2010 8:57 pm
Location: Germany

Postby Plates » Fri Mar 04, 2011 11:14 pm

Joe Kari's tutorial on using Misfit Model 3D:
Found here on forums
& on Joe Kari's Blog

Exporting Models from Blender to Mistfit for Shaders

=> Have a Model you want to use shaders with.

=> Exporting the wavefront .obj
3) Opening it in Misfit Model 3d

=> Material > Edit Materials
=> Select the material from the drop down menu and rename it to something memorable "lp_whitecedar" for example
=> Model > Edit Model Meta Data
=> Make a key pair "MD3_PATH" / "models/lp_thuja/"
=> Make a shader and add it to the shaderlist

Code: Select all
// copied from Joe Kari shaders for pinetree1.md3 in sg.shader
   surfaceparm alphashadow
   surfaceparm trans
   surfaceparm nomarks
  surfaceparm nonsolid
   cull none
      map models/lp_thuja/lp_whitecedar.tga
      alphaFunc GE128
      rgbGen vertex

=> Add it to a map, and compile
Posts: 26
Joined: Tue Nov 20, 2007 4:13 am

Return to Modelling & Animation

Show Sidebar
Show Sidebar

User Control Panel