Blender

Blender

132 ratings
The Source guide for Blender
By zonked
A big guide containing all you need for Blender when it comes to the Source engine [And yes, this includes Goldsrc and Source 2!]

2
3
2
   
Award
Favorite
Favorited
Unfavorite
Introduction
So You want to import something from a Source game? Let's say a map or a model - this guide should help! While yes, there are many other guides and tutorials on these things - this guide attempts to keep everything in the same place! Very handy to use, especially if you're a beginner at importing Source content to Blender...

This guide includes many things:
Source Engine
Importing:
  • Importing Maps
  • Importing Models
  • Importing Textures
  • Importing Materials
Exporting:
  • Exporting Models
  • Exporting Materials/Textures

Source 2
Importing:
  • Importing Maps
  • Importing Models
  • Importing Textures
  • Importing Materials
Exporting:
  • Exporting Maps
  • Exporting Models
  • Exporting Materials/Textures

Goldsrc
  • Importing Maps
  • Importing Models

I hope this will help!
Blender Addons
Of course, this is going to be necessary for any of this to work - Blender doesn't contain any of the correct tools by default for importing Source content; this means we'll have to turn to the community and use the many addons created by them. This list will expand over time! Here are the addons that are used for this guide:
  • Source IO[github.com] - Extremely versatile addon - covering almost all your Source needs!
  • Plumber[github.com] - While Source IO can import Source maps, it needs this addon to help with importing - a vital part in importing these maps.
  • Blender Source Tools[steamreview.org] - This can import things such as de-compiled models and textures.
Software
So we have all the addons, but even addons have their limits. Because of this, we have to rely on external software to get the job done. In this case, we need them for importing maps - as our addon can only import some files.
Needed software:
  • Java[www.java.com] - Needed for BSPsrc
  • BSPsrc[github.com] - De-compiles .bsp files back into their Hammer format - .vmf
  • Source 2 Resource Viewer[valveresourceformat.github.io] - Source 2 file viewer
  • Crowbar - Needed to compile our models into a source engine format
  • VTFedit[nemstools.github.io] - Needed to create .VMT and .VMF files
Source Engine

Source Engine - Importing models

For importing Source models, you require:
Software
  • Source 2 Resource Viewer
Blender Addons
  • Source IO
These can be found within their respective sections of the guide.

First, launch Source 2 Resource Viewer. [While S2RV was designed for Source 2, it still works with most Source things, and is easier/better to use than GCFScape]
Then, do the following:
  1. Click 'Open'
  2. Locate the dir.vpk of your game, and select it
  3. Go to the model you wish to import to Blender [.mdl], or its folder
  4. Click 'Export as is'
  5. Select the folder you want to export it to, this can be anywhere
Now, go into Blender and make sure SourceIO is enabled. This is done by:
Edit > Preferences > Addons > [Add the ZIP file]
Go to File > Import > Source Engine Assets > Source Model (.mdl) and select it.
Navigate to its location on where you exported it from the .VPK in Source 2 File Viewer, and select it.
Now you have a Source Model in blender.
I recommend extracting the entire VPK, or at least the materials and models sections into a folder.

Source Engine - Importing maps

For importing Source maps, you require:
Software
  • Java
  • BSPSrc
Blender Addons
  • Plumber
  • Blender Source Tools
These can be found within their respective sections of the guide.

To begin, we must first locate the BSP file. This will most likely be in:
[Steamlibary]/common/[game_name]/[game_name]/maps.
If it is something such as a Garry's Mod addon, please look at the Garry's Mod section on how to get files from the addons.

Once the BSP has been located, you need to launch BSPSrc and do the following:
  1. Navigate to the 'Files' tab [Should open onto this tab]
  2. Select the 'Add' button
  3. Go to the location of the BSP file we found, and select it
  4. Click decompile, and let it work it's magic
