Blade Symphony

Blade Symphony

48 ratings
Using Blender to Create Blade Symphony Workshop Items
By NimrodX
Use free and open source 3D modeling tool Blender to create swords, scabbards, masks, and perhaps even other stuff for Blade Symphony. This is hopefuly everything you've been wanting to know about how to do it. Please upvote if you find this useful!
   
Award
Favorite
Favorited
Unfavorite
About This Guide
Blender, an open source 3D modeling tool from the Blender Foundation[www.blender.org], is essentially the free equivalent of expensive software like Autodesk 3DS Max and Maya. Like those infinitely more expensive applications, it can be used to create content for Blade Symphony and other games based on Valve's Source Engine.

You can get it here:

https://steamhost.cn/app/365670/Blender/

This guide won't teach you how to install or use Blender in general, but it will tell you about the things you need to know about using Blender to make objects for Blade Symphony. Since Blade Symphony is based on Source Engine, this knowledge will come in handy for creating objects for other Source Engine games as well.

You can download the blender project file for Blade Symphony here[www.dropbox.com].

Here is the example sword that's contained in the Blender template.

https://steamhost.cn/steamcommunity_com/sharedfiles/filedetails/?id=290871470

(It's not very good artisticly speaking but it's just an example so I didn't put much effort into it.)
Obtaining and Learning Blender
The first step is, know how to install and use Blender.

Blender can be downloaded from the Blender Download Page[www.blender.org]. It installs like most other applications, though it doesn't really require installation to run. (You can just run it from a folder if you want.)

You can also just download it with Steam as linked to above.

If you don't know how to use Blender yet, start by going here[www.blender.org]. I specifically recommend the Intro Tutorials at Blender Cookie[cgcookie.com] which is what I used. (These are free video tutorials, though much of the more advanced content there is subscription only.)

It may seem complicated at first, but to use this guide you really only need to know how to create static objects. You don't need to know anything about animation, rigging, or any of that more complex stuff.

I recommend going through the tutorials on the user interface so you'll know how to get around in the application, then tackle some tutorials on how to create simple objects. Something like a sword can be pretty simple, so avoid the stuff about sculpting and rigging creatures, animation, etc, until you are familiar with manipulating objects, faces, edges, and vertices. You'll also need to learn about UV Unwrapping and UV Mapping[cgcookie.com].

Once you know how to create still life models and texture them with UV mapping, you're pretty much ready to move on. You can catch up as you go if I get into anything you haven't learned yet.

Note: It may seem like Blender is overly complex, but the fact is that all 3D modeling software is rather complicated. It's not as simple as a paint program or your average MS Office application. Blender is actually pretty well designed; expensive $3000+ applications aren't really any easier to learn to use. (Blender once had a horrible UI, but they completely reworked it a couple of years ago.)
Install Blender Source Tools
To create models for Blade Symphony and other Valve Source Engine games, you'll need to download and install a Blender extension called Blender Source Tools which can be downloaded here[steamreview.org]. Just follow the instructions on how to install it. Do not extract the ZIP file, you don't need to.

This will add functions to Blender for exporting (and importing) models in the SMD format that you need for Blade Symphony.
Download and Customize the Blender Sword Template
Once that is installed, download my Blender Sword Template[www.dropbox.com] project file. Make a copy of it and rename it to whatever you want to name your sword, then open that up in Blender.

This template will give you the following bounding boxes:
  • Absolute maximum bounds that can't be exceeded or the game will reject the model.
  • Recommended maximum bounds. Anything larger than this and things may look bad.
  • Absolute minimum bounds. The whole model does not have to surround this box, it just needs to be outside of the box at some point on both sides of each axis. This means that, assuming your model is centered, it needs to be at least 1 unit wide and 1 unit high at some point (such as the handle), at least 40 units long, and in the gripping range of the hand.
  • A wireframe hand that will give you an idea how large your sword will be compared to the character's hand, and where the sword will be gripped.

These objects are only visual references and can be hidden using the little eye icons in the object tree panel in the upper right. They should not be exported.

These are the objects that actually matter to the game:
  • yourswordname_ref - This is the object for the sword model itself. Rename this to whatever you want to name your sword, but keep the _ref on the end. A crude example sword is provided, but you can just delete all the vertices and start from scratch. It's important not to delete the modifier that applies the sword_grip bone to the model because this is how the game knows where to have the character grip the sword. Also, don't move the object from 0,0,0. The origin point determines where the sword is gripped. So if you need to make adjustmens to how it's aligned with the hand, go into edit mode, hit A to select all, and move all the vertices around in edit mode instead of moving the whole object. In general, all objects should stay with their origin at 0,0,0 or you'll have alignment problems.
  • yourswordname_phy - This is the invisible collision box for the physics engine (thus the _phy) which basically just needs to be an object with a small number of polygons that completely surrounds the sword object. It doesn't seem to actually affect gameplay but Source Engine requires it. Like the sword object, don't delete the sword_grip from this object either since it serves as the origin to line up the two objects. Also don't move the origin from 0,0,0 but instead edit the vertices if you need to move it.
  • sword_grip - This is an "armature" (actually just a single bone) that the game looks for to determine which way is up, down, etc. Don't rotate it or you'll find your sword being held sideways or upside down. Like everything else, don't move it from 0,0,0.
  • yourswordname_scabbard, sheathe_attach_hip, sheathe_attach_back - Just ignore these for now. They'll be explained in the section on making a sheath.

Both the yourswordname_ref and yourswordname_phy objects have a single material called "yourswordname" applied to them. Rename this material to your sword name. The name of this is important because it determines what filename the game will use to look for a VMT (Valve Material) file. You should only have one material applied to yourswordname_ref (really the _phy object doesn't need one, but the exporter will generate a warning if there's no material on an object). How this material is configued in Blender does not matter because the game will only use the material name to find your VMT file.

Here's an example showing all you need for a "_phy" bounding model.
This basically just gets used for physics calculations when someone gets defeated and their sword goes flying and bouncing off of walls and objects. It's just used for collision detection and it doesn't have to be that exact to look good in the game. So keep it simple.

Lastly, Blender Source Tools adds three new panels to the scene configuration tab for exporting SMD files and compiling them into optimized models for the game. These panels have four fields where you'll want to configure some directory paths. Put the following paths into these fields:

Export Path*
C:\Program Files (x86)\Steam\SteamApps\common\Blade Symphony\workshop\models\<Your64BitSteamID>\YourSwordName\
Engine Path
C:\Program Files (x86)\Steam\SteamApps\common\Blade Symphony\bin
Game Path
C:\Program Files (x86)\Steam\SteamApps\common\Blade Symphony\workshop
QC File Path*
C:\Program Files (x86)\Steam\SteamApps\common\Blade Symphony\workshop\models\<Your64BitSteamID>\YourSwordName\*.qc

You'll need to edit these paths as follows:
  • If you installed Blade Symphony in a steam library folder that's not the default, the "C:\Program Files (x86)\Steam\SteamApps\common\" part will need to be changed to point to wherever you installed it.
  • The <Your64BitSteamID> should be replaced with the big number that is your numeric Steam ID. Luckily Blade Symphony creates these directories with your steam ID for you, so all you really need to do is use the file browser to browse into the existing folder that's been created for you. (This is how Steam Workshop differentiates you from other users). It's a long number that looks like 76561198025021719, but yours will be different. It should be the only subfolder with a numeric name like that in the workshop\models directory.
  • YourSwordName refers to a directory that you'll need to create to store the files for your sword. Pick a name for the sword that you want to create and make a directory using that name in place of YourSwordName. The paths with a * need to be changed for each new sword project.

Now you have Blender pretty much set up, but there's a bunch of stuff you'll need to do outside of Blender as well. Simply exporting an SMD file isn't good enough; the SMD file has to be "compiled" into a MDL file that the game can load, and you're going to need to create a text file to tell it how to do that.
Compiling Your Sword
At this point you'll need to create a .qc file for your sword. To do this you'll need a text editor like notepad or better yet the free Notepad++[notepad-plus-plus.org].

Actually, if you want you can just use the Text Editor in Blender itself. In fact, in the template project I have included text blocks for the QC and VMT files. This might be a good idea because this way you can keep all of the related information together in one Blender project. The text editor in Blender is really oriented toward editing Python scripts for use in Blender though, so to load non-Python files, you'll need to click the little funnel icon in the file browser to disable file extension filtering.

Open up a windows explorer window and navigate your way to the Blade Symphony folder. Then in there open up "workshop\models\<YourNumericSteamID>\YourSwordName", that is, whatever directory you've created in your personal workshop models subdirectory for your sword.

Open up Notepad++ or whatever and create a file called yourswordname.qc the paste the following into it:

$modelname "76561198025021719\yourswordname\yourswordname.mdl" $cdmaterials "models\76561198025021719\yourswordname" $surfaceprop "metal" $bonemerge sword_grip $scale 1.0 $body "Body" "yourswordname_ref.smd" $sequence idle "yourswordname_ref.smd" loop fps 1.00 $collisionmodel "yourswordname_phy.smd" { $mass 1 }

Again, replace all instances of "76561198025021719" with your numeric Steam ID from the folder name, and all instances of "yourswordname" with the name you used for the folder, the qc file, and the base name of your objects in Blender.

NOTE: For now I'm going to skip the issue of creating a sheath. They are optional so I'm going to leave those out for now just to keep things simple. See the section on creating a sheath/scabbard for info on that.

Once you've got that file edited, save it and go back to Blender.

Now you should see a little button that says something like yourswordname.qc at the bottom of that source tools export panel. Don't click it yet.

Make sure that only the _ref and _phy objects are selected in the exportable objects window, then click the Export button at the top, then click "export scene". This should export both objects as SMD files.

Now click the button to compile the yourswordname.qc file. If everything is good then you'll see a little message at the top of the Blender window saying that the compilation was a success. If there's an error, go to the top left menu in the Blender window View->Toggle System Console and click that. This will show you a dos terminal window that should show you if what errors you have. Most likely you just made a typo or something, or perhaps you did the export wrong and the SMD files didn't get exported.

If you have any problems you haven't been able to figure out, you can ask questions in the Blender Help Thread for Blade Symphony in the Workshop forum.

If the compilation went without problems then you should see a bunch of new files in the same directoy as the .qc file you created.

So now you have the model created, but you're only half done. Take a break, then it's time to tackle the materal and texture files! Yay!
Creating a Material (VMT file)
Unlike Blender which has this nice node editor for creating materials, in Source Engine materials are not quite as flexible. Materials basically require both a material definition file (.vmt) and one or more UV mapped texture file (.vtf = Valve Texture File).

Materials and textures live in a different directory from your models. In your Blade Symphony folder, navigate your way to the following subfolder using a Windows explorer window:

workshop\materials\models\<Your64BitSteamID>

Notice that there's another "models" directory inside the materials directory. That's for materials specific to a certain model; don't confuse it with the models directory that your other files are in.

Create another folder in there called yourswordname (whatever you used everywhere else). Use your text editor to create a new text file in there called yourswordname.vmt and paste the following into it:

"Patch" { include "materials/models/shared/swords.vmt" insert { "$phong" 1 "$forcephong" 1 "$basetexture" "models/76561198025021719/yourswordname/yourswordname_diffuse" "$bumpmap" "models/76561198025021719/yourswordname/yourswordname_normal" //"$phongexponenttexture" "models/76561198025021719/yourswordname/yourswordname_exponent" "$phongexponent" 1 "$BasemapAlphaPhongMask" 1 "$normalmapalphaenvmapmask" 1 "$envmap" "env_cubemap" "$envmaptint" "[0.3 0.3 0.3]" $envmapcontrast 1 $envmapsaturation 1 "$phongfresnelranges" "[0.3 1 1.5]" "$phongwarptexture" "models/shared/phongwarp_metallic1" "$phongboost" "50" "$PhongAlbedoTint" "1" "$rimlight" 1 "$rimlightboost" "0.1" } }

Again, replace all instances of "76561198025021719" with your Steam ID and yourswordname with the name you used for everything else, then save the file.

This is just a sort of basic starting point for customizing the shading of your sword. Eventualy you're going to want to tinker with these parameters. The most useful ones are probably:
  • $envmaptint
  • $phongexponenttexture
  • $phongexponent (if not using an exponent texture)
  • $phongboost
  • $rimlightboost
You can read about what these do on the Material System page of the Valve Developer Wiki.

So just leave those alone for now because they won't do much until you create the yourswordname_diffuse.vtf and yourswordname_normal.vtf files. These VTF files are image files like PNG or JPG files, but they contain stuff that Source Engine needs that standard file formats don't support.
Creating UV Mapped Textures (VTF files)
At this point, if you haven't already, you need to do some UV mapping for your model. In Blender, make sure you have edges of your model marked as seams.

VTF files do not have to be square but the pixel dimensions of each side must be a power of 2. Blade Symphony also has a size limit on textures, so the total area of your texture image can't be larger than 1024x1024.

However, since swords are long and thin, it makes more sense most of the time to use a texture that's wide. Since 2048x512 is the same as 1024x1024 in area, for swords 2048x512 is usualy the best size to use. The only real exception to that is if you don't think you need that much texture detail, in which case you can use 1024x512 or 1024x256.

So use the Image Editor in Blender to create a blank image file using one of those dimensions, and do the UV Unwrap on that, then arrange the UV islands in a reasonably sane and efficient manner.

Different people handle the UV texture creation in different ways. You can paint directly into the Blender image editor (which is rather primitive at this point), use Blender Cycles rendering engine materials to Bake textures created by blender into an image, or export the UV map guides as a PNG file, load that into a layer in a real paint or image editing application (like GIMP) and use that, or paint textures directly on a 3D model using Blender's Texture Paint mode (which is how I created the example sword).



Above are the UV mapped diffuse textures I created for the example sword in the template file. The image on the left shows the RGB channels, and the image on the right shows the alpha channel which, according to my VMT file, will indicate which parts of the object should be shiny. The blade is mostly white because it should be shiny, and I also used the (included) "Stainless Steel 2 (Specular)" texture to try to make it look more like steel. The guard is only a bit glossy, and it's smooth, so it's just grey, and the handle shouldn't be shiny at all so it's black.

TIP: If you want to paint into the alpha channel in Blender using Texture Paint mode, you need to set the painting mode to Add or Erase Alpha and select the texture as the Texture Mask, not the regular texture.

Also notice that the Blender project file includes some seamless Brush textures that you can use with Texture Paint mode. (As of this time the only ones of any real significance are the metal ones.) The "specular" ones are designed for use as texture masks.

Note that these textures will probably not look exactly like what you want unless you play with the scale, brightness, contrast, and color settings.

I then saved this image off as a RGBA PNG. (If you save an image like this in blender, save it as RGBA or the alpha channel won't get saved.)

You can also use other software to create the actual textures but however you do it, you want to end up with a file called yourswordname_diffuse.PNG.

Now you should download something called VTFEdit[nemesis.thewavelength.net] which you can use to convert PNG files into VTF files.

Run VTFEdit and use File->Import to import yourswordname_diffuse.png. You will see a window like this:


The defaults should be OK, but make sure that Generate Normal Maps is NOT checked.

Now you can use File->Save As to save the file as yourswordname_diffuse.vtf.

VTFEdit is also capable of creating a really crude normal map based on averaging out the RGB values in a regular diffuse texture. This is hardly ideal, but just so we can have a normal map with an alpha channel (which mapps the areas that should be reflective), import yourswordname_diffuse.png yet again, but this time check the Generate Normal Map box and set the options as follows:



Hit OK, then save this as yourswordname_normal.vtf.

Congratuations. You now have VTF files.

Another tip, VTFEdit has a Tools->Convert Folder option that can be really helpful once you start modifying multiple texture files and want to convert them all at once. This can save a lot of time if you change your diffuse texture, normal map, and exponent map and need to convert all of them at once. (More on normal and diffuse maps in a bit.)
Previewing Your Model
If you set your game path up properly in the Source QC Compiles panel in Blender then you should be able to launch the model viewer by just clicking on the Launch HLMV button at the bottom of the panel. Below I describe another way to launch the model viewer.

Go back to your file explorer window and go to the Blade Symphony directory. You may have noticed that you haven't had to download the Source SDK. That's because practically the whole thing is included with Blade Symphony.

Open up the bin directory and look for a file called hlmv.exe (Half-Life Model Viewer). You can use this to preview your model, but unfortunately you can't just run it as it is.

Select hlmv.exe and right click, then select Create a Shortcut.

Rename the shortcut to something nicer like "BS Model Preview".

Right click on your shortcut and select Properties.

Add the following to the end of the Target field without deleting anything. Add this outside the quotes:
-game ..\workshop
Hit OK to save your changes.

Now you can move this shortcut anywhere you want (I keep mine in the base Blade Symphony folder) and just double click on it to run it.

Use File->Open and you'll see a folder with your numeric Steam ID in the upper left. Navigate down through that until you find your yourswordname.MDL file and open it up.

You'll need to zoom out or rotate to see it. (Drag mouse buttons on the window.)

You can also view other models in the game this way if you feel like it.

The model will not appear exactly as it does in the game, particularly if you're using extremly reflective $envmap surfaces. This is because this shading technique essentially fakes reflections by mapping a skybox onto the model, and the model viewer will use a different skybox than the actual game. Some other things about how the shading works in the viewer differ from the actual game, but at least you can tell if you've made any major mistakes using the model viewer.

Blade Symphony is a SERIOUS PAIN when it comes to getting it to reload changes to a model, so using the model viewer to tweak your model and materials is highly recommended.

At this point you can go play with the parameters in your VMT file, save it, hit F5 in the model viewer to refresh it, and repeat until you're happy. If you make any changes to your model mesh in Blender don't forget to export them and hit the QC compile button or they won't show up.
Adding Your Sword to Blade Symphony
Launch Blade Symphony, go into Settings, click Game, then click Workshop.

Click "My Swords" and create a new sword. Here you can name your sword, then pick the model that you made (browse and open the yoursword.mdl file).

If you did everything right and there are no errors (such as te sword being too big, too small, or the names of file references being wrong somewhere) then it won't complain and you'll see the model name in the list.

Notice that you can also provide a model for a sheath, though I just skipped that option for now so you could get something working as soon as possible. So just don't select anything for that. (See below for info on sheaths.)

You'll also want to go into Settings->Controls and enable "Allow Developer Console (F10)". After doing that, hit F10 and type "sv_cheats 1". This is not so you can cheat, but because the game will give you errors about using an unapproved sword when you try to test it in a real game.

Now you should be able to go into Customize and switch the sword group to a new one that's appeared: Local. Select your sword and see how it looks, if its facing the right way, fits the hand reasonably well, etc. Then test it out against the AI or start up a local server where you can run around with your sword unmolested.

After you're sure your sword is working out, you can upload it to the workshop. You'll probably want to make sure you have the name and description fields filled out the way you want before doing so.
Baking a Real Normal Map!
The normal map that you created using VTFEdit isn't what I'd call a "real" normal map. Really it's just a bump map that adds a little texture to your model. The real purpose of a normal map in game engines is to make things that should be smooth and round actually look smooth and round without having to use billions of polygons that cause a GPU to choke. GPUs are much better at dealing with texels than polygons.

Using a normal map you can make a 20 sided polyhedron look like a sphere, or a cylinder with 16 faces (like the handle of the example sword) look smooth and circular.

Tangent Normal maps look something like this:



R, G, and B are used as vector coordinates instead of colors, definiing which direction the surface of a polygon is facing at each texel on the polygon. This allows a shader to take a polyhedron with a relativly low polygon count and make it look round because each texel on the surface becomes almost like a polygon without all of the GPU inefficiency of having to deal with real polygons.

Normal maps can also be used as bump maps for purposes of engraving things on a sword blade, for example, but this section is just going to tell you how to create (or "bake") a normal map for purposes of smooth shading so your sword doesn't look like it's made of polygons.

Often people create a separate high polygon count model and use that to create the normal map for a low polygon model, but in this case we're just going to use a Blender feature called the Multiresolution Modifier to automatically create a really smooth high polygon mesh for normal map baking purposes.

Before we do anything else, we need to tell Blender which edges of our model should remain sharp. You might think that using "mark sharp" on a edge will do this, but with the Multiresolution modifier we need to use something else called Edge Crease Weight. To make an edge fully sharp, we set the crease weight to 1. To make it fully smooth we set it to 0 (the default).



The above screenshot shows where the edge crease setting is. It only appears when edges are selected. Also make sure that Mesh Display is set to show creases, and you might want to turn off display of seams and "sharp" marked edges (which won't do anything with the multiresolution modifier).

Now, unless you already have a multires modifier, exit edit mode and add a Multiresolution modifier to your model. This is done using the wrench tab in the properties panel.



First, whether the modifier is visible and used for rendering is very important. Make sure the eyeball and camra icons are both light colored (enabled). This means the modifier effict is visible (eye) and used for rendering (camera). The latter is important because baking is a sort of rendering.

Disable Subdivide UVs and enable Optimal Display. That'll stop the modifier from slowing your system down drawing all the polygons. Now if you don't have any subdivisions yet under Preview, Sculpt and Render, hit Subdivide 2 times. Set all of Preview, Sculpt and Render to 2 (the maximum it will allow unless you subdivide again.)

Make sure you're in Object mode and set the view to solid shading. Look to see if the model is geting smoothed the way you want. If not, you may need to go back and add some edge crease weights.

If you have any areas that looked pinched or weird, you probably have duplicate vertices, dangling edges, or some other sort of mess. Problems can also be caused if normals are not all acing outwards, so go into edit mode, select all, and do operations like Recalculate Normals Outside, Vertices->Remove Duplicates, and various Clean Up operations.

You can also try hitting Subdivide again if some areas still don't look smooth. Also play with setting faces to smooth or flat shading. You probably will never want to subdivie more than 4 times though because too many subdivisions will grind your machine to a halt.

Once everything looks good enough, you're ready to bake a normal map. First you need to select the target image for your normal map. This is done by selecting a texture node in the material view.


The selected node is the one with the white border around it. If you don't have an image texture node for your normal map yet, or don't have an image created, create the image in the image editor and add a new image node to your sword material. It doesn't actually matter what the texture node is attached to, it just needs to exist and be selected to indicate the output image for the bake.

At the bottom of the render properties there's a Bake panel. Set it up like this:



Make sure you have your object selected in the 3D view, and you might want to split the view and switch the new view to the image editor with the normal map image shown. That way you can see the results. Click the Bake button when ready and after a few seconds you'll see the normal map created.

How smooth the normal map is will depend partly on how many subdivisions are in the multiresolution modifier, so if it looks a bit blocky then you might need to up the number of subdivisions. You shoudl almost NEVER need more than 4 subdivisions for this.

Now, VERY IMPORTANT! Once your normal map is generated, disable the multires modifier by clicking the little eyeball and camera icons on the modifier. You do NOT want to export your model with the multires modifier active or you'll be exporting a super high poly model that will fail to import into Blade Symphony! Do not forget this!

Notice there are other types of baking you can mess with if you want, such as Ambient Occlusion. If you want to you can try using the material system in Cycles to bake textures for your diffuse map, for example, but this is an advanced topic that's beyond the scope of this guide. Just be aware that there's more to baking than just normal map generation.
Creating a Sheath (or is it a Scabbard?)
Creating a sheath for your sword is pretty simple. You don't need a bounding box object (no _phy object). Really the most confusing thing is that the code refers to it as a sheath in some places, and a scabbard in others. Also sheath is spelled "sheathe" in some places and "sheath" others.

A simple example sheath is included. It's just a single material.

Rename the yourswordname part of the sheath to match the name of the sword. Also don't forget to rename the material on the sheath.

An important thing is to keep the object origin of the sheath at 0,0,0 and to move the mesh in Edit Mode (not Object Mode) so that it lines up with the sword so that it looks right fully sheathed. Again, keep the object at 0,0,0 and just move the mesh or you'll end up with the blade sticking out the back. Since the 0,0,0 is going to be at the sword handle where the sword is gripped, this means that the origin is never going to be inside the sheath if you're doing things right.

Tip: You don't need to bother creating a hollow area insde the sheath because the sheath isn't physics modeled or anything, and the players will never be able to see inside it. In the example sword texture I just made an opening that's deep enough that you can't tell it doesn't go the full length. The only thing you really need to worry about is making sure the sheath covers the entire blade of the sword or it'll be sticking out.

Now you should decide if you want the sheath to be worn on the hip or on the back. Select the sheath object and edit the modifier in the properties pane modifier tab (little wrench icon). Change the bone to either sheathe_attach_hip or sheathe_attach_back depending on which you want. You don't need to delete the unused bone, just leave it there. It won't get exported if it isn't used.

Like the sword, you need a QC file for the sheath. You can either switch to the text editor in Blender and select my example qc file there, or copy and pase this into another text editor. Save it in the same directory with your sword QC file and name it yourswordname_scabbard.qc:

$modelname "<Your64BitSteamID>\yourswordname\yourswordname_scabbard.mdl" $cdmaterials "models\<Your64BitSteamID>\yourswordname" $surfaceprop "metal" //$bonemerge sheathe_attach_back //only use this if the scabbard will be on the back $bonemerge sheathe_attach_hip //only use this if the scabbard will be on the hip //$attachment "anim_sheathe" "sheathe_attach_back" 0 0 0 rotate 0 0 0 //only use this if the scabbard will be on the back $attachment "anim_sheathe" "sheathe_attach_hip" 0 0 0 rotate 0 0 0 //only use this if the scabbard will be on the hip $hboxset "default" $scale 1.0 $body "Body" "yourswordname_scabbard_ref.smd" $sequence idle "yourswordname_scabbard_ref.smd" loop fps 1.00

Edit the file as before to insert your steam ID and your sword name.

Also, notice that you need to change something here depending on whether you want a back or hip attached sheath. The "//" characters are comment indicators and cause the rest of the line to be ignored, so if you wanted a back sheath delete the "//" in front of the sheathe_attach_back lines and add a "//" in front of the sheathe_attach_hip lines.

Then save the file. Once you're satisified with your model you can export it and compile the QC file as you did with your sword.

Before doing that though make sure you've done your UV Unwrapping and UV Mapping.

Setting up the mateial for the sheath is the same as for the sword. There's an example VMT file in the Blender text editor, or you can use this one for yourswordname_scabbard.vmt

"Patch" { include "materials/models/shared/swords.vmt" insert { "$basetexture" "models/76561198025021719/yourswordname/yourswordname_scabbard_diffuse" "$bumpmap" "models/76561198025021719/yourswordname/yourswordname_scabbard_normal" "$normalmapalphaenvmapmask" 1 "$envmap" "env_cubemap" "$envmaptint" "[0.3 0.3 0.3]" $envmapcontrast 0.8 $envmapsaturation 0.8 "$phong" 1 "$BasemapAlphaPhongMask" 1 "$phongexponent" 100 "$phongfresnelranges" "[0.3 0.8 1.5]" "$phongboost" "5" "$PhongAlbedoTint" "1" "$rimlight" 1 "$rimlightboost" "0.5" } }

Create your VTF files the same way you did for the sword.

That's pretty much it. Once you have exported and compiled the model, and have your VMT and VTF files done, you can go into the properties for your sword and add the model to the configuration. Test it out to make sure it's all lining up properly.

I recommend checking it out in the model viewer first though since it's such a pain to get Blade Symphony to reload changes to objects once it's latched onto them.
Animations for Swords
Here's a qc file snippet on animations that are supported. I haven't tried this with Blender or anything else yet so there's no real tutorial on it here.

$sequence idle "stacatto_black1_idle" loop fps 1 ACT_BB_SWORD_IDLE -1 $sequence idle_sheathed "stacatto_black1_retracted_idle" loop fps 1 ACT_BB_SWORD_IDLE_SHEATHED -1 $sequence sheathe "stacatto_black1_retract" fps 15 ACT_BB_SWORD_SHEATHE 1 $sequence unsheathe "stacatto_black1_deploy" fps 15 ACT_BB_SWORD_UNSHEATHE 1

These can be used to make things like the light sabers that actually deactivate on sheathing.
Further Reading and What's Next?
Also don't forget to check out the official site's page on developing Blade Symphony mods[www.blade-symphony.com] since it has more specifc information on some things that I might have missed.

Hopefully at this point you know everything you need to know to make swords. If you run into problems or have other questions, please post to the Blender Help Thread for Blade Symphony.

You may also want to check out:

Additional free software that you might find useful:
  • Crowbar - Use this to decompile MDL files included with the game so you can learn how they were built.
  • Sculptris[pixologic.com] - Free sculpting software from the makers of ZBrush
  • GIMP[www.gimp.org] - Blender's 2D friend, the closest free thing to Photoshop.
  • MaPZone[www.mapzoneeditor.com] - Free procedural texture generator (generates them with normal maps too)

If you found this guide helpful, please rate it up! It took a good bit of work to make, and think of all that money you saved not having to buy 3DS Max! Steam gifts also accepted!
28 Comments
barusu 17 Jun, 2023 @ 12:33pm 
this guide taught me nothing
jes 29 Jun, 2017 @ 8:30am 
This guide is awesome.
Captain Goose 11 Feb, 2015 @ 6:34pm 
This is my first time doing this. I got super lost right after the _phy part, with the paths and all. I would apreciate a further explanation if possible. The template is awesome btw!
xdshot 8 Feb, 2015 @ 1:09pm 
Thank you for this great tutorial, and for template which is very helpful! :)
FloorFood 24 Oct, 2014 @ 1:46am 
Don't worry, I worked out what I was doing wrong (I didn't call the notepad file .qc or put it in the right place for that matter) Thanks for your help though :)
FloorFood 23 Oct, 2014 @ 9:06am 
my blender version is 2.72 and my source engine version is whatever one the link gave me, but Id imagine its the most current. Thanks for your concern :)
NimrodX  [author] 21 Oct, 2014 @ 1:49pm 
Which version of Blender are you using and what version of the soure engine plugin are you using? Blender just reeased a new version so there may be issues with the plugin for all I know.
FloorFood 19 Oct, 2014 @ 12:41pm 
slight question tho, got to the exporting files bit, but the button that I need isn't there and the QC path wont accept the qc file.... *help meeeee*
FloorFood 19 Oct, 2014 @ 9:57am 
awesome guide, thanks a lot for this!
Romenics 9 Sep, 2014 @ 12:27pm 
Excellent! It is high time to overthrow the stereotypes! Down with heavy 3D max