50% transparent alpha channel?

simon

Spy
Joined
Jun 8, 2003
Messages
798
Reaction score
0
hello,
i imported a model ingame, i made glass on my model. on the alpha channel the glass that is supposed to be half-transparent is grey. When i view this ingame/modelviewer, the glass is solid... so i changed the gray a bit darker, then the glass was gone.. so its either 100% (solid) or 0% (transparent)
i'm pretty sure the source engine can do this so that i can see 50% through a glass window, since there are some textures in HAMMER that act that way.
All i need to know is what do i need to do for this upon importing a model.
here is my .vmt file:

Code:
"vertexlitgeneric"
{
   "$baseTexture" "models\props/fuel_pumps"
   "$model" "1"
   "$surfaceprop" "metal"
   "$nocull" 1
   "$translucent" 1
   "$alphatest" 1
}

hope anyone can help me out here!
 
I knew it could be done, but I just did a quick test to make sure I knew what I was talking about. I threw together a texture and model . The left most one is the texture, center is the alpha channel, and right is the alpha translucency setting (make it about half so that you can see through the texture like you want).
testtexture6mh.jpg

I tried it first with the alpha at 0,0,0 RGB, but that made it completely see through,so I made the alpha channel more grey, don't know if that or the translucency settings make the most difference.
Here's the in-Hammer screenshot:
hammertest9tf.jpg

and here's my VMT settings-
"VertexLitGeneric"
{
"$translucent" 1
"$baseTexture" "models\props_west\test/test"
}
 
thx for the help kirschtorte !
i dont really understand how you do it, cause it still doesn't work :/

here is how my texturemap/alpha channel looks like (i used the same grey colour you used in the preview)

alpha_channel.jpg


and in the model viewer it's still 100% transparent (i should see the broken glass a bit)
what am i doing wrong ? and what is the window in the third image ? i can't read the name.
 
been trying all afternoon.. i really dont get it

either i have the glass at 100% visability
or i don't see it at all.. i never can get it in between (and i use the same grey tone like you did)here you see how it should look (but the glass needs to be at 50% transparacy...)
eee.jpg
 
Here's the Third Image from my first post.
ctrll8hq.jpg


When you have the Alpha channel selected, hit: Ctrl L
That will bring up the little bar to set the level of translucency of the alpha channel.
 
I noticed you have part of the alpha channel completely see through, and the glass part is transparent.
I did a quick retexture of my test to see if this would work, and it did. I added a black section to the texture and the alpha channel:
testtexture20wo.jpg

And here's what it looks like in Hammer:
hammer26xf.jpg

I hope you can get it to work. Nice model/Texture by the way.
 
hi,

thanks again for the info, i'm doing everything like your saying.. yet it doesn't seem to be working. I just recorded how i make my .tga with the alpha in it, i hope you will see what i do wrong!

download here:
.rar (below 2mb)
http://www.wesleytack.com/upload/clip0012.rar

thanks
 
It looks like your textures fine. I think the problem is in the VMT file.
From what I can tell, your best option is to apply a multi-sub object material
in Max, and make the glass and whatever section you want two sided/
transparent part of a different texture. Sometimes the VMT settings like
transparent, and nocull don't work like you want them to for the whole model.
This cowboy boot I made was all messed up, until I made the spur part of a different texture.
The main part of the boot is two-sided, and the spur is
two sided and transparent. When I had it all in one texture the whole
boot was transparent and just didn't look right.
examp3pm.jpg
 
could you send me you files for the model ?
the .tga and the .max (so i can have a look around and compare with my model/texture)
cause i'm really getting depressed here.. after 24 hours of searching :/
or mail it to me simon.wt @ pandora.be

thanks!

- simon
 
Are you using Photoshop 7? Photoshop 7 has a bug with alpha tgas.
 
yes i am useing 7
i'll need to upgrade then i suppose
 
lol, i have photoshop 8.. i thought i still had 7.. dear me
and i overwrited the file... :eek:
anyway, the problem isn't photoshop.. it's something else, i compaired my files with the ones from kirschtorte, and everything.. and i do mean EVERYTHING is the same... from his .vmt to his .qc to his .max file and the .tga (i even followed the HL2wiki page tutorial on glass) everything is 100% correct.. and it doesn't work. I must have redid the files for about 50 times already, trying new and small changes to each file in the hopes to find the sollution, but its just no use. And when i re-compile the files from kirschtorte, they do work.

kirschtorte: how do you get that grey color? is it just a random pick? or do you use RGB values that match the main texture or something ? cause i tried it like you did, and i did it like the tutorial (with levels). and none works...

thanks for the help ! :)
 
I just want to say that I followed this thread from the start and my thoughts go with you simon... :) I too had troubles to get it working at first and then it worked. I still do not understand why yours don't since everything is like kirschtorte. If I have a hint of what could cause this I'll let you know. At a first glance I would have said the problem lies in the vmt but since you have the same as kirschtorte I don't know.
 
The alpha channel can be any shade of gray you want. The only thing I can think of that I didn't mention earlier was that when you're saving the TGA, have the Alpha Channels box checked when choosing where to save the file. From your video it looked like this was checked, but just incase...

Here's a tutorial I made: http://sprays.hlgaming.com/tutorials-transparency.php

Instead of filling with white in the tutorial, you can just use a shade of gray which is anything with all RGB numbers the same, like 110 110 110, or 169 169 169. Also, make sure it's a 32 bit tga.
 
I've always used Corel Draw for alpha masking. I could never get how it works in PS. When I've done it in Corel, I open it up in PS and it doesn't come up as an alpha channel but a layer instead. So if I go Layer > Flatten Image the mask will be gone.
 
Oh I just thought about something! I remember why mine didnèt work at first. You have to check the checkbox save as a copy (or something like that) when you save your tga. Otherwise, it didn't work for me! Try that if you didn't already.
 
Back
Top