Problem with menu photo

Pianodan

L3: Member
Apr 11, 2009
108
16
I'm trying to add a photo to my opening chalkboard. I've created a transparent, 32-bit, uncompressed .tga, and converted to to .vtf using VTFedit, also creating a .vmt file. The problem is, when I actually load the game the picture appears, but flickering black over the opaque parts of the image. (The transparent parts are properly transparent). It looks as though I've got a black picture z-fighting with the one I actually want.

What have I screwed up?
 

l3eeron

L8: Fancy Shmancy Member
Jan 4, 2008
593
88
Make sure your vmt is like this:

"UnlitGeneric"
{
"$basetexture" "vgui\maps\your_vtf"
"$translucent" 1
"$ignorez" 1
"$vertexcolor" 1
}
 

Pianodan

L3: Member
Apr 11, 2009
108
16
Unfortunately, no. I edited my .vmt file to match the one in the tutorial, but I'm still getting the black vs. picture z-fighting look. The .vmt originally said "LightmappedGeneric" rather than "UnlitGeneric" in the tutorial... am I doing something wrong with VTFEdit?

It would be nice if there were a tutorial on how to do this with VTFEdit, and not from the command line using vtex. If I ever figure out how to do it, maybe I'll write one.

Oh, and the line should be
"$basetexture" "vgui\maps\menu_photos_ctf_Shooting_Gallery_a6"
not
"$basetexture" "vgui\maps\menu_photos_ctf_Shooting_Gallery_a6.vtf", right?
 
Last edited:

Pianodan

L3: Member
Apr 11, 2009
108
16
Mine .vmt is exactly like l3eeron said and it works fine.

You don't need vtf at the end.


My guess is it's not your vmt but in how you saved the vtf. I use the photoshop plugin so I'm not familiar with vtf edit.

I'm sure that's possible, even likely. It may even be the original .tga has an issue. The problem is that I don't have photoshop, and I have a severe allergy to pirating software. I use either the Gimp or paint.net for my picture editing needs.
 

Pianodan

L3: Member
Apr 11, 2009
108
16
Well, I didn't say pirate it. And nobody that OWNS photoshop pirated it.

I just meant I din't know what settings you need to use. I suppose they are similar.

Make sure you have dds5 checked. Without that I was unable to get transparency on sprays. And 8 bit alpha.

Sorry, I didn't mean to imply anything. Just a knee-jerk reaction on these here interwebs.

I do have both of those settings. As it turns out, there's a .vtf plugin for Paint.net, so I'll try that.
 

Pianodan

L3: Member
Apr 11, 2009
108
16
I'm not sure it would, actually, as the effect isn't staic. Imagine what it looks like when you have two brushes overlapping, and the textures are flickering back and forth. (z-fighting) Now imagine a picture doing that with a black square the same size. That's pretty much it.