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

Kazagin

L3: Member
Aug 4, 2009
130
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.)
 

Terr

Cranky Coder
aa
Jul 31, 2009
1,590
410
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.)
 
Last edited:

Terr

Cranky Coder
aa
Jul 31, 2009
1,590
410
Ah, so players are actually able to get both out-of-sight of the lava pit, and also look down into it? Hrmmmmm.
 

Altaco

L420: High Member
Jul 3, 2008
484
120
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/
 

Kazagin

L3: Member
Aug 4, 2009
130
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)
 

Altaco

L420: High Member
Jul 3, 2008
484
120
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)

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.
 

Altaco

L420: High Member
Jul 3, 2008
484
120
And it'll illuminate based on the color of the texture...?

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
 

Kazagin

L3: Member
Aug 4, 2009
130
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?
 

Kazagin

L3: Member
Aug 4, 2009
130
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.
 

Terr

Cranky Coder
aa
Jul 31, 2009
1,590
410
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?)
 

Kazagin

L3: Member
Aug 4, 2009
130
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.)
 

Kazagin

L3: Member
Aug 4, 2009
130
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:
 

Terr

Cranky Coder
aa
Jul 31, 2009
1,590
410
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
 

Terr

Cranky Coder
aa
Jul 31, 2009
1,590
410
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.
 

Kazagin

L3: Member
Aug 4, 2009
130
9
I'm so close to making this work.
Is there a guide to getting the Custom Particle to work in game?