Shiny Spikes

Discussion in 'Mapping Questions & Discussion' started by MechaBowser, Jul 24, 2010.

  1. MechaBowser

    MechaBowser L1: Registered

    Messages:
    32
    Positive Ratings:
    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?
     
  2. Freyja

    aa Freyja ¯\_(ツ)_/¯

    Messages:
    2,853
    Positive Ratings:
    4,860
    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
     
  3. Ravidge

    aa Ravidge Grand Vizier

    Messages:
    1,544
    Positive Ratings:
    2,495
    Does your .vtf file include a alpha layer? I'm not 100% sure, but I believe it's needed for reflective surfaces.
     
  4. MechaBowser

    MechaBowser L1: Registered

    Messages:
    32
    Positive Ratings:
    0
    I already did that :O! But it's still not reflecting at all...
     
  5. Mick-a-nator

    aa Mick-a-nator

    Messages:
    640
    Positive Ratings:
    314
    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.
     
    • Thanks Thanks x 1
  6. MechaBowser

    MechaBowser L1: Registered

    Messages:
    32
    Positive Ratings:
    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?
     
  7. Exist

    Exist L6: Sharp Member

    Messages:
    306
    Positive Ratings:
    112
    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.