On this page, i will explain how to setup Valve's source filmmaker tools leftover in the beta, tricks you can perform with the tool and how to fix technical problems with the program. I will also periodically post my own films (Accidental Apocalypse Studios) or other SFM related works. If you have any tips or things you'd like posted here, e-mail me.

Tuesday, January 19, 2010

Custom Maps in SFM (written by me)

Edit: here's a link to the files needing changing: The password is facepunched

After having some extra time after mid-terms today, (which took forever!) I managed to scrap together this tutorial on my own discovery in SFM; how to get custom maps (or in this case, newer updated maps) to work in the TF2 beta. This is not fool-proof, as it has not been tested with anything other then the retail TF2 maps, but i will go under the assumption that it does. That being said, you will need the following:

A hex editor, like Hex workshop(not free, trial only), Notepad++ (free) with a hex editor plugin or any other program able to edit hex.

Let's get started...

Step 1: Create a folder somewhere and call it TF2 materials backup or something similar. Find the TF2 GCF and open it. Go to tf/materials and click on the materials folder. Right click-extract to the folder created earlier.

Step 2: This is the long part. Go to the folder you where you just extracted. It should look like this.

Look for "brickwall001.vtf". This is the first vtf file in this folder. We are going to be changing the vtf version of each vtf file. Drag your mouse over-top of a vtf file. A small window should display info on the file, including the version. (see pic) If it says version 7.1, 7.2 or 7.3, we don't need to change anything. In this case, "brickwall001.vtf" is 7.3, so we can skip it.

What we want to change is version 7.4. Let's find a file that is version 7.4. Scroll through the vtf's and vmt's until you see "cobblewall001.vtf" Notice how it says version 7.4.

Right click on the version 7.4 file and open it with your hex editor of choice.

Step 3: Hex editors work with bits, which are text code that make up most files, in this groups of 2 numbers.

The highlighted text is one byte.

They are labeled as specific offsets (in this program, it's in the bottom left.) displayed in the format "0x00000000". The last digit increases by one for every byte. For example, the first 2 numbers are 0x00000000 and the second 2 number are 0x00000001. Very simple. So, the only thing we need to do is find offset "0x00000008" and highlight it.

After you've highlighted it, type in "03". The hex should look like this:

Press save after everything is in order.

Step 4: Repeat steps 2 and 3 for every vtf file. ( you can skip the player models folder unless you want that chnged).

Step 5: Took awhile, eh? Make a new folder in your beta's tf/ folder called material_extract or something similar. Open up pakrat and navigate until you find a vtf file with the letter "hdr" at the end of the filename. Hold down control and select them all.

Then hit save and place them into the folder we created earlier. (Some custom maps will have other materials that may be 7.4, namely TF2 or Garry's mod custom maps. If you load it up in game and you get purple and black checkers, try and see if that's the issue.)

Step 7: Repeat step 3 on the files you just extracted.

Step 8: Temporarily copy and paste all the edited hdr materials (and possibly others) into the normal beta materials folder (only if it's a tf2 map, if not, edit the directory text by hand in Pakrat) In Pakrat, highlight the hdr materials again and make note of the directory structure because you want your edited versions to keep the same structure. Click Add in Pakrat and repeat the control click import process. Once the edited material files are in place, click file-save BSP.

Step 9: Make a backup copy of your TF2 beta materials folder and (if you are replacing) map file. Delete the folders you edited in materials, but not the one's that you didn't by control clicking. Then, copy the edited TF2 GCF materials and map(s) into their respective spots in the TF2 Beta's folder.

Step 10: Load up the beta and test it out! Your sky and/or textures should now all be fixed!

NOTE: this took me about 3 hours to complete for the base TF2 files (this would apply to any other vanilla or unedited source materials). After you do it once, though, each individual map only takes about 15 minutes depending on the amount of textures. This method might not apply for game specific entities or other things not in the beta's code.

Post any questions below. Don't post asking where to get stuff or the beta, as i cannot and will not tell you. If you know how to code, it would be awesome if you could setup batch conversion program for this whole process.


  1. My custom maps' water texture always ends up purple. I know this is a result of buildcubemaps not working, and I have tried building the cubemaps in the official TF2. Re-running the map in the beta doesn't work, and buildcubemaps doesn't work.

    Is there a way to prevent reflections? So far my only solution is to delete the water textures completely.

    Also (off topic) when I render my movie the sound doesn't work. Am I supposed to render the movie and sound separately? Either way the movie (which is supposedly 24 seconds long) ends up being 22 minutes, as well as the accompanying .wav file (also 22 minutes long).

    Cheers if you can help me out, thanks!!

  2. P.S.

    Maybe I'm blind, but I can't find your email anywhere. Is there a steam group or something I could join relating to the SFM? Or maybe a group help thingy? You recruiting members?

  3. P.S.S.

    Multiple Demomen's stickies will not be recorded. Only the first set of 8 stickies will be recorded. Or perhaps I'm doing something wrong, but my experimentation with trying to re-make "Meet the Demoman" tells me so. Further testing pending.

  4. If u made the custom map yourself, i think you did not added env_cubemaps

    env_cubemaps make the water normal so non purple ;)

    For the demoman problem idk because i get a fucking error when i wanna start hl2_shortcut.exe

  5. Whazaaaa, If the cubemaps builded properlly in in the official TF2 with no problems, stands to reason why it wouldn't work in the beta.

    Thats the problem: it doesn't work.

  6. There's now a quicker way to most of this if you use VTFLib. I'll update it later as this already took forever to type. God, this blog is taking off. I have a steam group for my own machinima productions, but not SFM. I'll update my profile info to include contact info btw. Cheers!

  7. Man, I'm too lazy to do all this shit, hope you update the quicker way quickly

  8. Can you PLEASE upload the quicker way? it would make things a whole lot faster

  9. i still dont know it, i was tipped off that you can use the program mentioned above to do it.

  10. Hi,
    Nice post! You have worked hard on jotting down the essential information. Keep sharing the good work in future too.


  12. I agree with all of the points keep up the good work.

  13. This is a very very nice awesome work !!!

  14. it's quite helpful to us to find reliable essay writing services. Congratulations!!!!!!!!!!!! Thanks for sharing....

  15. that is so pretty! what a fantastic idea.

  16. I agree with all of the points keep up the good work.

  17. Hello, i feel that i noticed you visited my weblog thus i came to go back the want?
    .I'm attempting to in finding things to improve my site!I suppose its ok to use a few of your ideas!!

    Here is my blog: pornstars video s