Faking volumetric lighting?

seth

aa
May 31, 2013
1,019
851
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?
 

seth

aa
May 31, 2013
1,019
851
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.

How are you supposed to model lights?
 

xzzy

aa
Jan 30, 2010
815
531
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.
 

seth

aa
May 31, 2013
1,019
851
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.

I checked the decompiled 2fort .vmf but was unable to find anything resembling the light rays, though I did find the dustmotes.
 

A Boojum Snark

Toraipoddodezain Mazahabado
aa
Nov 2, 2007
4,775
7,669
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).
 

xzzy

aa
Jan 30, 2010
815
531
I checked the decompiled 2fort .vmf but was unable to find anything resembling the light rays, though I did find the dustmotes.

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.
 

Freyja

aa
Jul 31, 2009
2,994
5,813
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.
 

Ravidge

Grand Vizier
aa
May 14, 2008
1,544
2,818
func_dustmotes

The rays you can actually do out of brushes with a translucent gradient material, you don't necessarily NEED a model.

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.
 

seth

aa
May 31, 2013
1,019
851
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.

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.
 

A Boojum Snark

Toraipoddodezain Mazahabado
aa
Nov 2, 2007
4,775
7,669
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.
 

Beetle

L9: Fashionable Member
Aug 17, 2008
627
178
It was done in TFC a ton, and for that time, it looked pretty good.