I'd like a material to cast shadows.

  • If you're asking a question make sure to set the thread type to be a question!

Vel0city

func_fish
aa
Dec 6, 2014
1,947
1,589
Title. This material (the metal grates), which can be found under materials/metalgrate001a, doesn't cast shadows on the walls. I've added the same texture to the bottom of the brush that has the top covered in said texture, in the hopes that it would cast a shadow on the walls, however, it does not.

Do I have to edit a .vmt or do I have to make a lights.rad file next to the default lighting file to force the material to cast shadows via the alpha channel?


I'm using the VBCT for the compiling, otherwise my computer becomes unusable.
 
Mar 23, 2013
1,013
347
Try to lower the light grid of the faces where teh shadow would be. SInce the shadow would be really detailed it needs a small light grid. But don't forget that a tiny light grid uses up much more file size.
 

Vel0city

func_fish
aa
Dec 6, 2014
1,947
1,589
Compile with -textureshadows to get Hammer to use its alpha channel for shadows, then kick the lightmap grid down on the shaded faces really low if you really want to see it.

That works on models, not on textures. I've tried. No result.
 

UKCS-Alias

Mann vs Machine... or... Mapper vs Meta?
aa
Sep 8, 2008
1,264
816
You could try to fake the grate pattern with a crosshatch of block light brushes.
D: imagine the mess it would create in hammer when creating such grid... Only do that when you are desperate and when the effect is realy needed. Even if you hide it using visgroups i wouldnt realy be happy about it having such thing in my map. but then again, if there is no option it could work.
I however still remember such textures existing so maybe you can find one that at least matches the pattern (even if its a normal hl2 texture). Using that texture on a func_brush set to 'dont render' you can get such shadows being cast without letting the player see the texture you used.

To me its better to camouflage the issue entirely. I see a huge long path of boring stairs. Adding something to the roof to make it look less empty already would be a better alternative. Maybe some pipes. Maybe breaking up the roof of the stairs by adding in a gap which holds something else (ventilation system or whatever). Distract them from not noticing the missing shadow being cased.
 

Vel0city

func_fish
aa
Dec 6, 2014
1,947
1,589
D: imagine the mess it would create in hammer when creating such grid... Only do that when you are desperate and when the effect is realy needed. Even if you hide it using visgroups i wouldnt realy be happy about it having such thing in my map. but then again, if there is no option it could work.
I however still remember such textures existing so maybe you can find one that at least matches the pattern (even if its a normal hl2 texture). Using that texture on a func_brush set to 'dont render' you can get such shadows being cast without letting the player see the texture you used.

To me its better to camouflage the issue entirely. I see a huge long path of boring stairs. Adding something to the roof to make it look less empty already would be a better alternative. Maybe some pipes. Maybe breaking up the roof of the stairs by adding in a gap which holds something else (ventilation system or whatever). Distract them from not noticing the missing shadow being cased.

Yeah, the detailing in those tunnels isn't finished. Heck, I haven't even started on it.
 

EArkham

Necromancer
aa
Aug 14, 2009
1,625
2,773
Make an overlay texture of a grid-shaped shadow and use that. You can tile overlays vertically or horizontally and use a single 512x512 texture for the entire ramp you have in that pic.

Low resource, low effort, versatile.

Some trial and error to get it to line up to what ever your light source is illuminating, but probably easiest solution.
 
Last edited: