Metal Grate Shadows

Avatar
Brainstatic
219 Posts
Posted Sep 15, 2011
I'm running into a problem where lightmap shadows cast by a metal grate are almost perfectly black. Look at this screenshot to see what I'm talking about. There are two units of empty space in between the grate and the portalable wall behind it.

There's one other grate in the map the same distance away from the wall, which was running into the exact same problem until I used a projected texture. The two grates are fairly close to one another, preventing me from doing anything where I would switch projected textures on and off depending on where the player is looking.

You've probably already guessed my question: How can I fix this? Before you ask, yes, I have tried making the portalable wall a func_brush and setting it to disable receiving shadows, which did not work. I have also tried making the grating a func_brush, but this caused portals to be placed on the metal grate rather than behind it. That is, until I set the func_brush to never solid, at which point the player and solid objects could just go through the grate.

Advertisement
Registered users don’t see ads! Register now!
Avatar
Random
171 Posts
Posted Sep 15, 2011
Replied 11 minutes later
What compile settings are you using? I had the same problem when I tried to compile on final. I ended up giving it these commands to fix it:

vrad.exe -both -final -textureshadows -StaticPropLighting -StaticPropPolys

If this doesn't work, I know you can set a brush's "minumum light level" or something.

Avatar
Brainstatic
219 Posts
Posted Sep 15, 2011
Replied 6 minutes later

Random wrote:
What compile settings are you using? I had the same problem when I tried to compile on final. I ended up giving it these commands to fix it:
vrad.exe -both -final -textureshadows -StaticPropLighting -StaticPropPolys
If this doesn't work, I know you can set a brush's "minumum light level" or something.

I'm doing an LDR only compile. Doing a final compile makes all the lights in my map insanely bright for some reason. So thank you, and I will try that tomorrow. I think adjusting the light map scale of the portalable wall texture may also help, so I will try that too.

Avatar
Vordwann
767 Posts
Posted Sep 16, 2011
Replied 6 hours later
If all else fails, turn the brush with the grate textures into a func_brush and disable shadows.
Avatar
Brainstatic
219 Posts
Posted Sep 16, 2011
Replied 7 hours later

BOB74j wrote:
I have also tried making the grating a func_brush, but this caused portals to be placed on the metal grate rather than behind it. That is, until I set the func_brush to never solid, at which point the player and solid objects could just go through the grate.

Vordwann wrote:
If all else fails, turn the brush with the grate textures into a func_brush and disable shadows.

:sigh:
I may be doing something wrong with that myself, but please read next time.

Avatar
Vordwann
767 Posts
Posted Sep 16, 2011
Replied 46 minutes later
Make it solid, but with no shadows.
Avatar
Random
171 Posts
Posted Sep 16, 2011
Replied 41 minutes later

Vordwann wrote:
Make it solid, but with no shadows.

BOB74j wrote:
I have also tried making the grating a func_brush, but this caused portals to be placed on the metal grate rather than behind it

A solid brush will make the whole thing completely solid... if you didn't have any physics objects you'd be able to cover a non-solid brush with a playerclip, but I've yet to find anything that is correctly solid to objects but not portals.

Any luck with the light density yet?

Avatar
Brainstatic
219 Posts
Posted Sep 16, 2011
Replied 36 minutes later

Quote:
Any luck with the light density yet?

I literally set the lightmap scale of the portalable wall over 9000 and that didn't help at all. I'm going to try increasing the lightmap scale of the grate as well to see if that will actually help.

Also, something else that I noticed. I'm looking in the vmf of sp_a3_speed_ramp, and Valve has their metal grates in the second room of the map (through which you can shoot portals) tied to func_brushes set to always solid. When I did this with the grates, portals would be placed on the grates rather than behind them. I'm guessing that's due to one of three things:

1. Valve made their grates 8 units thick, while mine are only two.
2. Valve has eight units of space in between their grates and the floor, while I only have two units of space in between my grates and the wall.
3. Valve's grates have nodraw on the four small faces of the grate. I do not.

I will try each of those things one by one. If none of those work, I will be angry.

Avatar
Nyskrte
125 Posts
Posted Sep 16, 2011
Replied 33 minutes later
This is how I deal with grates:

  1. Make the grate a func_brush that is not solid or casting shadows.
  2. Put a playerclip brush over it.
  3. Put yet another brush over it (I use a trigger texture to seperate it from the other brushes), and then make that a func_clip_vphysics.

This works.

Advertisement
Registered users don’t see ads! Register now!
Avatar
Brainstatic
219 Posts
Posted Sep 16, 2011
Replied 55 minutes later

Nyskrte wrote:
1. Make the grate a func_brush that is not solid or casting shadows.
2. Put a playerclip brush over it.
3. Put yet another brush over it (I use a trigger texture to seperate it from the other brushes), and then make that a func_clip_vphysics.

This works.

Yes, that seems to be the case. It looks quite a bit better now. Thank you!