Faking volumetric lighting?

Discussion in 'Mapping Questions & Discussion' started by sevin, Apr 14, 2014.

  1. sevin

    aa sevin

    Messages:
    959
    Positive Ratings:
    663
    I was rereading some of the articles on nodraw.net today and came across the section where youme hits on the fake volumetric lighting present in front of the spawns on 2fort. Youme says they're not possible without some modeling knowledge. However that article was written almost 4 years ago so I was wondering if that's changed. Can you simply put a point_spotlight above the roofing to fake it or is there a simpler way? If not, could someone elaborate on how you would model lighting?
     
  2. Fr0Z3nR

    aa Fr0Z3nR Creator of blackholes & memes. Destroyer of forums

    Messages:
    6,391
    Positive Ratings:
    4,906
    It's still modeling as far as I can tell. light_spots or point_spots (I think the second one) is the closest you'll get to volumetric lighting without modeling.
     
    • Thanks Thanks x 1
  3. sevin

    aa sevin

    Messages:
    959
    Positive Ratings:
    663
    How are you supposed to model lights?
     
  4. Fr0Z3nR

    aa Fr0Z3nR Creator of blackholes & memes. Destroyer of forums

    Messages:
    6,391
    Positive Ratings:
    4,906
    You'll have to ask a modeler.
     
  5. xzzy

    aa xzzy

    Messages:
    815
    Positive Ratings:
    393
    It'd just be a transparent texture in the shape of the light you want. Open up hammer and look at models/props_manor/volume_light_01.mdl for an example.

    I think 2fort actually has a brush entity for those light motes but I don't have the source vmf downloaded to double check.
     
    • Thanks Thanks x 1
  6. Fr0Z3nR

    aa Fr0Z3nR Creator of blackholes & memes. Destroyer of forums

    Messages:
    6,391
    Positive Ratings:
    4,906
    The "god rays" in 2fort are models, iirc.
     
  7. Crash

    aa Crash func_nerd

    Messages:
    3,190
    Positive Ratings:
    4,916
    The beams are models, but there are little dust motes that are a brush entity.
     
  8. A Boojum Snark

    aa A Boojum Snark Toraipoddodezain Mazahabado

    Messages:
    4,769
    Positive Ratings:
    5,535
    func_dustmotes

    The rays you can actually do out of brushes with a translucent gradient material, you don't necessarily NEED a model.
     
    • Thanks Thanks x 1
  9. sevin

    aa sevin

    Messages:
    959
    Positive Ratings:
    663
    I checked the decompiled 2fort .vmf but was unable to find anything resembling the light rays, though I did find the dustmotes.
     
  10. Fr0Z3nR

    aa Fr0Z3nR Creator of blackholes & memes. Destroyer of forums

    Messages:
    6,391
    Positive Ratings:
    4,906
    Doesn't that cause some really weird visible seams and/or shadows?
     
  11. A Boojum Snark

    aa A Boojum Snark Toraipoddodezain Mazahabado

    Messages:
    4,769
    Positive Ratings:
    5,535
    I guess it could? You just need to disable shadows and set up the material right. As far as I am aware the material itself would be made the same whether you are putting it on a model or a brush (primary shader aside).
     
  12. xzzy

    aa xzzy

    Messages:
    815
    Positive Ratings:
    393
    Decompile may not have everything, if you still have the old non-steampipe SDK installed the actual original vmf will be in the mapsrc directory.
     
    • Thanks Thanks x 1
  13. Freyja

    aa Freyja ¯\_(ツ)_/¯

    Messages:
    2,879
    Positive Ratings:
    4,970
    It's really hard to see in the 2fort vmf, but it's certainly there, in the red base. It's just hammer renders transparency really badly so it practically doesn't show up.
     
    • Thanks Thanks x 1
  14. Ravidge

    aa Ravidge Grand Vizier

    Messages:
    1,544
    Positive Ratings:
    2,495
    I'm going to just echo this and say that using brushes for this is perfectly fine. It's been done since forever.

    It's probably easier to make it look nice as a model, but if you have no way of creating props yourself, using brushes and some effort will give you near identical results.
     
    • Thanks Thanks x 1
  15. sevin

    aa sevin

    Messages:
    959
    Positive Ratings:
    663
    So a brush with a special lighting texture on all sides will make it look like that? How would I create something like that? I feel like if you applied a texture to all the sides, even if it was transparent, it would just look like a rectangular not volumetric.
     
  16. A Boojum Snark

    aa A Boojum Snark Toraipoddodezain Mazahabado

    Messages:
    4,769
    Positive Ratings:
    5,535
    It is done with a texture that has a transparency gradient from partial to full (like I use for the light beams in eggwar). You just need to shape the brush right, and rotate the texture to the correct angle as well as stretching it to fit. The "end" face of the brush would just be nodraw. These materials also have the $nocull setting in them so that they render on both sides of the face.

    There is no magic "volumetic light" material, you just actually MAKE something that is bright, transparent, and fades away.
     
  17. Beetle

    Beetle L9: Fashionable Member

    Messages:
    627
    Positive Ratings:
    141
    It was done in TFC a ton, and for that time, it looked pretty good.