Jump to content

Weird glitch when using grid shader


Go to solution Solved by NAB622,

Recommended Posts

Posted

Hello, so I'm trying to make some map and there's an area that's surrounded by grid fencing. I made the shader for fence texures using this guide: https://icculus.org/gtkradiant/documentation/Q3AShader_Manual/ch06/pg6_1.htm. But there's some glitch happening near certain parts of the fencing. What it does is basically it makes some brushes behind that fence invisible and obviously it makes the map very ugly when it happens. I suppose it is something with the shader but I'm not sure, tried searching for the solution but didn't find anything. Will be very grateful if someone helps me with this. Here's a photo of the glitch and also a video where you can see what the problem is: https://imgur.com/a/JlHI2DT

mpprob.jpg

  • Solution
Posted

Actually, your shader is good! This is a vis issue.

The fix is easy, you just need to make your fence brushes detail. Assuming you're using Radiant,  Select the fence brushes and press ctrl+m. Recompile and all should be well. (Edit: You can toggle detail brushes on/off in Radiant by pressing Ctrl+D to verify it worked.)

As a rule of thumb, any brush that has a transparency shader on it must be made detail to avoid this.

 

How large is the map you're making? You may be well on your way to MAX_MAP_VISIBILITY and long compile times, and a little understanding now will help a lot in the long run.

jo_the_rooster likes this
Posted

Making transparent brushes detail is a good habit, but it should happen automatically if you use nodraw_solid for the invisible sides instead of caulk. There's also a surfaceparm you can give your shader to make it behave in the same way, but I'm not quite sure which of the ones nodraw_solid uses it is; probably either surfaceparm trans or nonopaque.

Posted
14 hours ago, NAB622 said:

Actually, your shader is good! This is a vis issue.

The fix is easy, you just need to make your fence brushes detail. Assuming you're using Radiant,  Select the fence brushes and press ctrl+m. Recompile and all should be well. (Edit: You can toggle detail brushes on/off in Radiant by pressing Ctrl+D to verify it worked.)

As a rule of thumb, any brush that has a transparency shader on it must be made detail to avoid this.

 

How large is the map you're making? You may be well on your way to MAX_MAP_VISIBILITY and long compile times, and a little understanding now will help a lot in the long run.

Thank you very much! Making them detail solved the problem. 

The map is relatively small and it's pretty much done now, just need to import some models, set the lighting, do some entity editing and that will be it. Haven't heard of that MAX_MAP_VISIBILITY problem but i suppose it has something to do with too much structural brushes on the map? 

Posted
3 minutes ago, jo_the_rooster said:

Haven't heard of that MAX_MAP_VISIBILITY problem but i suppose it has something to do with too much structural brushes on the map? 

Yeah, if you don't properly use detail brushes it will happen. There's a threshold of portals that triggers it, I forget what the number is. If you do intend to make larger maps in the future, look up a tutorial for visibility, or post here and someone can point you in the right direction. It's very simple to do, and it saves time if you use it correctly from the start.

 

Either way, I'm glad your stuff is all working now!

jo_the_rooster likes this
Posted
3 hours ago, mrwonko said:

Making transparent brushes detail is a good habit, but it should happen automatically if you use nodraw_solid for the invisible sides instead of caulk. There's also a surfaceparm you can give your shader to make it behave in the same way, but I'm not quite sure which of the ones nodraw_solid uses it is; probably either surfaceparm trans or nonopaque.

I stumbled upon this topic with a similar problem and i guess both trans and nonopaque can be used. But i think I'll stick with making brushes detail for now. Thanks for help also.

 

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...