Now we should have ended up with a VMF file. A VMF file is a version of the map that is decompiled. These are useable in the Hammer editor, whereas BSP files are not.
Next, we import the map using the addon. Make sure the addon is installed, just go to
Edit > Preferences > Addons > [Add the ZIP file]
Then, click the triangle icon next to the addon's name, this will open the details and preferences for the addon. Here we set up the folders and cache folders for the addon.
  1. Create a cache folder somewhere on your computer [name it something like 'Cache'], and add it to 'Cache Directory'.
  2. Create a game definition at 'Valve game definitions', name it whatever your want. [Half-life 2 for example, these are presets that include the location of game files]
  3. For 'Game directories', add the game folder from the one in your 'common' folder [In your Steamapps/Steamlibrary folder] that is for the game you need, such as 'Half-Life 2]
  4. For Game VPK archives, add the '.vpk' file with '_dir' [Like 'pak01_dir.vpk'] on the end. it should be in [For Garry's Mod, there is a specific area for the HL2 files, look at the Garry's Mod Section]. For some games, you need the [game]_textures_dir.vpk and [game]_misc_dir.vpk
  5. You do not need to add anything for 'Game wildcard directories
Now, we need to import it into blender. Go to:
File > Import > Valve Map Format [.vmf]
And import the '.vmf' from the folder it was decompiled to.
Leave everything checked unless you want to only add certain things, and click import.
IF you are going to add it into a Software like Unity, make sure to check 'Simple Materials' in the materials section.
There you go. You now have a Source Map within Blender. Please note that switching to the Material Preview may take some time until it applies all materials. All textures will be in the cache folder that was set, but shouldn't be needed as they are applied automatically.
[This is my recommended way, as importing a BSP with SourceIO will only give the map geometry and some textures, no models or entities]

Source Engine - Importing textures

For importing Source textures, you require:
Software
  • Source 2 File Viewer
Blender Addons
  • Source IO
These can be found within their respective sections of the guide.

First, launch Source 2 File Viewer.
Then, do the following:
  1. Click 'Open'
  2. Locate the dir.vpk of your game, and select it
  3. Go to the texture you wish to import to Blender [.vtf], or its folder
  4. Click 'Export as is'
  5. Select the folder you want to export it to, this can be anywhere
If you did Export as is, go into Blender and make sure SourceIO is enabled. This is done by:
Edit > Preferences > Addons > [Add the ZIP file]
Go to File > Import > Source Engine Assets > Source Texture (.vtf) and select it.
Navigate to its location on where you exported it from the .VPK in Source 2 File Viewer, and select it.
Now you have a Source Texture in blender.
Another way is to put the .vtf through VTFEdit, which will give you the raw texture that was used in the .vtf, and then allows you to save it to any file type you want.

Source Engine - Importing materials

For importing Source Materials, you require:
Software
  • Source 2 File Viewer
Blender Addons
  • Source IO
These can be found within their respective sections of the guide.

First, launch Source 2 File Viewer.
Then, do the following:
  1. Click 'Open'
  2. Locate the dir.vpk of your game, and select it
  3. Go to the material you wish to import to Blender [.vmf], or its folder
  4. Click 'Export as is'
  5. Select the folder you want to export it to, this can be anywhere
Now, go into Blender and make sure SourceIO is enabled. This is done by:
Edit > Preferences > Addons > [Add the ZIP file]
Go to File > Import > Source Engine Assets > Source Material (.vmf) and select it.
Navigate to its location on where you exported it from the .VPK in Source 2 File Viewer, and select it.
Now you have a Source Material in blender.

Source Engine - Exporting Models
For exporting Source Models, you require:
Software
  • Crowbar
Blender Addons
  • Blender Source Tools
These can be found within their respective sections of the guide.

Once you have made your model, and Blender Source Tools is enabled, export it as a .SMD file.
Make sure to export it into a folder for your model, as we can't have it unorganised.
Next, in your folder, make a text document, and put in the following:

$modelname "yourmodelpath/yourmodel.mdl" $body "body" "yourmodel.smd" $staticprop $surfaceprop "metal" $cdmaterials "materials/yourmodel/" $sequence idle "yourmodel.smd" loop fps 1 $collisionmodel "yourmodel.smd" { $mass 10 $concave }

Set each "yourmodel" to the name and path of the .smd, and save the file as a .qc file.
After that, open up crowbar and head to the Compile tab.
Make sure you have set up Crowbar with stuff like your game directory, if not follow this guide on how to set up Crowbar.
Crowbar (Modding Tool) Guide by ZeqMacaw

Now, set the output folder to wherever you desire, and the QC file to the one we just made.
Now click the compile button, and in the folder you chose should be a .mdl file.
Source Engine - Part 2
Source Engine - Exporting Materials
For exporting Source materials, you require:
Software
  • VTFedit
This can be found within it's respective section of the guide.

Firstly, a Source Engine material consists of two files, the VTF and VMT.
The VTF contains the texture itself, while the VMT contains the material data.

