Shiny Spikes

MechaBowser

L1: Registered
May 17, 2009
32
0
Hi. I'm making a map where there's spikes on walls. I want them to look sharp and shiny, so I was thinking of making them be super reflective.

This is my VMT (almost entirely copied from the Medic's mirror):

Code:
"LightmappedGeneric"
{
	"$basetexture"			"tf2ware/map_textures/white_shiny"
	"$surfaceprop" 			"metal"
	"$bumpmap" 			"models\effects\flat_normal"
	"$envmap" 			"env_cubemap"
	"$envmaptint" 			"[2 2 2]"
	"$basealphaenvmapmask"		 1
	"$phong" 			"1"
	"$phongexponent" 		"25"
	"$phongboost" 			"12"
	"$lightwarptexture" 		"models\lightwarps\weapon_lightwarp"	
	"$phongfresnelranges"		"[.25 1 4]"
	"$basemapalphaphongmask"	"1"

	"$rimlight" 			"1"
	"$rimlightexponent" 		"4"
	"$rimlightboost" 		"2"
}

although ingame its not reflective at all. Any ideas?
 

Freyja

aa
Jul 31, 2009
2,994
5,813
you need to buildcubemaps before they reflect anything
Use this string of commands:

mat_specular 0
buildcubemaps
disconnect
mat_reloadallmaterials
mat_specular 1
map <yourmapname>

and enjoy
 

Ravidge

Grand Vizier
aa
May 14, 2008
1,544
2,818
Does your .vtf file include a alpha layer? I'm not 100% sure, but I believe it's needed for reflective surfaces.
 

MechaBowser

L1: Registered
May 17, 2009
32
0
you need to buildcubemaps before they reflect anything
Use this string of commands:

mat_specular 0
buildcubemaps
disconnect
mat_reloadallmaterials
mat_specular 1
map <yourmapname>

and enjoy
I already did that :O! But it's still not reflecting at all...
 
Feb 18, 2009
640
629
asfaik, phong requires certain properties in the vtf or to what the texture is applied. There is another command $envmap which I think would be better for what you want this to do. I'm not entirely sure what each one does but it appears $phong is to do with high-lights on player/npc models and $envmap is use when cubemap reflections are being used, ie on a world model/prop.
 

MechaBowser

L1: Registered
May 17, 2009
32
0
Removing everything but $envmap and $basetexture seemed to do the trick, it's now reflecting the cubemaps, although it's not reflecting the players in front of it... any way to make it do that?
 

Exist

L6: Sharp Member
Oct 31, 2009
306
136
Cubemaps aren't take at run time (thats why we need to run console commands to get them). After cubemaps are made, they are stored in the .BSP for usage during rendering.

In short, Source doesn't support dynamic cubemap rendering, meaning players won't reflect.