User talk:Tehrasha
Blender :: Animated Modelling for Source A Quick-n-Dirty Tutorial
Examples given in this tutorial were performed with Blender 2.57, and the Blender SMD Tools add-on written by Tom Edwards and should be applicable to future releases of the Blender 2.5x series. Much of the basic modelling instruction also applies to older versions of Blender, but many of the menus and keyboard shortcuts have changed.
Examples of model exporting and compiling in this tutorial use Team Fortress 2 as the platform, however, it should work with any Source based game. (CS:S, GMod, DoD, HL2, L4D, etc..)
This tutorial will not include detailed instruction on basic modelling and assumes that the user has at least a very basic knowledge of Blender and 3D modelling in general.
Software Requirements
Blender :: Free, Open source 3D modelling program.
Blender SMD Tools :: An addon for Blender to import and export SMD files.
SDK_Installation :: Software Developers Kit for Valve's Source engine.
VTFEdit :: Handy editor/creator for Valve's VTM and VTF files.
ConText :: An enhanced text editor for the editing and running QC files to compile models.
Optional Software
GIMP :: Open source image editor for texturing, not covered in this tutorial.
Key reference
Key | |
---|---|
Left Mouse Button | |
Right Mouse Button | |
9 | 9 on the main keyboard |
Num9 | 9 on the Number Pad |
Building the Basic Model
Tab ⇆ | To select object mode if not already there. |
Right-click on the starter cube to select it. | |
Tab ⇆ | Swtch to edit mode. |
A, DEL, F | Select the entire cube, and delete it. |
Add a new cylinder mesh to the project, and set its properties to 32 verticies, radius 4, depth 1, uncapped.
Repeat steps above with an uncapped cylinder of 16 sides, size 2, depth 1
, CTRL-NUM+..etc.. Right click one face or edge in the large gear, and press CTRL-NUM+ repeatedly until all of the large gear is selected.
G, Y, Move the large gear along the Y-axis until its teeth barely mesh with teeth of the smaller gear. Left-click to release the gear when its position is acceptable.
A, CTRL-N Select the entire mesh (both gears) and recalculate the 'Normals' so that all of the faces will be facing outwards.
Object>Transform>Geometry to Origin
SAVE FILE as tut.blend
Unwrapping, UV Mapping, and Texturing
Unwrapping can be challenging. While you can select to have Blender automatically unwrap your model, the results are usually a confusing mess of individual faces with no organization. Try to imagine how you would unfold the object if it were made of paper such as this unfolded cube.
Open a new windoid and set it to display the UVImage Editor so you can see the unwrapped results while you select edges to make seams.
If your layout still looks like complete chaos, add/remove seams until the parts of the model can be easily identified.
These gears, and most mechanical items with lots of flat planes, are not too difficult to unwrap. Organic items, such as heads or animals are considerably more difficult.
Use G grab, and S scale to reposition and resize the UV islands in the UVImage Editor for optimal use of texture space.
export UV Layout as a 512x512 tut_uv.png
add material |
name the material tut_uv (no need for filename extension) |
add texture |
Texture Type: Image of Movie |
Open the tut_uv.png that we just exported |
Mapping Coordinates: UV |
center scene in camera and F12 to RENDER for a look |
ESC to return 3D window |
SAVE FILE
Rigging the Model
SAVE FILE
Lets check out our work...
Excellent!
Animating the Model
The large gear is going to spin in the opposite direction and at 1/2 the speed of the smaller gear. For sake of ease and sanity with rotating objects, set the animation stop at frame 360.
Change screen layout from Default to Animation. | |
Right click on the Armature to select it. | |
Tab ⇆ | To get to Pose mode if not already there. |
Set Active Keying to 'Rotation' |
Large Gear Clockwise
Small Gear Counterclockwise
SAVE FILE
But wait! The smaller gear should spin twice as fast!
Uncheck all of the keyframes for Bone.001
SAVE FILE
Getting the Model into Source
Exporting
Tab ⇆ | Make sure Blender is in Object mode. |
Right click on the mesh (the gears) | |
SHIFT-RMB | The shift-right-click on the Armature |
File->Export->SMD->selected |
Voom.
Exit Blender
QC, File Names, and File Locations
Correct file paths and naming is probably the cause of the majority of failures in compiling QC files.
Models :: Materials :: SMD ::
My model compiles, but the texture doesnt show up!? My model is invisible!?
Example:: QC FILE SMD FILE File Locations
Compiling and Viewing
See Also
- Blender
- Modelling props with Blender
- Blender Modelling Walkthrough
- Is Blender 3D Good for Source? - How to Start
- Model Creation Overview
External Links
{Interlopers -- QC Compiling Tutorial using ConText}
--Tehrasha 22:54, 18 April 2011 (UTC)