1. Hey there Guest,

    The game servers have moved to semi-dedicated hardware and IPs have changed. Please see front page server widget for up-to-date game server information.

I'd like a material to cast shadows.

Discussion in 'Mapping Questions & Discussion' started by Vel0city, Dec 23, 2014.

  1. Vel0city

    aa Vel0city func_fish

    Messages:
    1,938
    Positive Ratings:
    1,542
    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.
     
  2. Lampenpam

    aa Lampenpam

    Messages:
    1,019
    Positive Ratings:
    341
    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.
     
  3. sevin

    aa sevin

    Messages:
    959
    Positive Ratings:
    686
    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.
     
    • Thanks Thanks x 1
  4. Vel0city

    aa Vel0city func_fish

    Messages:
    1,938
    Positive Ratings:
    1,542
    That works on models, not on textures. I've tried. No result.
     
  5. radarhead

    aa radarhead Level 20 "Mapper"

    Messages:
    1,014
    Positive Ratings:
    562
    You could try to fake the grate pattern with a crosshatch of block light brushes.
     
  6. UKCS-Alias

    aa UKCS-Alias Mann vs Machine... or... Mapper vs Meta?

    Messages:
    1,264
    Positive Ratings:
    795
    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.
     
  7. Vel0city

    aa Vel0city func_fish

    Messages:
    1,938
    Positive Ratings:
    1,542
    Yeah, the detailing in those tunnels isn't finished. Heck, I haven't even started on it.
     
  8. EArkham

    aa EArkham Necromancer

    Messages:
    1,585
    Positive Ratings:
    2,318
    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: Dec 23, 2014