Jump to content

Disappearing Stuff Behind Fence Shader


Go to solution Solved by IrocJeff,

Recommended Posts

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.

 

shot0177_zps08edc958.jpg

 

 

In this second image from a different angle a few things are going to be missing.

 

shot0178_zps7e1dd7a4.jpg

 

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 
 } 

 

 

Link to comment

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.
Link to comment
  • Solution

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.

Link to comment
  • 2 weeks later...

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.

Link to comment

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...