Adding Glowmaps to Source

How would i do this? I’m porting the SJ Sathanas from Freespace 2 it it is supposed to glow red. Could someone help?

You could try with $selfillum, and adding the mask in the alpha channel of the texture. It will glow in the dark.

If you want it to actually glow, you might need to attach a particle to it or something.

Well, the glow is a different texture entirely, and the model should look like this



"VertexLitGeneric"
{
	"$baseTexture" "models\cars\shift_vw_golf\guage"
	"$selfillum" "1"
	"$selfillummask" "models\cars\shift_vw_golf\guage_selfillum"
}


or



"VertexLitGeneric"
{
	"$baseTexture" "models\cars\shift_vw_golf\guage"
	"$selfillum" "1"
}


In the second case it will take selfillum data from alpha channel (no color data, just intensity).

This is not glow, this is just color illumination in dark, for glow you need particles as he said. Selfillum looks like this: http://shrani.si/f/2f/nv/1UliwvQF/countryside0003.jpg
Difference between this and glow is that this does not emmit light which could then interact with environment around it (like hit a wall and light it up in red).

Try using the glow texture you have for selfillum texture and see if youre satisfied with the results. If not, then someone will have to come who knows a thing or two about particles I guess.

I usually add a $selfillumtint and proxy code to make it glow with some kind of animation :


	"Proxies"
	{
		"Sine" 
		{
			"resultVar"	"$selfillumtint[0]"
			"sineperiod"	"3"
			"sinemin"		"0.6"
			"sinemax"	"2.4"
		}
		"Sine" 
		{
			"resultVar"	"$selfillumtint[1]"
			"sineperiod"	"3"
			"sinemin"		"1"
			"sinemax"	"4"
		}
		"Sine" 
		{
			"resultVar"	"$selfillumtint[2]"
			"sineperiod"	"3"
			"sinemin"		"1"
			"sinemax"	"4"

		}

	}


I could do that if the model required the texture, which my model texture path finder says it doesn’t.

You mean your model doesnt require the glow texture or it doesnt require any texture? In the first case it doesnt matter, as long as you have everything set up for diffuse you can just add those lines in vmt and it will work, but if you dont have textures set up at all youll have to reexport with textures applied and then compile with texture path set-up in qc.

Since the glowtexture is entirely separate, it says it doesn’t require it.

Well yes, it doesn’t require it but you can still add it if you want.

you can set up a seperate glow texture via detail maps.

Set the detail type to uh 5 I think and detailscales to 1.

what would the code for that be?




"VertexLitGeneric"
{
	// Original shader: VertexLitTexture
	"$basetexture" "models\kit\wasea\Kit_part_armour_dif"
	"$bumpmap"     "models\kit\wasea\Kit_part_armour_nrm"
	$phong 1
	$phongexponent 100
	$phongtint "[1 1 1.2]" 
	$phongboost	1
	$phongfresnelranges	"[ 0.5 3 6]"
	$halflambert 1

	"$rimlight" "1"
	"$rimlightexponent" "150"
	"$rimlightboost" "0.25"

$color2 "[2 2 2]"
**
$detail "models\kit\wasea\Kit_part_armour_detail"
$detailscale 1
$detailblendfactor "3"
$detailblendmode 5
**
$envmap			env_cubemap
$normalmapalphaenvmapmask 1 

}


well the model’s glow should be pulsing a bit. is anyway to do that?

Animated texture? (not sure if it can be done for non-diffuse maps though). Take a look how this guy made it: http://www.gamebanana.com/css/skins/38695 (inside his vmt). But im pretty sure it can be done other way, not 100% though but I think I once saw in a vmt something with pulses or similar which didnt require animated diffuse.

This one was done with an animated illumination map but that might not be how you will have to do it.

Use a sine material proxy such as the one given by Ferdam.
I think you have to set the proxy to change $detailblendfactor instead of $selfillumtint.

Never make an animated texture unless you know it’s absolutely necessary. In this case it’s certainly not.



"VertexlitGeneric"
{
	"$basetexture" "models/kit/weapons/SMG/kit_smg_diff"
	"$bumpmap" "models/haxxer/weapons/SMG_B/WPN_CR2b_Norm"

	"$phongexponenttexture" "models/haxxer/weapons/SMG_B/WPN_CR2b_Spec"
	"$phong" 1
	"$phongboost" 0.1
	"$phongexponent" 1
	"$phongtint" "[1 .85 .85]"
	"$phongfresnelranges" "[.5 .85 30]"
	"$phongalbedotint" "1"
	"$detail" "models/kit/weapons/SMG/kit_smg_blend"
	//"$detailframe" "3"
	"$detailscale" "1"
	"$detailblendfactor" "1.25"
	"$detailblendmode" "5"
 "Proxies"
   {
      "AnimatedTexture"
      {
         "animatedtexturevar" "$detail"
         "animatedtextureframenumvar" "$detailframe"
         "animatedtextureframerate" 12
      }
   }
	"$model" 1

}


EDIT: nvm, fixed it thanks guys!