Creating the VTF files:
  • To make a VTF file, open up VTFedit, go to File > Import and select your image.
  • A pop up will appear, you can search online if you want to look into what each option does, but it is fine as it is.
  • Once imported, go to File > Save as and save it in a folder for your material.
    Repeat this for any other textures, like normal maps, etc.

Creating the VMT files:
  • In VTFedit, go to Tools > Create VMF File
  • A pop up will appear. You will probably only need the Normal map and Base Texture 1
  • You can also go to the options, and change the shader if its water, a decal, etc.
  • Now, click create, and you'll have your VMT.

Once done, put your materials into the game files, or a VPK, your choice.
Source 2

Source 2 - Importing models

For importing Source 2 models, you require:
Software
  • Source 2 File Viewer
Blender Addons
  • Source IO
These can be found within their respective sections of the guide.

First, launch Source 2 File Viewer.
Then, do the following:
  1. Click 'Open'
  2. Locate the dir.vpk of your game, and select it
  3. Go to the model you wish to import to Blender [.vmdl_c], or its folder
  4. Click 'Export as is', or 'Decompile and export'
  5. Select the folder you want to export it to, this can be anywhere
If you did 'Decompile and export' [Which is the best way in my opinion], you'll get the model and it's textures in a use-able format.
Otherwise, go into Blender and make sure SourceIO is enabled. This is done by:
Edit > Preferences > Addons > [Add the ZIP file]
Go to File > Import > Source Engine Assets > Source 2 Model (.vmdl_c) and select it.
Navigate to its location on where you exported it from the .VPK in Source 2 File Viewer, and select it.
Now you have a Source 2 Model in blender.
I recommend extracting the entire VPK, or at least the materials and models sections into a folder.

Source 2 - Importing maps

There are two ways to import a Source 2 map to Blender. If you have a good amount of time, use Source 2 File Viewer, otherwise, use SourceIO.
The difference between the two:
SourceIO
  • Imports geometry, textures, some models, straight into Blender.
  • Doesn't import some models/entities.
Source 2 File Viewer
  • Decompiles the map into a single .GLTF (Each entity in the map can be selected individually)
  • Decompiles every texture as a .tga for all used models and stuff into the selected folder.
  • Takes a good amount of time, does import absolutely everything (can have some issues rarely)

Either use SourceIO:
Export the .vmap or find the .vpk for the map,
Go into Blender, go to file > import > source engine assets > Source 2 Map/Source 2 packed map
Then click either one for whatever choice you made.
Once imported, you'll only see map textures and geometry, no models. Instead you'll see empty objects, these are entity placeholders. To switch them out for their respective models, you should:
  • When selecting one or multiple placeholders, a tool panel will appear on the right tool shelf named SourceIO
  • It will list options about the selected entities, nothing to be interested in for static props and most other things.
  • Select every placeholder, or the ones you want.
  • Head to the Entity Loading section, then you have 2 options, BLVG and Instances.
  • BLVG use custom shader nodes to mimic the Source engine visual style, but only work with Evee and aren't too optimised.
  • Instances is optimised for Blender, and is what I recommend to use.
  • Once an option is selected, select Load Entity.
You MUST select every placeholder or at least the ones you want to show, as it only affects the selected ones.

Or use Source 2 File Viewer:
Go into Source 2 File Viewer and locate the .vworld. It will be in the files, or a .vpk of the map. Then you can right click it, decompile and export, and create a folder for this map and select it as the location to export to. Once done, the map will be exported as a .gltf and every texture (Normals, Height, everything) will also be exported into the folder as a .tga, but please note that this process will take some time, this guide covers it in more detail:


Source 2 - Importing textures

For importing Source 2 textures, you require:
Software
  • Source 2 File Viewer
Blender Addons
  • Source IO
These can be found within their respective sections of the guide.

First, launch Source 2 File Viewer.
Then, do the following:
  1. Click 'Open'
  2. Locate the dir.vpk of your game, and select it
  3. Go to the texture you wish to import to Blender [.vtex_c], or its folder
  4. Click 'Export as is', or 'Decompile and export'
  5. Select the folder you want to export it to, this can be anywhere
