Finding and editing existing materials using VTFEdit
Quote from FourthReaper on January 29, 2012, 9:00 amA few days ago I posted about how to create a green fizzler texture. I've come to the conclusion that I really need to edit the texture (color). So I installed VTFEdit and tried to look up the VTF files, but I couldn't find them. So I installed GCFScape to see where they might be placed in a GCF of VPK file, but I have no idea where to look.
Does anyone know where I can find the existing materials? Specifically effects/fizzler_underground_wide_center?
Any help is appreciated.
A few days ago I posted about how to create a green fizzler texture. I've come to the conclusion that I really need to edit the texture (color). So I installed VTFEdit and tried to look up the VTF files, but I couldn't find them. So I installed GCFScape to see where they might be placed in a GCF of VPK file, but I have no idea where to look.
Does anyone know where I can find the existing materials? Specifically effects/fizzler_underground_wide_center?
Any help is appreciated.
Quote from spongylover123 on January 29, 2012, 10:54 amThere are 5 vtfs that control the fizzler's vmt. they have the hdr color line (i think its called that), which means the color of the fizzler is not controlled by the texture, but with a vmt parameter. to change it you need to change the color number, but they are floating point numbers, so need to divide it by 255.
There are 5 vtfs that control the fizzler's vmt. they have the hdr color line (i think its called that), which means the color of the fizzler is not controlled by the texture, but with a vmt parameter. to change it you need to change the color number, but they are floating point numbers, so need to divide it by 255.
Quote from FourthReaper on January 29, 2012, 11:57 am@ spongylover123: My problem isn't so much in editing the fizzler vmt (although I'm sure this will be helpfull in time), but in finding the location of the vmt's (or vtf's, this whole thing is starting to confuse me)...
@ spongylover123: My problem isn't so much in editing the fizzler vmt (although I'm sure this will be helpfull in time), but in finding the location of the vmt's (or vtf's, this whole thing is starting to confuse me)...
Quote from spongylover123 on January 29, 2012, 12:02 pmFourthReaper wrote:@ spongylover123: My problem isn't so much in editing the fizzler vmt (although I'm sure this will be helpfull in time), but in finding the location of the vmt's (or vtf's, this whole thing is starting to confuse me)...its in the "effects" folder of the vpk, just look for fizzler.vmt
its in the "effects" folder of the vpk, just look for fizzler.vmt
Quote from FourthReaper on January 29, 2012, 12:04 pm@ spongylover123: Thanks, I'll take a gander!
EDIT: Eh, where exactly can I find that VPK? There's a lot of them...
@ spongylover123: Thanks, I'll take a gander!
EDIT: Eh, where exactly can I find that VPK? There's a lot of them... ![]()
Quote from Lpfreaky90 on January 29, 2012, 12:13 pmI started mapping when the portal 2 sdk wasn't out so I have a copy of the extracted vpk's in my alienswarm folder. So I checked it out:
effects/fizzler_underground_wide_center is a vmt file, a code file for a texture and it's code is this:
- Code: Select all
SolidEnergy
{
$basetexture "effects/fizzler_ripples"
$flowmap "effects/fizzler_flow"
$flowbounds "effects/fizzler_underground_wide_center_bounds"
$FLOW_NOISE_TEXTURE "effects/fizzler_noise"
$FLOW_UVSCROLLDISTANCE "0.5"
$FLOW_TIMEINTERVALINSECONDS 1
$FLOW_NOISE_SCALE 0.005
$FLOW_LERPEXP 1
$FLOW_WORLDUVSCALE 0.008
$FLOW_NORMALUVSCALE 0.009
$surfaceprop glass
"%keywords" Portal2
$translucent 1
$additive 1
$FLOW_COLOR "[0.1 0.2 0.4]"
$FLOW_VORTEX_COLOR "[2.5 5 10]"
$FLOW_VORTEX_SIZE 35
$intensitynoise 1
$totalintensity 1
"!srgb?$outputintensity" .75
Proxies
{
FizzlerVortex
{
}
Sine
{
sineMin 0.875
sineMax 1.0
sinePeriod 0.1
resultVar $intensitynoise
}
Multiply
{
srcvar1 $flow_color_intensity
srcvar2 $intensitynoise
resultvar $totalintensity
}
Equals
{
srcvar1 $totalintensity
resultvar $flow_color_intensity
}
}
}Conclusion: there is no separate texture for this specific thing. As spongy said you have to edit this file. If you look at the $basetexture "effects/fizzler_ripples" you will see that your texture has a lot of variables that alter effects/fizzler_ripples.
What is important is this single row:
$FLOW_COLOR "[0.1 0.2 0.4]"
This uses an RGB-style color system: the first number is the amount of red, then green then blue
So if we look at the normal fizzler it is a tiny bit red, a bit more green and quite a bit blue -> so it's mostly blue.If you want to make your fizzler green:
Decrease the first and third number and increase the second one.
To make the entire thing lighter, increase all numbers.
What I did is:
$FLOW_COLOR "[0 1 0]"
that gave this color:
note: screenshot taken in hammerSo for the sake of completeness: I created this file:
fizzler_green_wide_stuff.vmt
- Code: Select all
SolidEnergy
{
$basetexture "effects/fizzler_ripples"
$flowmap "effects/fizzler_flow"
$flowbounds "effects/fizzler_underground_wide_center_bounds"
$FLOW_NOISE_TEXTURE "effects/fizzler_noise"
$FLOW_UVSCROLLDISTANCE "0.5"
$FLOW_TIMEINTERVALINSECONDS 1
$FLOW_NOISE_SCALE 0.005
$FLOW_LERPEXP 1
$FLOW_WORLDUVSCALE 0.008
$FLOW_NORMALUVSCALE 0.009
$surfaceprop glass
"%keywords" Portal2
$translucent 1
$additive 1
$FLOW_COLOR "[0 1 0]"
$FLOW_VORTEX_COLOR "[2.5 5 10]"
$FLOW_VORTEX_SIZE 35
$intensitynoise 1
$totalintensity 1
"!srgb?$outputintensity" .75
Proxies
{
FizzlerVortex
{
}
Sine
{
sineMin 0.875
sineMax 1.0
sinePeriod 0.1
resultVar $intensitynoise
}
Multiply
{
srcvar1 $flow_color_intensity
srcvar2 $intensitynoise
resultvar $totalintensity
}
Equals
{
srcvar1 $totalintensity
resultvar $flow_color_intensity
}
}
}And I saved it in steam/steamapps/common/portal 2/portal2/materials/lp/effects.
I prefer to use a special /lp/ folder for all my custom materials so it's easy to see what kind of materials are custom and which aren't. If you want to release a map with this custom material make sure you include this custom vmt! (either by using pakrat or by using a zip file that has to be copied in.Hope that was helpful
I started mapping when the portal 2 sdk wasn't out so I have a copy of the extracted vpk's in my alienswarm folder. So I checked it out:
effects/fizzler_underground_wide_center is a vmt file, a code file for a texture and it's code is this:
- Code: Select all
SolidEnergy
{
$basetexture "effects/fizzler_ripples"
$flowmap "effects/fizzler_flow"
$flowbounds "effects/fizzler_underground_wide_center_bounds"
$FLOW_NOISE_TEXTURE "effects/fizzler_noise"
$FLOW_UVSCROLLDISTANCE "0.5"
$FLOW_TIMEINTERVALINSECONDS 1
$FLOW_NOISE_SCALE 0.005
$FLOW_LERPEXP 1
$FLOW_WORLDUVSCALE 0.008
$FLOW_NORMALUVSCALE 0.009
$surfaceprop glass
"%keywords" Portal2
$translucent 1
$additive 1
$FLOW_COLOR "[0.1 0.2 0.4]"
$FLOW_VORTEX_COLOR "[2.5 5 10]"
$FLOW_VORTEX_SIZE 35
$intensitynoise 1
$totalintensity 1
"!srgb?$outputintensity" .75
Proxies
{
FizzlerVortex
{
}
Sine
{
sineMin 0.875
sineMax 1.0
sinePeriod 0.1
resultVar $intensitynoise
}
Multiply
{
srcvar1 $flow_color_intensity
srcvar2 $intensitynoise
resultvar $totalintensity
}
Equals
{
srcvar1 $totalintensity
resultvar $flow_color_intensity
}
}
}
Conclusion: there is no separate texture for this specific thing. As spongy said you have to edit this file. If you look at the $basetexture "effects/fizzler_ripples" you will see that your texture has a lot of variables that alter effects/fizzler_ripples.
What is important is this single row:
$FLOW_COLOR "[0.1 0.2 0.4]"
This uses an RGB-style color system: the first number is the amount of red, then green then blue
So if we look at the normal fizzler it is a tiny bit red, a bit more green and quite a bit blue -> so it's mostly blue.
If you want to make your fizzler green:
Decrease the first and third number and increase the second one.
To make the entire thing lighter, increase all numbers.
What I did is:
$FLOW_COLOR "[0 1 0]"
that gave this color:
note: screenshot taken in hammer
So for the sake of completeness: I created this file:
fizzler_green_wide_stuff.vmt
- Code: Select all
SolidEnergy
{
$basetexture "effects/fizzler_ripples"
$flowmap "effects/fizzler_flow"
$flowbounds "effects/fizzler_underground_wide_center_bounds"
$FLOW_NOISE_TEXTURE "effects/fizzler_noise"
$FLOW_UVSCROLLDISTANCE "0.5"
$FLOW_TIMEINTERVALINSECONDS 1
$FLOW_NOISE_SCALE 0.005
$FLOW_LERPEXP 1
$FLOW_WORLDUVSCALE 0.008
$FLOW_NORMALUVSCALE 0.009
$surfaceprop glass
"%keywords" Portal2
$translucent 1
$additive 1
$FLOW_COLOR "[0 1 0]"
$FLOW_VORTEX_COLOR "[2.5 5 10]"
$FLOW_VORTEX_SIZE 35
$intensitynoise 1
$totalintensity 1
"!srgb?$outputintensity" .75
Proxies
{
FizzlerVortex
{
}
Sine
{
sineMin 0.875
sineMax 1.0
sinePeriod 0.1
resultVar $intensitynoise
}
Multiply
{
srcvar1 $flow_color_intensity
srcvar2 $intensitynoise
resultvar $totalintensity
}
Equals
{
srcvar1 $totalintensity
resultvar $flow_color_intensity
}
}
}
And I saved it in steam/steamapps/common/portal 2/portal2/materials/lp/effects.
I prefer to use a special /lp/ folder for all my custom materials so it's easy to see what kind of materials are custom and which aren't. If you want to release a map with this custom material make sure you include this custom vmt! (either by using pakrat or by using a zip file that has to be copied in.
Hope that was helpful ![]()
Quote from Lpfreaky90 on January 29, 2012, 12:14 pmFourthReaper wrote:@ spongylover123: Thanks, I'll take a gander!EDIT: Eh, where exactly can I find that VPK? There's a lot of them...
open steam/steamapps/common/portal 2/portal2/pak01_dir.vpk. That vpk reads all the other vpk's too:)
EDIT: Eh, where exactly can I find that VPK? There's a lot of them... ![]()
open steam/steamapps/common/portal 2/portal2/pak01_dir.vpk. That vpk reads all the other vpk's too:)
Quote from FourthReaper on January 29, 2012, 12:26 pm@ lpfreaky90: Oh wow, thanks a bunch. That was incredibly helpfull. The second post, too.
Also, I'm assuming $FLOW_VORTEX_COLOR is for the area of effect when an object gets too close?
Its hard to overstate my gratefulness.PS: And yeah, I'm thinking I'll use PakRat.
@ spongylover123: And thanks to you too, ofcourse.
EDIT: Awesome, it works completely!
Picture of the test map I used for the Surface Division Field:Gonna' make a lot of use of this. Thanks again!
@ lpfreaky90: Oh wow, thanks a bunch. That was incredibly helpfull. The second post, too.
Also, I'm assuming $FLOW_VORTEX_COLOR is for the area of effect when an object gets too close?
Its hard to overstate my gratefulness. 
PS: And yeah, I'm thinking I'll use PakRat.
@ spongylover123: And thanks to you too, ofcourse. ![]()
EDIT: Awesome, it works completely!
Picture of the test map I used for the Surface Division Field:
Gonna' make a lot of use of this. Thanks again! ![]()
Quote from Lpfreaky90 on January 29, 2012, 1:26 pmFourthReaper wrote:@ lpfreaky90: Oh wow, thanks a bunch. That was incredibly helpfull. The second post, too.
Also, I'm assuming $FLOW_VORTEX_COLOR is for the area of effect when an object gets too close?
Its hard to overstate my gratefulness.You're welcome
the easiest way to test this hypothesis is to make the flow_vortex_color [1 0 0], that way the thing is red and it should be really easy to spotTesting with ridiculous colors always works very well for me, when building websites but also in hammer. As I;m upgrading levels i use a custom made blue version of white_wallstate to seal off any thing I need to seal off in order to compile the map. This is really easy to spot both in game as in hammer so I won't forget I have a dirty fix somewhere
Also, I'm assuming $FLOW_VORTEX_COLOR is for the area of effect when an object gets too close?
Its hard to overstate my gratefulness.

You're welcome ![]()
the easiest way to test this hypothesis is to make the flow_vortex_color [1 0 0], that way the thing is red and it should be really easy to spot ![]()
Testing with ridiculous colors always works very well for me, when building websites but also in hammer. As I;m upgrading levels i use a custom made blue version of white_wallstate to seal off any thing I need to seal off in order to compile the map. This is really easy to spot both in game as in hammer so I won't forget I have a dirty fix somewhere ![]()
Quote from FourthReaper on January 29, 2012, 1:51 pm@ lpfreaky90: I can see how that works well. I usually just use nodraw there, but I guess that's a good technique for when you're not sure wether you can see some areas ingame, too! (For when you're not supposed to.)
@ lpfreaky90: I can see how that works well. I usually just use nodraw there, but I guess that's a good technique for when you're not sure wether you can see some areas ingame, too! (For when you're not supposed to.)







