Go Back   Steam Users' Forums > Steam Tool Discussions > Source Art & Sound Design

Reply
 
Thread Tools Display Modes
Old 10-09-2007, 03:40 PM   #1
Big Pappa
 
 
 
Guest
Posts: n/a
Question Texture Question

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.
 
Reply With Quote
Old 10-09-2007, 04:08 PM   #2
Angry Beaver
 
 
 
Guest
Posts: n/a
$translucent 1
  Reply With Quote
Old 10-09-2007, 04:40 PM   #3
Big Pappa
 
 
 
Guest
Posts: n/a
Awesome, Is there a way to add transparency without adding an alpha layer to the texture? In the .vmt?
  Reply With Quote
Old 10-09-2007, 04:51 PM   #4
-=GambiT=-
 
 
 
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
  Reply With Quote
Old 10-09-2007, 04:55 PM   #5
Big Pappa
 
 
 
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?
  Reply With Quote
Old 10-09-2007, 05:04 PM   #6
-=GambiT=-
 
 
 
Guest
Posts: n/a
your guess is as good as mine
  Reply With Quote
Old 10-09-2007, 05:05 PM   #7
Big Pappa
 
 
 
Guest
Posts: n/a
Haha, thanks, i'll check it out when later tonight. Will update later with the results.
  Reply With Quote
Old 10-09-2007, 05:33 PM   #8
-=GambiT=-
 
 
 
Guest
Posts: n/a
10-4 roger wilco
  Reply With Quote
Old 10-09-2007, 07:07 PM   #9
Big Pappa
 
 
 
Guest
Posts: n/a
Question

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.
  Reply With Quote
Old 10-10-2007, 12:47 AM   #10
Penumbra
 
 
 
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!!
  Reply With Quote
Reply

Go Back   Steam Users' Forums > Steam Tool Discussions > Source Art & Sound Design


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off



All times are GMT -7. The time now is 01:39 AM.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2013, vBulletin Solutions, Inc.
Site Content Copyright Valve Corporation 1998-2012, All Rights Reserved.