If you did 'Decompile and export' [Which is the best way in my opinion], you'll get the textures in a use-able format.
Otherwise, go into Blender and make sure SourceIO is enabled. This is done by:
Edit > Preferences > Addons > [Add the ZIP file]
Go to File > Import > Source Engine Assets > Source 2 Texture (.vtex_c) and select it.
Navigate to its location on where you exported it from the .VPK in Source 2 File Viewer, and select it.
Now you have a Source 2 Texture in blender.

Source 2 - Importing materials

For importing Source 2 materials, you require:
Software
  • Source 2 File Viewer
Blender Addons
  • Source IO
These can be found within their respective sections of the guide.

First, launch Source 2 File Viewer.
Then, do the following:
  1. Click 'Open'
  2. Locate the dir.vpk of your game, and select it
  3. Go to the texture you wish to import to Blender [.vmat_C], or its folder
  4. Click 'Export as is'
  5. Select the folder you want to export it to, this can be anywhere
Now, go into Blender and make sure SourceIO is enabled. This is done by:
Edit > Preferences > Addons > [Add the ZIP file]
Go to File > Import > Source Engine Assets > Source 2 Material (.vmat_c) and select it.
Navigate to its location on where you exported it from the .VPK in Source 2 File Viewer, and select it.
Now you have a Source 2 Material in blender.

Source 2 - Exporting maps

