Source Filmmaker

Source Filmmaker

256 ratings
How To Use $emissiveblend
By Chaotix
Glow stuff and make it look very nice I guess.
   
Award
Favorite
Favorited
Unfavorite
DISCLAIMER
This guide is over three years old and since then I've learnt there's a much better and easier way of creating this same effect using $selfillum. Whilst some of the steps here are similar, there are less VMT parameters to worry about and you shouldn't have to deal with any weird texture errors with the dev/null texture. I don't plan on making a guide for this, at least not for a while. But if you want to learn how to do this yourself, I highly recommend looking at the Valve Developer Wiki. It should hopefully give you a rough idea of what you'll need to do.

https://developer.valvesoftware.com/wiki/Glowing_Textures#.24selfillum
Stuff You Need
  • Source Filmmaker (obviously)
  • Whatever you want to glow (for this guide, it will be the Cosa Nostra Cap.
  • VTFEdit (Download here.[nemesis.thewavelength.net])
  • A good image editor, one that can open Targa files (.tga). You'd preferably want one with access to layers and channels. I use Photoshop for this guide.
  • A good text editor (Notepad++ is easily the best one. Download here.[notepad-plus-plus.org])
  • Some patience
1 | Texture Extracting
First off, you'll want to find the texture of the hat/cosmetic/model/whatever. For the Cosa Nostra Cap, along with a few other spy hats, it will be located here.

Steam\steamapps\common\SourceFilmmaker\game\tf\materials\models\player\items\spy\spy_gang_cap.vtf

Of course, other hats, especially if downloaded from the workshop, will be located elsewhere. The addon's workshop page should have a list of where everything's located however.

Once you're there, you'll want to find the hat that you're looking for.

This guide is very useful for finding what your hat's name is.
https://node2.projectplanet.cn/@steamcommunity.com/sharedfiles/filedetails/?id=395367659

Once you've found your hat name, open up the VTF in VTFEdit.
You should see something like this.

Go to File > Export and save it wherever.

2 | Texture Editing
Once you've extracted the texture, open up the targa file in your image editor of choice, in this case, Photoshop.

It's at this point that you need to decide what part of your hat do you want to be glowing. For this, I want the ring around the hat. For some cosmetics, this might be easier than others. For this, this one is fairly simple.
What you need to do is colour the parts you don't want to be glowing in black. (#000000)

















Next off, you want to colour the parts you do want glowing as pure white. (#FFFFFF)
Again, this can be easier than others with certain cosmetics.

















If it looks fine, then export it as a targa. Even if you don't think it has, I'd save it with alpha channels in case it breaks something.

Note that I'm NOT going to tell you how to actually make certain parts of the image white or not. This is an SFM tutorial, not a Photoshop one.

Once you've finished that, we open up VTFEdit again!
3 | Back to VTF
Once you've gotten your edited targa file, open up VTFEdit again. Go to File > Import.

As far as I know, none of the settings when importing have any effect so just click OK.

Once imported, just go to File > Save As, then give it a name, for example, "cosaglow".
That easy.
4 | Actually Using It In SFM
Here's the big one. Once you've gotten your edited VTF, paste it in the same folder as the original.

Once pasted, go into the hat's VMT using Notepad++.
Now, paste this before the last closed curly bracket (it looks like: } ). I'm not really sure if this matters or not but it's worth doing anyway.

"$emissiveBlendEnabled" "1" "$emissiveBlendTexture" "dev/null" "$emissiveBlendBaseTexture" "YOUR/TEXTURE/FOLDER/HERE/texturename" "$emissiveBlendFlowTexture" "dev/null" "$emissiveBlendTint" "[1 1 1]" "$emissiveBlendStrength" "1" "$emissiveBlendScrollVector" "[0.0]"


Replace "YOUR/TEXTURE/FOLDER/HERE" with whatever is on $basetexture. For us, it's:

models/player/items/spy/spy_gang_cap
When replaced, delete the last name and replace it when your edited vtf's name. It should look like this.

"$emissiveBlendEnabled" "1" "$emissiveBlendTexture" "dev/null" "$emissiveBlendBaseTexture" "models/player/items/spy/cosaglow" "$emissiveBlendFlowTexture" "dev/null" "$emissiveBlendTint" "[1 1 1]" "$emissiveBlendStrength" "1" "$emissiveBlendScrollVector" "[0.0]"

Afterwards, it should look like this!


Now, if SFM is already open whilst you were doing all that with your hat and everything, then go into the console and type:

mat_reloadallmaterials

Otherwise, launch SFM and open your model. And tadaa~!!

Now if you just wanted it to be a white glow, then you're finished here. But you probably want to recolour it, don't you? Well, move on to the next step.
5 | Colouring The Glow
After everything you've done, this is probably the easiest part.

Right click on your model and click "Add Override Materials". Then right click again, go to "Show In Element Viewer" and click "Model".





When in the Element Viewer, go down to materials and find the material that corresponds to whatever you want. In our case, it's just the red Cosa Nostra Cap, so go down to "spy_gang_cap".



Right click on "spy_gang_cap", go to "Add Attribute" and select "color".



When asked for input, just paste in:
$emissiveBlendTint



Once done, you'll notice that your hat/model's glowy parts are now back to normal. But if that happens then congratulations! You've finished and can now edit the colours in a handy little colour palette.


Optionally, you can use this command in console if you want your model to be grayscale (except for the glowing parts).

mat_fullbright 2

And that's all, folks!
Examples
Here's some examples that I've made using this method. (Note that all of these have been photoshopped as I usually disable bloom).

https://node2.projectplanet.cn/@steamcommunity.com/sharedfiles/filedetails/?id=1722446080

https://node2.projectplanet.cn/@steamcommunity.com/sharedfiles/filedetails/?id=1722447164

Special Thanks
Huge, huge, huge, HUUUUUUUUGE thank you to Fames for the original guide that inspired me to make this guide explaining how to use this in more detail, and for being a cool guy in general. His guide has plenty of other very useful SFM stuff that could be very useful depending on whatever you're doing.

https://node2.projectplanet.cn/@steamcommunity.com/sharedfiles/filedetails/?id=1716880745

The reason why I made this guide is because I got a bit confused on how to use emissiveblend so when I've learnt how to do it, I wanted to share it with everyone else in case they get stuck on it as well.

As for me, farewell!

If you enjoyed this guide, give it a thumbs up, or maybe a favourite! I do commissions as well, so if you want something like this, don't be afraid to ask! 👀

Also before commenting, please make sure you've followed the whole tutorial as I won't be able to help you out otherwise.
25 Comments
egc01 13 Mar @ 7:50pm 
it's emmisive but it's a missing texture
dsaS 16 Nov, 2023 @ 10:18am 
Machine Gamer 728 13 Nov, 2023 @ 5:21pm 
thank you oh wise one for enlightening us in the ways of the Source Filming creator.
It's people like you who help to keep this thing alive.
AveryHyena 9 Sep, 2022 @ 10:26pm 
@steeledgator Selfillum masks work perfectly with GIMP for me. White = maximum glow and black = no glow. If there is any color, this will also tint the color of the glow and affect the brightness. You can also use $selfillumtint to affect brightness and tint. If it isn't working, you can add me on discord and I'll teach you.
steeledgator 9 Sep, 2022 @ 8:13pm 
I don't know if I'm stupid and can't find a GIMP tutorial, but emissive blend mapping in GIMP does seem impossible. You can still make a regular glowing map and do some crimes in vmt formatting, but it doesn't come out nearly as bright
Chaotix  [author] 17 Jun, 2022 @ 5:50am 
@Rejoltence
Thank you very much for the tips. Admittedly I still need to learn a lot more about SFM so if there's anything I mess up on, that's on me. It wasn't my intention to spread any misinformation by making this guide and that's why I originally took it as a personal attack at first.

I'll leave a disclaimer at the top of the guide with a link to the dev wiki to let people know there's a much easier way of doing this at the very least.
AveryHyena 16 Jun, 2022 @ 4:25pm 
@Chaotix
It is also bad practice to edit the VMT like this, and then use an override in SFM by default. You should really just default to saving everything to the VMT, and only use overrides if you know you will only be using that setting for the one session you're in. Finally, you don't really "need" notepad++ as you're only dealing with one VMT.
I was not trying to be "antagonistic", this is just how I talk. Also, don't feel like you need to make an updated guide for $selfillum; anyone who would like to know anything about any material parameter can just go to https://developer.valvesoftware.com to read about anything they want from a detailed, reliable source. It's how I learnt everything myself. Teach people how to fish, don't just give them the fish.
AveryHyena 16 Jun, 2022 @ 4:25pm 
@Chaotix
Please do not act like this is a personal attack, I said the guide was bad, not you yourself; you don't have to make excuses.
Additionally, $selfillum is definitely not "basically identical" to $emissiveblend, or what you've put in this guide. $emissiveblend is specifically for animating textures through flowmaps, it's a waste to use it on simple static textures. For example, in your guide, it contains 4 more material parameters than $selfillum that need to be set. Your guide also suggests using vtfedit to export the VTF files to TARGA, which is completely unnecessary and could cause people to trip up while reading this guide, and of course wastes people's time. I edit and save VTFs in GIMP, with no need to export to another format.
Chaotix  [author] 16 Jun, 2022 @ 5:22am 
Hi, I very much appreciate the fact that there's a much easier and much more flexible way of doing this sort of thing.

The reason I made this guide specifically was because of Fames' guide on weird SFM quirks and it was my understanding that this was the only way of making certain parts of an object glow. I completely understand if you thought that I was making a terrible guide, and to be honest, I thought it wasn't great either. This was my first SFM guide and one that I made three years ago, so naturally I wasn't exactly well versed in all of the weird commands and VMT parameters. I'm surprised this guide helped as many people as it did.

I may eventually make an updated version using $selfillum as opposed to $emissiveblend once I figure it out (from your comment it seems basically identical to this guide). As of right now though, with me being busy doing other things, it's unlikely. Still, I very much appreciate your input, regardless of how antagonistic it felt at first.
AveryHyena 16 Jun, 2022 @ 4:05am 
@Impactmagmaocean
All you need are three material settings, and a mask texture:
$selfillum 1 //To enable self illumination
$selfillummask <texture> //A dedicated mask texture where black = no effect and white = 100% brightness. Any color that is not greyscale tints the glow effect.
$selfillumtint "[R G B]" //For brightness and color tint adjustments. Default is "[1 1 1]"
To read more, go to the Valve Developer Community here: https://developer.valvesoftware.com/wiki/Glowing_Textures#.24selfillum

If you need any more help, feel free to add me on Steam and I can walk you through anything you need help with.