What would be the best way to... (A Lighting Question)

Discussion in 'Mapping Questions & Discussion' started by Kazagin, Aug 25, 2009.

  1. Kazagin

    Kazagin L3: Member

    Messages:
    130
    Positive Ratings:
    9
    The map I'm currently working on has a volcano, and I need to light the area around the rim of the volcano so that it looks like it is glowing red.
    I tried making a hollow sphere of "blocklight" around the area I want to be red, and putting a "light" entity with brightness and HDR brightness turned up to max and colored so that it would be red.
    It didn't work so well.

    What would be the best way to make the top of my volcano glow red, with the brightest parts being the lava?
    (Note: My "light_env" is shining right into the volcano, so I need a better way to stop it from shining in without effecting the red glow.)
     
  2. Terr

    aa Terr Cranky Coder

    Messages:
    1,591
    Positive Ratings:
    405
    Are you talking about people looking down into the volcano crater, and making the inner-walls (that touch the lava) red, or are you talking about from the perspective of outside-and-below the crater, seeing red light seeping around the edges? I don't know, so I'm just going to throw our ideas :p

    If it's the walls, perhaps a custom material as a decal that has some ways to make it appear to glow.

    If it's from outside looking up, maybe a huge point_spotlight (with the dynamic light flag off) can provide a very wide-angle light-beam effect, allowing people to see the glow "in the air" around the lip of the volcano.

    Failing that, you could make a semitransparent texture and put it on some func_brush planes that circle the edge, although this may look weird from the wrong angles. (The same way clouds are done in some 3D skyboxes.)
     
    • Thanks Thanks x 1
    Last edited: Aug 25, 2009
  3. Kazagin

    Kazagin L3: Member

    Messages:
    130
    Positive Ratings:
    9
    Both, actually.
     
  4. Terr

    aa Terr Cranky Coder

    Messages:
    1,591
    Positive Ratings:
    405
    Ah, so players are actually able to get both out-of-sight of the lava pit, and also look down into it? Hrmmmmm.
     
    • Thanks Thanks x 1
  5. Altaco

    Altaco L7: Fancy Member

    Messages:
    485
    Positive Ratings:
    121
    I think a custom texture with $selfillum would be your best bet.
     
    • Thanks Thanks x 1
  6. Kazagin

    Kazagin L3: Member

    Messages:
    130
    Positive Ratings:
    9
    Altaco, I have no idea what that means... :blushing:
     
  7. Altaco

    Altaco L7: Fancy Member

    Messages:
    485
    Positive Ratings:
    121
    You're going to want to have a custom texture for the volcano, a red-hot/molten rock sorta look. This'd be fine, but it'll look very flat and just red. So when making the vmt file for the material (the text file that basically tells what shaders to use, etc.) add $selfillum to it, which will make it look like it's glowing. Read up on material creation over at http://developer.valvesoftware.com/
     
    • Thanks Thanks x 1
  8. Kazagin

    Kazagin L3: Member

    Messages:
    130
    Positive Ratings:
    9
    What if I already have a texture for the lava?
    Just go into that one's VMT and add the $selfillum?
    Will it change the texture at all? (Besides adding the glow)
     
  9. Altaco

    Altaco L7: Fancy Member

    Messages:
    485
    Positive Ratings:
    121
    You'll want to add an extra alpha channel in photoshop, have it be black, and then have greyscale for how much you want it to be illuminated. Black = no illumination, white = fullbright. Then you just save the texture like that. If you add selfillum without that, it either won't work or all be bright, I forget which.
     
    • Thanks Thanks x 1
  10. Kazagin

    Kazagin L3: Member

    Messages:
    130
    Positive Ratings:
    9
    And it'll illuminate based on the color of the texture...?
     
  11. Altaco

    Altaco L7: Fancy Member

    Messages:
    485
    Positive Ratings:
    121
    All selfillum is is a sort of controlled fullbright. If your alpha channel is all white, the texture will always be fullbright. If you have a good mixing of tones in accordance with various part of the texture, you'll get different brightness levels, which depending on the amount of shadow on the surface, will give a good appearance of glowing in the dark.
    http://developer.valvesoftware.com/wiki/$selfillum
     
    • Thanks Thanks x 1
  12. Kazagin

    Kazagin L3: Member

    Messages:
    130
    Positive Ratings:
    9
    I think I'm starting to get it...
    If I put "$selfillum" and " $selfillumtint <255 0 0>" in the VMT and have the Alpha channel be about 40% Gray then I'll get a somewhat bright, red glow?
     
  13. Kazagin

    Kazagin L3: Member

    Messages:
    130
    Positive Ratings:
    9
    It works. :D
    It's not as noticeable as I would have hoped, but it (coupled with the awesome lava texture I made) makes my volcano look even better.
     
  14. Terr

    aa Terr Cranky Coder

    Messages:
    1,591
    Positive Ratings:
    405
    If you open up the 2fort SDK you can see how Valve did the "rays of sunshine in dusty air" outside the main RED spawn.

    It may be possible to do a similar effect around the lip of the volcano so that people outside the crate see the "air glow".

    (Pictures?)
     
    • Thanks Thanks x 1
  15. Kazagin

    Kazagin L3: Member

    Messages:
    130
    Positive Ratings:
    9
    Actually, Terr.
    Now that you mention that, I'd love to have little embers floating around the rim of my volcano.
    It's a good thing Valve released their maps to view in the SDK.
    Thanks for pointing that out, I don't really play 2Fort. (Or any CTF, for that matter.)
     
  16. Kazagin

    Kazagin L3: Member

    Messages:
    130
    Positive Ratings:
    9
    Sorry for double posting, but can someone link me to a good guide for making custom particles?
    The one I found here wasn't very helpful. :blush:
     
  17. Terr

    aa Terr Cranky Coder

    Messages:
    1,591
    Positive Ratings:
    405
    For me a lot of it was trial-and-error.

    If you start tf2 with the "-tools" command-line option, you can use the in-game particle editor which lets you save groups of particles into .pcf files. (You can use GCFScape to pull out some of the built-in ones to see how they already work.)

    IIRC, if your custom particles are saved in /particles/mystestparticles.pcf, you go to /particles/particles_manifest.txt and add an entry to your PCF in there (following the pattern.) Note that additional work is required if you want to distribute your PCF along with a map.

    http://developer.valvesoftware.com/wiki/Particles
     
  18. Kazagin

    Kazagin L3: Member

    Messages:
    130
    Positive Ratings:
    9
    How do I start tf2 with the "-tools" command-line option?
    (I suck at computers... :blush:)
     
  19. Terr

    aa Terr Cranky Coder

    Messages:
    1,591
    Positive Ratings:
    405
    IIRC, right-click on the game in steam, select "Create Desktop Shortcut". Then (on the windows desktop) right-click your new icon and select "properties". Add "-tools" to the end of the "Target:" field. Click OK. Rename the shortcut to "TF2 Tools Launch" or something to make it clear what it does.
     
  20. Kazagin

    Kazagin L3: Member

    Messages:
    130
    Positive Ratings:
    9
    I'm so close to making this work.
    Is there a guide to getting the Custom Particle to work in game?