Texture Lights and Bounce lighting in VRAD

This post is to describe the new commands added to Vrad, for your mapping pleasure. This is not intended to be a technical document, as I will be simplifying how vrad works. But, this should give you an idea of what is going on.
These options only effect the baked lightmap generated by vrad, they will not effect impact in-game performance.

-choptexlights: Enables chopping of texture lights. Control texture light quality with lightmap density in hammer. Dramatically increases both texture light quality and render time. -extratransfers: Enable overscaling of light transfers -transferscale:: default 1.0 ; This is the scale factor of light transfers. increased values make surfaces transfer extra light (a scale of 2.0-4.0 suggested) -satthresh: Default 0.4 ; This is the threshold that checks how saturated a material color is. Used with -satthreshscale: -satthreshscale: Default 3.0 ; The amount to scale light transfers from surfaces that pass the saturation threshold-choptexlights (False by default)[/size]
[/size]
Vrad “chops” the bsp surfaces into “patches” that get the calculated lighting. the patches act as the pixels of the light map so to speak. Vrad chops up surfaces according to the lightmap size, set in hammer. vrad takes the light brightness values from each patch, and raytraces that data to every other patch in a large huge matrix; also using fancy physics based falloff calculations. When texture lights are used, these patches are set to be bright, and give off light.

By default, vrad is set to ignore the chopping of surfaces that have flagged unlit materials. It is set this way to save compile time, because surfaces that don’t receive lighting ( such as nodraw and water, etc.) don’t need to have detailed lightmaps.

The problem with this, is that if you use texture lights, the texture light material will not be chopped, and you get something like this:

Exciting blobs of light coming from patches that are too big!

So to fix this,

1. Add a small lightmap value to your texture lights.
2. compile with -choptexlights to true.

and you will get something like this:

A few notes:

1. be careful with the lightmap size, it’s like adding thousands of point lights. If your area light right next to a wall, like above, then use smaller light maps, but if it is far away, small lightmaps are not needed.
2. It is possible, for example, to have a modelled light fixture (neon signs, etc. ) use a texture light:


Now you can have your “Eat-at-Joe’s” sign light up more realistically in source.

[/size]
-extratransfers (default set to false)[/size]
-transferscale: Default 1.0[/size]

As described above, patches give light to other patches. So this option lets you set a multiplier for how much light gets transferred. This can be used to uniformly scale up the lighting in a dark map for example. It is especially good for maps that rely heavily on natural light for indoor lighting.
To use this, set -extratransfers to true and give a value (other than 1) to -transferscale.

value of 1:

[/size]higher values:

-satthresh: Default 0.4 ;
-satthreshscale: Default 3.0[/size]

This, when used with the above command, lets you choose only saturated textures to apply extra light transfers to.

-satthresh is a value from 0.0 to 1.0 that represents the “saturation” value in a HSV calculation derived from the material color.
setting this to 0.0 will exaggerate all materials, while a value of 0.5 will exaggerate only materials with a saturation of 0.5 or higher.

-satthreshscale is the multiplication factor of the desired saturated material.

The red textures are transferring way more light and color to the surrounding textures, while the bland textures on the right are mostly unaffected.

This could be used to get a “mirror’s edge” type of effect, to exaggerate red painted objectives for example.

That’s all folks, let me know if you need any clarification!

Oh my god, now I can blow up maps with radiosity all I want?! This is waaaay better than tweaking VMT values.

Also, texlights on models! That’s like, half of my (reasonable) vrad wishlist.

Awwww yeah, bringing textlights back!
Party like it’s… [looks it up] 2014, according to the last community-made goldsource RAD release.
Either way, more saturated radiosity and making texlights viable again is super great as far as I’m concerned. Those were my biggest complaints about VRAD in source.

Founded in 2004, Leakfree.org became one of the first online communities dedicated to Valve’s Source engine development. It is more famously known for the formation of Black Mesa: Source under the 'Leakfree Modification Team' handle in September 2004.