Partial transparency on models (Source)

I’m creating a model for Source, part of it is transparant. I got it into Source but I find that you can see through the model as a whole, for example when you look at it from the top you can see the other geometry of the model through the texture.


How do I get rid of this?

Is there more than one method of making something transparent? Also, is that the ground under it, or a floor that is technically not the default “ground” or whatever (I’ve never made a HL2 map, only failed to make a HL1 map)?

Make some other simple objects and see if they’ll do the same, both with and without that texture, also, try changing the textures on your model and see if that fixes it.

However, what I’m seeing there doesn’t look like transparency, but rather an error where it’s rendering faces of the object even if they’re obscured behind another one, or that the one texture is being rendered “over” everything else. Put another random prop in the room and see if you still see those faces of the object through other objects.

$alphatest

Can you be more specific? I’m new to Source.

@ Second post

It only happens on the model itself, the problem goes away if I remove the translucent setting in the .vmt file - but doing so obviously makes my glass no longer transparant.

edit:

Did some Googling, I know what you mean now. Going to test it out.

edit2:

Well it worked, but the glass is now completely invisible.

Use 2 different textures, 1 for the transparent glass and 1 for the opaque metal.
I aren’t sure what modeling program you’re using but with 3ds MAX you just apply a multi-material, assign various materials to IDs then change different parts of the model to use those IDs.

You can make an own model for the glass, and one for the frame? My idea

strange, $alphatest should have worked completly, but obviously didn’t.
well, yeah, create 2 materials, one for the glass and one for the frame, shouldn’t be that hard in any modelling software

Did you test it in-game before making changes? Hammer tends to have problems rendering translucent models with certain material parameters but they should look fine in-game. Depending on how the model is setup you may need to do what has been mentioned and split it into separate materials.

$alphatest just does an alternative way of sorting the material and it’s transparency mask. It also does this at an extremely low quality, which makes it poor for partially-transparent things like glass, and more suited towards things that are either completely transparent or fully opaque (like a solid grating texture with holes).

Yea that’s the problem, the glass itself was supposed to be partially transparent but due to $alphatest it’s now completely transparant except for the white logo on it. Using $translucent would make the glass the way I want it to but that would also bring back the problem mentioned in the first post.

I guess I’ll have to pick one of those, or seperate the glass from the rest of the model.

Thanks for the help guys.

and using both?

Doesn’t seem to work, the glass is still completely transparant.

Founded in 2004, Leakfree.org became one of the first online communities dedicated to Valve’s Source engine development. It is more famously known for the formation of Black Mesa: Source under the 'Leakfree Modification Team' handle in September 2004.