STEAM GROUP
Blender Tutorial Community BlenderTuts
STEAM GROUP
Blender Tutorial Community BlenderTuts
31
IN-GAME
204
ONLINE
Founded
October 16, 2012
Language
English
Location
United States 
Mooses Suuri Aug 29, 2014 @ 8:39am
Self illumination and shining effects.
I've been making a weapon and I'm on the texture step. What i'd like to know is: how can I make a certain part of my texture shining while the rest of it is self illuminated?
< >
Showing 1-5 of 5 comments
ShinobiFreedan Aug 29, 2014 @ 10:17am 
Hi Mooses,

Glowing / Shiny effects on Source Engine models are accomplished through the use of an Alpha channel. An alpha channel is simply a black and white image ... the brighter the area of an Alpha channel, the more shiny an object will be. Depending on what program you are using for your texture, there are different methods for applying an alpha channel to your texture. There are plenty of tutorials for GIMP and Photoshop concerning applying Alpha channels.

Keep in mind that shininess will not show up in-game unless you set it up in your QC file. I don't really know anything about code, but I can help you out with textures and modelling. Someone else here can probably help you with the coding aspect of making a weapon shiny.

Also, concerning glowing textures, this article may be helpful: https://developer.valvesoftware.com/wiki/Glowing_Textures

A few tips for making your Alpha channel (Note that before every one of these steps, you should save a backup!! It will save you a great deal of headache. I know from experience ...):

1. VERY IMPORTANT Be sure to include a base layer in your texture file with the flat colors of your texture (A.K.A. A layer without shading or details). You will need the ability to select entire portions of your texture based on their color. Don't edit this layer, unless you are planning on changing the color scheme of your weapon.
2. Once you are happy with your texture, save a desaturated (uncolored) version of your texture. Make sure that this version includes shading and details. Open it as a layer in your program of choice.
3. Using your base layer, select portions of the weapon's texture (I would select them by color, if you're going to base shininess off of color) to adjust. Using these selections, go to the desaturated layer, and make those portions either lighter or darker, depending on how shiny you want them to be. This will take some experimentation in order to find the right look. Save the edited desaturated image.
4. Open your desaturated image in your texture file and make it your Alpha channel.
5. Check the weapon in-game. If you don't like how it looks, adjust the Alpha channel.
CaptainGoodstuff Aug 29, 2014 @ 8:30pm 
To add to this, you need to put a line in your .vmt file that says (with the quotations included):

"$basemapalphaphongmask" "1"

This points to the alpha channel of your texture. Self-illuminated things, as in if you want something to actually glow in the dark, use a self-illum mask. I'm not absolutely sure how these work but I know a little from looking at other weapons with this feature. Basically, make a copy of your texture, then make everything black that you don't want to emit light. If you want something to shine (and I mean SHINE, as in glow like a light) make it white. Make the white duller or brighter depending on how intense you want the glow. Then save the new texture as a vtf and put it in the same folder as your main textures.

Now in your .vmt, write these lines:

"$selfillummask" "folder_path_to_textures/filename"

"$selfillum" "1"

Again since your self-illum texture vtf should be in the same folder as your main textures, the filepath should be the same as what's written next to "$basetexture" except with the correct filename at the end. If this doesn't work exatly, realize that this is just what I'm seeing on another weapon that I know works. I haven't done it myself, but this should get you started.

Also I found this in valve's dev wiki, take a look and see if they explain it better https://developer.valvesoftware.com/wiki/$selfillum
Mooses Suuri Aug 30, 2014 @ 12:39am 
Thanks for the replys I'll start experiment my texture today and i'll post questions here if I have something to ask.
ShinobiFreedan Aug 30, 2014 @ 8:42am 
You're welcome. Good luck!
Mooses Suuri Sep 7, 2014 @ 10:39am 
I finally got time to texture my weapon and thanks to you guys I got the self illuminate effect working properly :D Thanks for your help and I hope I can submit my item to workshop someday next week!
< >
Showing 1-5 of 5 comments
Per page: 1530 50