|
|
#1 |
|
Guest
Posts: n/a
|
How do i allow a texture to use it's alpha channel? So i can allow transparency through glass windows in the texture, rather then putting a hole in the wall. I save it as a compressed texture w/ alpha channel, but in the .vmt, what code do i put in to allow the use of the alpha channel? I know $alphatest makes it fully transparent (I think, it's been a while since i used that one)
Last edited by Big Pappa: 10-09-2007 at 07:08 PM. |
|
|
|
#2 |
|
Guest
Posts: n/a
|
$translucent 1
|
|
|
|
#3 |
|
Guest
Posts: n/a
|
Awesome, Is there a way to add transparency without adding an alpha layer to the texture? In the .vmt?
|
|
|
|
#4 |
|
Guest
Posts: n/a
|
"$alphatest" 1
Alphatesting: Every pixel with an alpha value less than 178 will be completely transparent ingame. (However, values close to this value will confuse the shader at distances.) This type of shading costs much less than translucent shading [1] "$alpha" float Scales material opacity by the 'float' number. taken from the valve developer community |
|
|
|
#5 |
|
Guest
Posts: n/a
|
So, I'll use this vmt as an example,
"LightmappedGeneric" { "$basetexture" "Brick/brickfloor001a" "$surfaceprop" "brick" "%keywords" "c17downtown" "$alpha" "90" } Would make it 90% transparency? |
|
|
|
#6 |
|
Guest
Posts: n/a
|
your guess is as good as mine
|
|
|
|
#7 |
|
Guest
Posts: n/a
|
Haha, thanks, i'll check it out when later tonight. Will update later with the results.
|
|
|
|
#8 |
|
Guest
Posts: n/a
|
10-4 roger wilco
|
|
|
|
#9 |
|
Guest
Posts: n/a
|
Well, I tried adding
"$alpha" 70 or "$alpha" "70" or "$translucent" "1" "$alpha" "70" or "$translucent" 1 "$alpha" 70 to the files, and nothing happened on any of those combos. tried putting alpha before and after translucent, to no avail ![]() I found this somewhere..... "Proxies" {"Sine" {"resultVar" "$alpha" "sineperiod" 1 "sinemin" 0.80 "sinemax" 0.80 } } That works, makes it 20% transparent, BUT, it bugs out alot, making the texture completely invisible. So at certain distances, it makes it so i can see all the way through to the outside bounding box, passing everything else. |
|
|
|
#10 |
|
Guest
Posts: n/a
|
I think they mean percentages:
"$alpha" "0.5" for a half-transparent texture... But I'm not sure of this, try it!!
|
|
![]() |
|
||||||
| Thread Tools | |
| Display Modes | |
|
|