It is possible to import something from Blender into the hammer editor on Source 2.
This will only import geometry, no textures or lights can be exported from Blender.
To do this is quite simple, here is the list of steps required to export your map from Blender to Source 2:
  • Once you have completed your map in Blender, go to File > Export and select either .obj or .fbx [I recommend .fbx[
  • Now, open up the Hammer editor. For this I am using CS2, but any Source 2 Hammer Editor will support this.
  • Now once you have loaded up your map, go to File > Import file...
  • This will bring up your file explorer/viewer, using this you can locate your .obj or .fbx file to select it and import it.
Now you have your map within Hammer.
This does not work with lights or materials.
I still recommend making your map in the Hammer Editor rather than making it in Blender then importing into Hammer. I don't recommend doing this to add props or models to your map, as they will not be treated as a prop or model, but rather as meshes.

Source 2 - Exporting models

To export your model from Blender into Source 2 as a model, you will need to use the ModelDoc Editor. Here is a list of steps showing how you can export models into Source 2.
  • Firstly, export your model as a .fbx or .obj from Blender.
  • Next, open up the ModelDoc editor from the asset browser after launching your workshop tools.
  • On the lower half of the newly opened window, it will say create new. Double click the word "Model" underneath file type.
  • In the favourites list, there'll be a button labelled Add Mesh, select it, go to your model, and import it.
  • After, select the "Needs Compiling" button, and select where you want to save the compiled model.
Once compiled, you should see your model in the ModelDoc editor, as a red wireframe.
Source 2 - Part 2
Source 2 - Exporting Materials
While we can't directly export from Blender, we can make materials that contains our maps, along with adjustments and effects you can add in the material editor.

To add our material (Assuming that you have already added a model, if not please do):
  • Click the Add button (Large, has a blue + symbol)
  • In the popup, search material, and select DefaultMaterialGroup
  • Now all materials you added in Blender will appear on the side (Like their slots, but with the name of the original material).
  • Go to the top left, select tools, and open the Material Editor.
  • Select new, then save and name your material.

Now a blank white sphere should appear, which means you have made a new material.
In this section, you can add your material maps, like normal, roughness, etc.
To add your material to the model, head back to the ModelDoc Editor, go to the material slot you just made a material for, select the magnifying glass shaped button under your material.
Now a new pop up will have appeared. Search for the name of your new material, and select it.
Now compile it, and your model will have the added material.

With these models, you can do stuff such as animations, bodygroups, material groups, etc. I will not cover them due to how much there is, but this video will help:
Harry101UK - Source 2 Filmmaker Tips and Tricks - Importing Custom Models
Goldsrc

This section is shorter due to it being simpler and the limited options on what to import
GoldSource - Importing models

Required Blender Addons:
  • SourceIO
Go into Blender, and make sure SourceIO is enabled:
Edit > Preferences > Addons > SourceIO [Add the ZIP if it is not there]
Go to:
Files > Import > Source Engine Assets > GoldSrc Model (.mdl)
Go to the game's folder in your common folder [Which should be in your Steam > Steamapps or Steam Library folder]
Go to the models folder
Select the model and import it [.mdl]
Now you have a GoldSrc Model in Blender

GoldSource - Importing maps

Required Blender Addons:
  • SourceIO
Go into Blender, and make sure SourceIO is enabled:
Edit > Preferences > Addons > SourceIO [Add the ZIP if it is not there]
Go to:
Files > Import > Source Engine Assets > GoldSrc Map (.bsp)
Go to the game's folder in your common folder [Which should be in your Steam > Steamapps or Steam Library folder]
Go to the maps folder
Select the model and import it [.bsp]
Now you have a GoldSrc Map in Blender
Garry's Mod





Garry's Mod Addons
Garry's Mod Addons are stored in:
Garry's Mod/garrysmod/addons
To extract the .gma, you can use multiple softwares:
  • gmad.exe - in the bin folder of Garry's Mod, you need to use it with CMD.exe
  • Gm Publisher - a Gmod publishing app that publishes, updates, downloads and extracts workshop addons
  • Google some - there's a lot

Once done, you will have access to the files. Use the Source section to understand how to use them with Blender.

Where the HL2 content is stored
In Garry's Mod, the Half-life 2 [All the props, textures, etc that aren't Gmod specific] will be in:
[Steamapps/SteamLibrary folder]/common/Garry's Mod/sourceengine/hl2_misc.vpk or hl2_textures.vpk
hl2_textures contains all textures apart from the ones used in models/props, which are stored in hl2_misc.vpk
Use the Source Engine section to understand how to use them with Blender!
Other
Other
  • For any other games, use each section from which engine the game is.
  • If something does not work and you are struggling, make a comment, or just google it.
  • If you cannot find or do not have the assets, try asking others for help, or search online for the models.
  • If a software is no longer downloadable, try to google another download of it, and/or comment about it so I can update the guide
  • If there is a better way to do something not stated in this guide, comment it, it'll be useful to us all
Conclusion
Thanks for reading this guide!
I hope this guide helped, and if it didn't, leave a comment or ask another person for help.
Feel free to leave a like or favourite the guide, I'll appreciate it!
If there's something you feel should be changed, included or removed from the guide, comment and let me know.
I really hope this helped!

Click this for more guides!
44 Comments
Nemesis Apr 20 @ 8:53pm 
This is gonna help me a lot, thanks hobogobby, you da best beast to ever beast the beasts.
RusticVoid Mar 22 @ 11:31pm 
okay thank you its probably the origin i used a base game model for the base but the origin seemed to messed up so i look into that
zonked  [author] Mar 22 @ 2:03pm 
That doesn't sound like an issue related to this guide, mainly just your model. It's most likely an issue with the bones, animation or your pivot point/origin is not aligned properly.
RusticVoid Mar 22 @ 12:28am 
im working on a custom weapon but for some reasoning the view bobbing it WAY to high but when i use base game models it seems just fine?
foxylove361 Nov 26, 2024 @ 5:51am 
I'll try that, thanks
zonked  [author] Nov 25, 2024 @ 3:22pm 
Are you sure you selected the .BPS correctly? Try re-installing the addon. I recommend checking out their Discord for answers,
foxylove361 Nov 24, 2024 @ 11:00pm 
The exact error it's giving me every single time
Python: Traceback (most recent call last):
File "C:\Users\foxyl\AppData\Roaming\Blender Foundation\Blender\4.2\scripts\addons\SourceIO\blender_bindings\operators\goldsrc_operators.py", line 45, in execute
bsp.load_map()
File "C:\Users\foxyl\AppData\Roaming\Blender Foundation\Blender\4.2\scripts\addons\SourceIO\blender_bindings\goldsrc\bsp\import_bsp.py", line 107, in load_map
self.load_entities()
File "C:\Users\foxyl\AppData\Roaming\Blender Foundation\Blender\4.2\scripts\addons\SourceIO\blender_bindings\goldsrc\bsp\import_bsp.py", line 251, in load_entities
wad_file = self.bsp_file.manager.find_path(game_wad_path)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
AttributeError: 'ContentManager' object has no attribute 'find_path'. Did you mean: 'filepath'?
foxylove361 Nov 24, 2024 @ 10:51pm 
well now windows 10 just doesn't want to function with goldsrc at all
foxylove361 Nov 11, 2024 @ 12:49am 
It was, tried on Win10 and it worked perfect, even got all the npcs. Hopefully more support get's added one day :gordon:
zonked  [author] Nov 4, 2024 @ 4:08pm 
Yeah it must be, Linux just isn't really a supported system for many things, one of its biggest downsides.