Custom Overlay???
1) Can someone tell me how to create a custom overlay???
2) If someone does, can you please explain it well, I don't think I'm too good with the stuff that I've looked up for this. topic.
Also, I should mention*, I have tried, but it ended up black in the game. Purple and black in the hammer editor.
First, you will need an application that can save images with transparency. If you have photoshop, great. Otherwise, try GIMP. It's free, and is very powerful.
Link to GIMP:
Next, open VTFedit and then open your image. Form there, save it as a VTF file in the folder C:/program files (sometimes 'program files (86)')/steam/steamapps/common/Portal 2/portal2/materials/(custom folder name).
Finally, in VTFedit, click File>New and then you should see some text area. replace whatever's in there with
"LightmappedGeneric"
{
"$basetexture" "[Folder]\[overlayname]"
"$decal" 1
"$decalscale" 0.25
"$translucent" 1
}
(I probably screwed something up in that code because I copy/pasted that from a Counter-Strike forum. It works for me, though.)
Under $basetexture, change [folder] to the folder you created and [overlayname] to the name of the .VTF. Save that as a .VMT in the same folder as your texture and you should be good to go! Be sure to Pack your texture into the BSP before releasing the map, though.
EDIT: Oops, Need to put a link to VTFedit. http://nemesis.thewavelength.net/index.php?c=178
JoeyGuy917 wrote:
If I have transparency in my picture, should it be coming up black (the transparent parts) in VTFedit?
yep
Edit: I should say, in the hammer 3d view it shows up white. In the texture selection window it has the actual texture, and in game it is still black.
JoeyGuy917 wrote:
How/where would I add it into the vmt?
before the {
"LightmappedGeneric"
{
"$basetexture" "[CustomFolder]\[Pig]"
"$decal" 1
"$decalscale" 0.25
"$translucent" 1
}
Should I have the quotes around "LightmappedGeneric? Or should I have something else there?
Quote:
set $translucent to 0 instead of 1
Nope, still not working, and LOL at that picture
Just use the "Auto-Create Vmt" feature in vtfedit, and add the line $translucent 1 to the area in between the { and }.
Also, I'm not sure if you are using translucency right with the image. You need to have a completely blank bottom layer, and everything else that is opaque should be on top. Saving as a .tga works best, in my opinion.
Finally, in order to make it look right, make sure that "Correct Gamma" in the "Advanced" tab when you import the image to VtfEdit is turned off[I've found that images can become washed out if that's used].
Here's a sample vmt that works fine as an overlay:
"LightmappedGeneric"
{
"$basetexture" "[path]"
$translucent 1
}
Quote:
Also, I'm not sure if you are using translucency right with the image. You need to have a completely blank bottom layer, and everything else that is opaque should be on top. Saving as a .tga works best, in my opinion.
Can you please show me an example of this. I am drawing a blank here.
How to do this? Probably use Google, im absolutely sure it's explained somewhere.
Arachnaphob wrote:
Or use a .png file. They work fine for me.
Maybe for overlays without transparency; as far as I know .png can't save alpha.
JoeyGuy917 wrote:
Can you please show me an example of this. I am drawing a blank here.
If you are using paint.net [be careful when downloading - the website is getpaint.net and there is many
ads with download buttons on it], it's simply a matter of having the very bottom layer completely empty; everything else is on top. Then, you save as a .tga, not a regular image format.
If you want, I can pm you the installer file for paint.net to save you the hassle of finding the right download button.
Ultiman9711 wrote:
Arachnaphob wrote:Or use a .png file. They work fine for me.
Maybe for overlays without transparency; as far as I know .png can't save alpha.
They do support transparency, but I would go with the tga for now.
