Page 1 of 1

Surfaces not obeying surfaceparm trans. *SOLVED*

Posted: Sat Sep 05, 2009 7:09 am
by Pat Howard
My map has a lot of hanging wires angled every which way, curved fences, and generally just a lot of see-through and shoot-through surfaces with the "surfaceparm trans" line in their shaders. Even though I'm texturing all other sides with nodraw, it seems as though some faces randomly go solid, which is a real bummer because these faces are blocking a lot of gameplay.

I ran a couple of test maps thinking it could have something to do with the angle the face is at or if the face is overlapping another brush, but I couldn't find a pattern. Usually if I remade the faulty brush the problem went away. It was easy in the test map's case because I only had a few wires, but in the real map I have loads of them, and I'd really rather not sit around remaking hundreds of brushes. Anyone have a better idea of what's going on here? It would save me a lot of time.

Oh yeah, one other related problem. Sometimes if I have a wire hanging really close to a wall and I shoot the wall behind it, the wire face picks up the bullet hole. I'm not sure if these are related though, as this even happens on some of the surfaces that are otherwise behaving as they should (not going solid).

Here are the stock textures giving me problems:
-base_trim/proto_fence
-base_trim/wires01
-base_trim/wires02

Thanks,
-pat

Re: Surfaces not obeying surfaceparm trans.

Posted: Sat Sep 05, 2009 7:25 am
by Delirium
You are probably mixing content types for your wire brushes
in your shader for your wires add surfaceparm nonsolid and that should fix it.

let me elaborate...
there are multiple content types for brushes eg. lava/solid/nonsolid/water and some others, but each brush has multiple sides which could be textured with different shaders of different content types, so if you have a brush that is textured with a solid texture such as caulk on some sides and a nonsolid shader on another the compiler will take the content type of the first surface it comes across when compiling the map, which is what could be leading to your problem

Re: Surfaces not obeying surfaceparm trans.

Posted: Sat Sep 05, 2009 9:36 am
by AEon
That should be the reason, we plaster all other faces of the brush of a e.g. grate (with transparency) texture with nodraw instead of caulk, to void such issues, I think.

Re: Surfaces not obeying surfaceparm trans.

Posted: Sat Sep 05, 2009 3:30 pm
by Pat Howard
Hmmm... I'm using nodraw, not caulk. I haven't been able to look to see if you're right about nodraw though, so I'll test it soon.

Re: Surfaces not obeying surfaceparm trans.

Posted: Sat Sep 05, 2009 10:26 pm
by obsidian
surfaceparm trans tells the compiler that the surface is see-through and it should not cull objects behind it.

surfaceparm nonsolid tells the game that the surface should not have collision with players and weapon fire.

The latter is the one you want (though you'll likely also need the former).


@AEon: caulk blocks light and vis. No draw does not.

Re: Surfaces not obeying surfaceparm trans.

Posted: Sun Sep 06, 2009 3:05 am
by Pat Howard
Aha! Thanks a bunch for the help, guys.

-pat

Re: Surfaces not obeying surfaceparm trans. *SOLVED*

Posted: Tue Sep 08, 2009 11:52 am
by foralarx2k3
@obsidian: Thanks for that post ... I've recently had this same issue, so that's two peeps at least that response has helped.

Ian.