PDA

View Full Version : Texture Alpha Display Problems in Source


sitruss
09-24-2007, 06:34 PM
I have a weapon model that I have been working on and it has a sort of gas pressure gauge with a moving needle and all. I wanted to put a dirty glass texture over the dial of the gauge but I can't seem to get the opacity of the alpha portions of my texture to display properly in Source. The alpha is in the VTF and working fine, first I tried using $translucent in the QC to display it, but it had that problem where it renders the model out in a weird state where you can see through the entire model. I then tried to use $alphatest instead, which fixed the display issue, but renders the texture completely opaque with the alpha portions completely transparent, instead of varying levels of translucency.

So my current choices are to go with the solid/invisible look of $alphatest (horrible looking, would rather just nix entirely) or use $translucent and have my model look completely weird and screwed up, like it's inside out nearly and randomly transparent (not geometry just texture). There has to be some way around this issue, anyone have any suggestions?

PuddingWagon
09-25-2007, 06:00 AM
Without knowing much about the QC file structure (assuming same/similar to VMT), I'd say check where you've got your brackets. It could be that you've put the $translucent tag outside the brackets for the glass texture, so the engine is turning the entire model translucent.

What I mean is this:
{
Model stuff here

{
Glass texture stuff here
}

$translucent
}

//End file 1


When it should be

{
Model stuff here
{
Glass texture stuff here
$translucent
}
}

//End file 2

sitruss
09-26-2007, 04:56 AM
Hmm... I'll have to check that when I get home. One thing I should have mentioned though, is that the glass texture is in the weapon's texture, meaning the entire weapon is textured from one image, with a square area inside it containing alpha information being where the glass texture resides. From what I've read it is normally ill advised to use more than one image when texturing a weapon...is this just one of the exceptions if you want transparency? Do people just create a texture dedicated to things they'd like transparent? If so, how do you set up a model to use a different texture for a group of polygons within the QC file? Thanks for the help!

wisemx
09-26-2007, 05:35 PM
While working with the model you have to create Clusters.
This should only be done in Source props when absolutely necessary.
The overhead for multiple materials on a prop is rather high.