How to create "sunlight"
Before you get started
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)
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).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:
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.
Go crazy
This guide was created by its original author on the Steam Community. Are you the author and want it removed? Request removal.