IrocJeff Posted August 18, 2014 Posted August 18, 2014 I wanted to add a chain link fence to my project but in my 3rd use of it I'm running into a bit of a problem with brushes and models vanishing behind the fence from different angles. Here is a fenced in area with some models and two brush lights behind it w/ light entities. In this shot its all fine. In this second image from a different angle a few things are going to be missing. Here I am missing all the models as well as the light brush on the right. I've used a few different shaders, including one from JO which was the ImpMine/grating shader and I end up with the same problem. Now, I don't have any problems where my other two Chain Link areas are. Here is the shader I'm currently using from a Quake 3 forum for a simple grate. textures/icestationwampa/chainlink{ surfaceparm metalsteps cull none // A GRATE OR GRILL THAT CAN BE SEEN FROM BOTH SIDES { map textures/icestationwampa/chainlink blendFunc GL_SRC_ALPHA GL_ONE_MINUS_SRC_ALPHA alphaFunc GT0 depthWrite rgbGen identity } { map $lightmap rgbGen identity blendFunc GL_DST_COLOR GL_ZERO depthFunc equal } }
mrwonko Posted August 18, 2014 Posted August 18, 2014 Q3Map2 doesn't know that shader is supposed to be transparent so it miscalculates the vis stage. Firstly, use system/nodraw_solid instead of caulk on the invisible sides of the brush, secondly add... I think it's surfaceparm nonopaque. It might be surfaceparm trans, or maybe you want both, I can't quite remember.Oh, and next time, put your shader in a tag so leading whitespace is displayed.
Solution IrocJeff Posted August 18, 2014 Author Solution Posted August 18, 2014 Q3Map2 doesn't know that shader is supposed to be transparent so it miscalculates the vis stage. Firstly, use system/nodraw_solid instead of caulk on the invisible sides of the brush, secondly add... I think it's surfaceparm nonopaque. It might be surfaceparm trans, or maybe you want both, I can't quite remember. Oh, and next time, put your shader in a tag so leading whitespace is displayed. It was the sufarceparm trans that needed to be added to the shader. I already had the brushes with nodraw/solid. Thanks.
Szico VII Posted August 30, 2014 Posted August 30, 2014 Make sure those grates are detail brushes - that will also solve your problem. AFAIK, surfaceparm trans means that it ignores vis calculations and light will pass through it, whereas nonopaque just means when calculating lighting, this surface will let light through, but for vis calculation purposes you cant see through it.
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now