Make certain parts of a texture glow?

Got problems with your models? Struggling with textures? Get help with your custom assets.

Make certain parts of a texture glow?

Postby LimestaX on Sun Jun 15, 2014 5:35 pm

I have been working on a map with a few custom textures, and I want to make a texture $selfillum, but only it self-illuminates the whole texture, so I was wondering if there would be a way to self illuminate specific parts of the texture? I haven't been able to find a specific tutorial on how to do it.

Here is an example, I would like to light up the just the Cyan Parts, can anyone explain to me the process?
Image
LimestaX
Dumpling
Dumpling
 
Joined: Sun Jun 15, 2014 5:27 pm

Re: Make certain parts of a texture glow?

Postby WhiteDevil on Sun Jun 15, 2014 6:13 pm

You need to make an alpha channel to your diffuse to tell source what parts of the texture you want to illuminate.
Any decent image software can edit alpha channels.
User avatar
WhiteDevil
Been Here A While
Been Here A While
 
Joined: Sat May 28, 2005 1:09 pm

Re: Make certain parts of a texture glow?

Postby LimestaX on Sun Jun 15, 2014 7:35 pm

I made this Alpha in photoshop, VTFEdit doesn't auto-create a proper alpha channel with any of the settings I have found, is there a way I can do it in the VMT manually?
Image
Code: Select all
"LightmappedGeneric"
{
   "$basetexture" "cbn/cbn_octile_cy"
   "$surfaceprop" "Metal"
   "$selfillum" 1
   "$alpha" "cbn/cbn_octile_alpha"
   "%keywords" "cbn"
}

Since using alpha like that didn't work I instead used "$alpha" "G", what this did is it took the Green Channel's Alpha and i ended up with this neat affect:
Image
The texture shows up only with a dynamic light shined to it, revealing the texture, with it's alpha channel.
Still, not what I wanted.
So instead I tried without selfillum, same effect.
So then I went a little deeper and tried "$selfillummask" "cbn/cbn_octile_alpha", no affect, what i did then was I re-made cbn/cbn_octile_alpha, with transparency, literally removing the black, no effect.

Any advice? How would I set up Alpha Channels with VTFEdit automatically to detect the black when creating an alpha layer?
LimestaX
Dumpling
Dumpling
 
Joined: Sun Jun 15, 2014 5:27 pm

Re: Make certain parts of a texture glow?

Postby jimonions on Mon Jun 16, 2014 6:53 am

I would suggest using the vtf plugin for photoshop so you can set the alpha channel yourself straight from there. I use the one for gimp and it works great, just need to collapse all layers and set a layer mask before export. Not too sure about photoshop though.
Also source will only recognize black as transparent with the $translucent or $alphatest paths.

https://developer.valvesoftware.com/wik ... VTF_Plugin
User avatar
jimonions
Regular
Regular
 
Joined: Tue Feb 01, 2011 10:41 am

Re: Make certain parts of a texture glow?

Postby [Steve] on Mon Jun 16, 2014 9:31 am

im not entirely sure what you mean, are you saying vtfedit doesnt import the alpha channel of your texture correctly?
because it works for me fine.
Just save as a tga from photoshop, then when using vtf edit to import set alpha format to dxt 5.
your alpha should then be the same as in photoshop.

To glow use "$selfillum" "1" which will make the white parts of your alpha channel glow.
User avatar
[Steve]
Interlopers Staff
Interlopers Staff
 
Joined: Fri Mar 06, 2009 11:25 pm

Re: Make certain parts of a texture glow?

Postby kraid on Mon Jun 16, 2014 6:15 pm

I've done a little example.
http://www.mediafire.com/download/fnjx2g5wgx2671w/Sellfillum_test.zip
Inside this pack you will find a .tga with the source image i used, as well as the vtf and vmt of the texture.
Also there's an example map bsp and vmf and a .rad file that enables the texture to actually emit light (texture light).

The .rad needs to be put into the base directory of your game/mod and has to have the same name as the map.
Ofc. you can also open the file with a text editor and put the line into the lights.rad that should be allready there.

The rest of the files i think you know where to put them.

If you want to compile a texture yourself, it has to be saved as 32bit (8 bits per channel RGB=24bit, RGBA=32bit) with an existing alphachannel. You cannot create one automatically.
Also you have to choose one of the vtf formats that include an alphachannel, such as DXT5 (compressed) or BGRA8888 (uncompressed).
Goldeneye Source v4.2.3
get it now and play for FREE!!!
http://www.goldeneyesource.net
kraid
Been Here A While
Been Here A While
 
Joined: Thu Jan 22, 2009 12:09 pm

Return to Custom Asset Help

Who is online

Users browsing this forum: Google [Bot]