Source Filmmaker

Source Filmmaker

391 ratings
How to create "sunlight"
By Shazi
A guide on how to relight a map to create a whole new atmosphere
5
9
2
   
Award
Favorite
Favorited
Unfavorite
Before you get started
This works best on maps with no lighting. Since you will be relighting the map, you need to be able to overwrite the existing lights on the map with your new ones.

This means either using toneMapScale (dont) or using a dark version of the map with no lights. There are 3 ways to get a dark version of the map:
  • Use the Hammer editor and remove the lights on the map
  • Find a dark version of the map on the SFM workshop (sometimes there aren't any)
  • Use a light deleter[sfmlab.com] (instructions are included on their website)
Once you are done with this open the map up in SFM. For the purposes of this guide, I will be using koth_lakeside to demonstrate.
Setting up the "Sun"
SFM's lights are limited by the fact that they are point lights, meaning that the light comes out of a single point in space. However, there are ways to work around these issues to create a parallel light such as the sun.

First, create a new light and place it high in the sky where you would like your sun to be. Set it's color to roughly the color of the sun (can be any color, but for this guide I will be mimicking the sun)

This is roughly the color to mimic the sun, experiment around with whatever works for you. Also make sure to set its FOV to the maximum to cover as much area as possible.

Set the brightness of the light using intensity and linearAttenuation. Avoid using too much linearAttenuation however as it will cause a lot of bloom. Remap the maximum intensity value if you need to.

Next, right click on the light's maxDistance > Remap Slider Range and change the max value to 90,000. Do the same for farZAtten. Set both of these values as well as minDistance to their max.

Next, set the light's radius to 40, and set its shadowFilterSize and shadowAtten to close to their minimum (experiment with this to see what looks best).


At this point, your scene should look a little something like this:

The shadows are extremely dark and doesn't fit the time of day at all. We will fix this next.
Background and soft lighting
To reduce the "harshness" of the shadows created by our "sun", we need to add many background and edge lights to make the environment reflect light back up realistically.

First, duplicate the light you just created to mimic the sun and move it to light the scene from the other direction.
Sun:


Duplicate:


This new light will have to have shadows disabled to avoid having 2 shadows, and will have to be significantly dimmer than the sun.


This is already a huge improvement, but we can continue to make this better.

Next we will add a light underneath the world shining up. This light will simulate sunlight bouncing off of the ground and back into the scene.


Make sure this light also has shadows disabled so it can actually shine through the ground. This light will also need to be darker than the previous 2.



From here, all you need to do is light the rest of the scene as you see fit. In my example, the part under the awning where the small health pack is as well as the background both are way too dark and need extra lighting. I also added some extra rim lights to the sniper to make him stand out as well.
Go crazy
Use this anyway you want to. It doesn't have to be the sun, it can be any color, placed at any angle. Experiment around. Change the values of the lights, change the bloom, etc. Use it to add lighting from the massive neon signs on koth_king. Use it to light a massive explosion. There are endless possibilities.
40 Comments
Jofoyo 24 Apr @ 6:49pm 
Just a note which could be useful for the guide, the higher your lights FOV, the lower the quality of the sun shadows will be, since the shadow maps need to dedicate more resolution to a larger surface area. Adding -sfm_shadowmapres 8192 to the launch options can help negate this but it's still good to try and conserve your lights FOVs to maximize your scenes shadow resolution and retain high frequency detail.
svenwlive #FixTF2 7 Mar @ 10:29am 
thank you for this, it's very helpful :steamthis:
KRcanondaisa 24 Jan, 2022 @ 2:45pm 
super helpful, I didn't know you could add lights below a map and have the light shine through until now. thank you so much!!
nttain 23 Jan, 2022 @ 7:21pm 
it was just a joke but ok...
Shazi  [author] 23 Jan, 2022 @ 6:37pm 
@nttain you can make a red sun by manipulating the color sliders for all the lights to create a red color
nttain 23 Jan, 2022 @ 5:03pm 
how to create gigantic big sun red
Mr. Nirvana 8 Jan, 2022 @ 7:49pm 
sex
mruganim 21 Dec, 2021 @ 12:31am 
Well thanks bro cuz im REALLY bad at SFM.
WetEgg 8 Jul, 2021 @ 11:35am 
This was extremely helpful, thank you!
TurnTwister 6 Jul, 2021 @ 3:11pm 
you forgot the blue sky light