Source Filmmaker

Source Filmmaker

953 ratings
How to Light Characters from the Ground Up (or something)
By Leg4Me
Man explains how he lights character model with Source Filmmaker without any map lights
3
3
14
3
   
Award
Favorite
Favorited
Unfavorite
??? - Intro
Heyo!

This guide will show you how I get along with my lights in the program which you've heard of before, that being Source Filmmaker.

As you've probably figured out from the title of this guide, I will only be focusing on character specific lighting: Because explaining how to light up maps and/or scenebuilds is really difficult, due to each of them being different from each other.

There is a chance I update the guide in the future with a few more tricks, but wont promise anything.

And even though this is a guide, try to change stuff around instead of going for 1:1 recreation. While this is my way to to lights, it is not the "real" or "set on stone" way.



Lastly, English is not my native language, so some parts might not be explained well or there will be many grammar errors.

To make up for that, here is a funny video I've found:
0.1 - Basic Info for Starters - Map Choice
First of all, make sure you are in a void map, where are no lights or props by default.

This is important because if you are in a map with lights on, the results won't be the same as shown in here. And if the map has props, you'll have to position and set the lights so that some lights don't interact with the world. I might do a guide on map lighting but that will be more complicated to explain than just a character

I will be using this map in this guide: https://gtm.steamproxy.vip/sharedfiles/filedetails/?id=376809574
But SFM has a few void maps by default, black_void.bsp and dark_room.bsp to name a couple.
0.2 - Basic Info for Starters - Scene Hierarchy: Animation Set Groups
This will not affect lights at all, but it is something that I feel that will come in handy for future projects.

In Animation Set Editor, you can see an icon of a gear with an arrow pointing downwards. Click on it and check "Show Scene Hierarchy".

What this will do is that it enables SFM's grouping feature. As I already said, this will not affect your lights in any way, but it makes navigating trough your Animation Sets that much more enjoyable, especially when you got a scenebuild going on and/or you have many lights.

As an example, I will be showing how much difference it makes with an old scenebuild I did.


Before

After


As you can see, it made the navigation that much easier.

Also it automatically creates groups for lights and cameras, anything else has to be made manually (Select your model(s) > Right Click > Create Group)

0.3 - Basic Info for Starters - Lights, Camera and Remapping
"Hey so I loaded in this void map and I cant see anything did my sfm broke or-"

Now that's out of the way, lets focus on some camera settings. For that we need to create a camera in the Animation Set Editor

If you spawned in an model, or created a new camera in "Change Scene Camera", you'll have to Right Click in the Editor, and click on "Create Animation Set(s) for Existing Element(s)" as shown in here:


In there select the camera (It should be the only thing available) and you should have a new Set for the camera.

If you haven't done anything yet or that was empty, you can just spawn a new camera by doing the same thing, but instead of going in to Existing Elements, click on "Create Animation Set for New Camera".

Now if you want to move the camera around, you have to have the cameras Set selected for movement.

"Why do I need to do this? It is just so much easier to move the camera without it being an animation set"

You'll need it for better camera samples, and it gives you settings to use with your camera (Which I will explain what to do with when we actually get on the subject)

Camera Samples can be selected by Right Clicking your viewport, selecting "Render Settings" and in there you should see this:
In there change the samples of "Depth Of Field" to 512. Minimum of 256. This will increase your rendering time, but it shouldn't hit it too hard.


This will be useful for both Depth of Field (yeah) and lights that have the "Radius" setting modified, WHICH WILL BE USED QUITE A LOT TROUGH THIS GUIDE.


And if you are wondering what that does:
In this image I only used one light with sharp, dark shadows. Everything else is the same between the lights except the radius setting. SFM default DoF setting is really low, so it reacts to the radius, which blurs out the light, very poorly.


And the last thing before moving on to the actual subject, you can see how I marked the radius settings in-between of 0 to 150.

That does not mean that the value of the slider can be directly set to 50 or 150, since it only reads values in between of 0 and 1: You have to remap it manually.

SFM's default Maximum value of radius is 50, so anything higher has to be edited in. And that happens with remapping the values. To remap them, go to the slider you want to modify, Right Click, and then click the "Remap Slider Range" button.


There you see these options, and you are free to change them around as you want.




Lastly but most importantly:

You've might noticed that SFM has a light "limit" of 8 lights, but that is only for lights with Shadows.

So to disable shadows on lights which won't need it: Right Click on the light which you wish to remove it from, and simply hit the "Disable Shadows" thing. That easy that I wont need to take a screenshot for it.
1.0 - The Lighting - Camera Settings
Now that is out of the way, its time for the real deal!

First of all, you should do the posing first, or at least to the point you think its 95% finished.

When you are happy with what you have, lets check out the camera settings first: If you are experienced with those, you can skip this part.


1) As I explained above, in the Render Settings, set Depth of Field to 512. If you have a weaker PC, 256 is enough. If you want, you can set it to 1024. As I said, 256 is the minimum you want.

Now to the actual camera settings:

2) These are something you have to figure out yourself, as they depend on the scene you are working with.
-fieldOfView should be around the default value or bellow.
-focalDistance sets the focus point, so set that so that its just a bit behind your character.
-aperture defines how strong the Depth of Field is, so play around with that.
You can see the result by going to the clip editor.

3) Two cursed options to be quite honest
-toneMapScale adjusts the brightness of the camera, but keep it in the default position, since it affects everything, including anything that glows in dark (Skyboxes, models with glowning bits, particles, etc).
-bloomScale is for bloom. Disable it. Please.

4) And we are at the ambient occlusion part: The first part that I actually guide you in
-SSAOBias marks how much of AO there is. Set it right bellow where SSAORadius is currently set.
-SSAOStrength is self explanatory; it changes the strenght of AO. Set is veery low, but not too low that its gone.
-SSAORadius makes AO spread less or more. That should be about a quarter in.
1.1 - The Lighting - Fill Lights
Our first light set will be the Fill lights.

To explain the purpose of them quickly: They will act as the shadow, as shadows are rarely pure black. It depends of the scenario and the type of lights, but if you go outside and look around how the sun lights up everything, I can assure you that the shadows you see have some color.


For this I want to create a "sunny-noon" setting, so I will be using light-blue fills. The settings should look something like this: Shadows Disabled, intensity very low with constant-/linearAttenuation boosting it up a bit, FOV to the max, radius set to around 200, 550 or more, depending on how smooth you want it to be (200 should be just enough). Be sure to visit Clip Editor to see how your light will look, as it should look something like in the image above.

When you have a light that you think is okay, copy-paste the same light 4 times (The way I do it is just copy it once first, set it to position, and then copy-paste them both) and position them like so:

Or in words, put one of each to Right, Left, Up and Down to your subject, so it is in middle of all of your lights. If you did it right, Clip Editor should show you a results familiar to this
1.2 - The Lighting - Main Lights
Main Lights are the meaty lights, which is self-explanatory since they are the lights that affects your setting the most.

Lets start with the Key light, which will be the most important light to set up.

I have mine set with 150 Radius, and set to be light orange.


Because SFM's lights are pretty much just projected textures, they miss the shape of real lights, if that makes any sense. So I will set two lights that I call "Point Lights", as I don't know if they have a real name. There will be two of them, both having around 350 Radius in and Shadows disabled here: One which points from the direction of the key light (Right), and one from the opposite side (Left). The opposite one should be darker than the one which points at the same direction as the Key Light.
(In the example image I didn't pre-render it so it is easier to show the direction of the lights)


Going on with the theme of "SFM lights are not like real lights yadda yadda", I will be adding two rimlights early on the same way I did Point Lights (And I did not pre-render them either for easier viewing).
I will be setting them to have 550 Radius with full FOV and no shadows, so it covers up and rounds up the models lights well.


Here we have how all of these lights should look like together rendered up. It looks pretty good, but because i excluded the fill lights here which we made earlier, the shadows look a bit too dark, yes? So with everything so far enabled, it could look something like this:


That looks quite spicy, even if I say so myself! But it lacks some depth and contrast, so the thing that's gonna help with that would be...
1.3 - The Lighting - Rim Lights
...The Rim Lights!

So lets start with more Radius trickery


Here I have set a light so it points directly behind him, it has:
350 Radius, max FOV, low intensity, no shadows and constantAttenuation enabled.

Rendered it instead of showing the raw due to it not being very visible that way


Now we have the "usual" rims, the light on right has shadows enabled, radius at ~62.5, sharp shadows, low intensity with constantAttenuation enabled. The left one has shadows disabled, 150 radius, and same intensity settings as the other one.

Left image is unrendered, Right image is rendered. Obvious stuff but hey.


And now for something uncommon and absolutely gimmicky, which I will explain better later on the guide:

Left Image:
Spawn in a new light, keep it's shadows and have it positioned kinda like so (Inner Frustum being camera)

Right Image:
Look for shadowDepthBias, remap it and edit the Min value to -0.01. After doing so, go to the slider again and slide it down to the Min value. You should have something that looks like this.


As I said earlier, I will be explaining what in the bloody hell is this in better detail, but so I don't leave you hanging:

Either bring shadowAtten all the way down, or enable constantAttenuation, mess around with shadowFilterSize to change the thickness of the border, add ~25 radius to make it less blocky and minDistance and/or shadowDepthBias can determine in which places the border will be visible. This is rendered.

I will be explaining this in better detail at 3.2.


This is how all of the Rim Lights look together, neon looking lad


And here is how all so far should look like. Now all what is missing here is one set of lights
1.4 - The Lighting - Environment Lights and Quick Look at Element Viewer
Environment Lights are self explanatory: They are set so it reflects the lights in the environment.

That said, I will go trough these really quick.


Top Left:
This light has shadows enabled, and 250 Radius.

Top Right:
The Bounce Lights. Here there are 2 light which are copies of each under him, one slightly to left and one to right, since once light wouldn't be balanced enough. They do not have shadows and has 450 Radius with full FOV.

Bottom Left:
Even more rimlights to smooth lights up, yeehaw! One light to each side, reflecting the colors you currently have (Light Orange to right and Light Blue to left, as you've seen). No Shadows and 250 Radius.

Bottom Right:
All Together.



Here is how it looks with everything enabled. It is pretty much done, but one thing that has been bothering me trough out this whole guide is how shiny his nose is. This is because of Phong.

So to lower it without screwing with the .vmt file, we can do it with Material Overrides.

With no specific order: Right Click on your model, hoover your cursor over "Show in Element Viewer" and click on Model. Before/After that, Right Click again and look for "Add Override Materials".

Doing this will open up the Element Viewer menu of the characters materials for you, which can be a very powerful tool for almost anything.


After that is open, look for + materials and click on the plus to open the sub-menu. In there seek for the part which you want to lower the phong of (It should be easy for models with basic materials, like the TF2 mercs).

There are many ways to change the phong with, but we are going to use $phongboost in this scenario. Right Click on the material, point at "Add Attribute", select float so it knows you want to change the values, and type in $phongboost. After doing so, I won't suggest to leave the bit to 0, so play around with the values. Here I have it set to 0.25



And just a quick thing I feel like throwing in since I dont want to make another segment for basically just one image:

One very last thing I want to do is
that I want to change the color of AO. So same as what was shown earlier, Right Click on your camera, point at Show in Element Viewer and then click on Camera.

There you can see a lot of hidden features, but the one we want to modify is SSAOTint. In this case I have set it to dark-orange.


Here we go! Looks like we are finally ready to render!
1.5 - The Lighting - Rendering
Now that you've got a render you have happy with, it is time to render it.

In this case that we only have a character in our render, this guide will help you how to get rid of the background as clean as possible (It is extra work, but better do that than have it ruined by green outlines)
https://gtm.steamproxy.vip/sharedfiles/filedetails/?id=821085748

Then after doing some Post Processing, what I did was Color Correction, a small Paint Over with Clip Studio as a test to clean the bigger edges of the model and slapped in a simple background, you should be set and done!


There it is, our beautiful baby boy
2.0 - Additional Lighting - Subsurface Scattering
As I said many time trough out this guide, SFM lights are not like real lights, so you have to come up with some clever tricks to work-around the flaws.

In this case: Source Filmmaker does not support Subsurface Scattering. So you have to do it manually with lights.

What is Subsurface Scattering?
Quickest answer would be that put your hand on front of a bright light. See the red glow on it? That is Subsurface Scattering.

This is also a trick that you shouldn't do all the time, as skin does not do that if you are in the dark for example. And I usually do this with more "realistic" models. Maybe sometimes with TF2 models but that really depends of the lighting.

The model is this bad boy right here https://gtm.steamproxy.vip/sharedfiles/filedetails/?id=1514796795

And a Super quick rundown of the lights juust in case:


So to beginners or less experienced, it looks just fine. But in more experienced users eyes, his skin is pretty thick. Sun is glowing at his face and hand and no redness to be seen.

I will only be going trough how I did it with the head, so I don't flood the guide with too many images because the hand the same lights as the head, except from one.


All the lights shown in here are shadowless:

Top Left:
The Brightest spot of his face should be highlighted with Red-ish Orange light.

Top Right:
This light is set to follow up with the Key light. It is as red as possible.

Bottom Left:
It might be a bit hard to see, but its basically the Fill Light of our scattering: It covers up the darker spot of his face.

Bottom Right:
Might be even harder to see, but here I added the same light to his chest area.




With all of those together (and repeating first 3 lights to the hand), you should have lights that look like this. It does not matter if they go over to clothes and objects a bit, if your other lights are bright enough.
If you are having issues getting the lights to hit the correct spots, I'd suggest you to enable uberlights, and mess around with cutOn and cutOff so they don't collide with other things.



And now it is render ready. It was the smallest thing, but it made a big difference!



The finished render after small fixes and color correction. Rendered with the same way as I did with the Heavy render.
2.1 - Additional Lighting - PBR (Physically Based Rendering) Models
https://gtm.steamproxy.vip/sharedfiles/filedetails/?id=1637499824

Have you ever downloaded a model that has metallic bits, but for you the parts are completely black (Left Image)? And when you try to light it up (Right Image)*, it leaves these ugly black spots behind?

*I have disabled Fill Lights to demonstrate the issue, otherwise everything is just as shown twice by now, plus a volumetric.


These models has build-in pseudo PBR system[forum.facepunch.com], which mimics how more modern engines render things like, to name one, metallic parts. (Link goes to a Facepunch thread which explains how the trick is done, for you modeler people out there)

That example image with lights on is missing Fill Lights, because to make the materials work properly, you need to do a bit of tweaking to them.

If you have been following this guide from the Fill Lights, you can see that here we have 2 more lights. So now you should have the lights set all around your character, one light to: Left, Right, Up, Down, Front and Back.

And this time the DoF and Radius settings are very important. Minimum Depth Of Field Sample rate is 256, and minimum Radius value for these lights right around at 200, and full FoV at each light.. They can go above that, as I have DoF at previously stated 512, and all of these lights at 450 Radius. One thing that would also be recommended (as pointed by the colors on that sketch) is this time color your Lights to match more with your main lights. In my render, I have the Key light coming from left, so I made the left side orange, while keeping rest blue.



This is the result. Now the previously dark spots are all gone.



This time only did color correction on post process, so going straight to the rendered image. As stated above, ugly spots are gone. Hurray!
3.0 - Light Gimmicks - Negative Lights
And now we get to the interesting stuff! Almost each of these includes slider remapping, which I explained earlier in this guide.

But lets start with the most common of the bunch: Negative Lights.

They are pretty much what they are called: Lights, that are negative! I bet you did not know that!


So to get started, spawn a new light and disable shadows from it (You can use shadows, but they are pretty broken). Then remap the intensity value so that the Min value is -1000. Now when you set it all the way to Min, you can see some interesting results:

1000 to Max (SFM Default)

1000 to Min
You can fix the seemingly blue bits by modifying the color settings. Since the light is negative, the color sliders do the opposite too. For an example: Sliding the Red slider all the way to the Minimum makes the light red.



They both has the 4 light with 450 Radius fill light set up, and that one light.

You might be thinking: "What kind of use does this even have? It looks pretty bad tbh :/"

One example I can give out right away is to make some cartoon styled lighting, or Cel Shading.

Here is an example all in-engine, the same Fills, 2 negative lights coming from left with all in to Min, and constantAttenuation enabled. And there is a Key light too. I admit that this looks pretty ugly, but it is the best you can do without post-process editing. Because you can not set the negative lights to be grey while staying sharp, since even it being just a tiny bit brighter (less dark?), it smooths it up.

And here, same lights (Without the Key Light), but rendered separately: Fill Lights by their own, and second render with mat_fullbright 1 on console (doing that lets you keep lights while in fullbright, instead of disabling every light like the "Enable Lighting" button does.) and changing Engineers textures into pure white via $basetexture Material Override. Then in Photoshop I changed the fullbright render layer into Multiply, and opacity to 20%.
You can also do this trick without using negative lights or the material hassle: Just have a REALLY bright light instead of the negatives, and when you bring that in an image editing software, just invert the layer. This is much easier and faster to do, but since I am explaining these lights...

With a bit of effort, the results are 10 times better ;)
3.1 - Light Gimmicks - Grainy Uberlights
This is a trick which I have been using a lot, from Fill Lights, Key Lights to Rim Lights. Sometimes I have this on all of my lights. You can see it on Heavys and Kiryus Fills and Key Lights, and as well on the Subsurface lights..

To make the thing possible, you have to have uberlights enabled. After enabling it, look for edgeWidth and -Height, and get them all the way to the minimum value.

The reason why I said all the way, even though it looks like they already are at their lowest possible value, is because in reality they have the Default value of 0.050, and Minimum is 0.000.

So setting them to be the Minimum value 0.000 kinda breaks the light and makes it look really grainy.

Here is a gif that I made to explain how on the bloody hell does this improve anything
Here you can see that when rendered, the light gives that clean, muted look. Best part is that this trick does not use any gobo textures, so for you few that are CRAZY with lights, there you go.

And one more gif to showcase why exactly I LOVE to use this with the 4 Fill Light combo:


If you want to see how it looks like with a complete light setup, just go check out the 3 renders I did, I used this for the fills on each of them
3.2 - Light Gimmicks - Outline Rim Lights
If you have been reading this guide as a whole, this is the weird thing I did at 1.3.

If you haven't, let me do a really quick recap with the same images I used there:

Originally posted by the smelly sfm man:
Left Image:
Spawn in a new light, keep it's shadows and have it positioned kinda like so (Inner Frustum being camera)

Right Image:
Look for shadowDepthBias, remap it and edit the Min value to -0.01. After doing so, go to the slider again and slide it down to the Min value. You should have something that looks like this.

And after that I went directly to the finished result, because this trick needs its own section.

What this essentially is, is that we made SFM read the lights shadows Incorrectly. So to an extent, it made the light of... the light, read as a shadow, and the shadow is now the actual light. Even though weirdly enough it still has shadows after the light shadows. In other words, we reversed the roles of both the light and the shadow on this specific light.
And this is why it is important to have it directly on front of the subject.

So after getting your lights to look like in the Right image, either pull shadowAtten to its Min value, or enable constantAttenuation. Reason why this is mandatory is as I explained above:
The roles of the light are reversed, so now the center, which is now the shadow, has this ugly look to it.

I prefer to use constantAttenuation for this, due to it making the light as bright as possible while you can change the intensity of it.


The outline is pretty thick by default, but you can change that easily!


By messing around with shadowFilterSize, you'll be able to determine the thickness of it. It is recommended that you only go bellow the default value, since it can get pretty darn wide.


And if you want to have some of those lines break in the model instead of just being on the border, minDistance helps you with that. The higher you set it to be, more lines will break in.


And with the help of the fill lights I made with those grainy lights, I made it look like this.
!!! - Conclusion
Just use radius lol

!!And don't be lazy!!
There has been countless times where I have redone entire scenes lights multiple times, because of them not being so great. But after redoing, the results were much better. And do lights from scratch instead of reusing the same light session.

So there we have it, a big light guide full of words

I would like to thank my boy Pretzel for giving some ideas what to put in here, so have a look at his work, will ya?

Just remember, even after learning how I do things, be creative and try changing up what I showed up in here! Even though this is the way I do it most of the time, I do sometimes change things up by leaving some lights out, adding some additional lights and so on.

And this guide pretty much can be reflected on how to light up scenebuilds/maps, but you'll have to leave some lights (like most of rim lights) out and make the lights you are setting up suitable for large areas. And additionally add some more lights to make fake fog, act as streelights, depends on what kind of a scene or map you are dealing with.

Once again but most importantly, this being my first guide, I hope you got something out of this. Explaining things, and to this scale, is not my forte.


Have a good one!
43 Comments
BrimBlam 3 Jun @ 8:57pm 
This guide has been the clearest thing ever wtf good work!
crispy crispin 9 Jun, 2023 @ 12:20am 
I love how english isn't your native language but you still write ten times better than someone like me whos native language is english.

Also, guide is cool. Reminds me not to just create lights and place them everywhere.
Shadboi 31 May, 2023 @ 2:01pm 
Good guide, thought i had some problems when negative lights they completely disappear when the image is rendered
XxX_Jalab_Destroyer_XxX 19 Jan, 2023 @ 9:13am 
this is GOLD. Giving all points i can to this little beauty. Love it. Brilliant. Flawless. Author, <3
Shoony 18 Jan, 2023 @ 1:43pm 
Followed it through, extremely helpful !
Except that on my side the eyes of the character becomes way too bright ?
Aruk02 28 Oct, 2022 @ 9:19pm 
Holy shit, this guide is so filled with good tips, great stuff man!
Pluvillion 23 Feb, 2022 @ 8:09pm 
Thank you so much for the tip! I already have any knowledge on how lighting works in general - I just wanted to see how SFM implements it.
SuprimLOL 28 Dec, 2021 @ 5:56am 
I never thought about remapping radius slider, especially not into negative values.
CGI Slam 2 Jul, 2021 @ 9:05pm 
uh yea, to be clear, this is a very good, in depth guide for intermediate and above users. I'd never even thought of changing the ssao tint, I've always just used a high radius orange light. I was just talking to my friend below about how if you have a simple subject with a simple background, you can just use the based and epic 3 point lighting, with the addition of some sss lights depending on the subject.

Again, great guide man
Stone Cold Gregory Spankoff 2 Jul, 2021 @ 1:18pm 
hey, mate. so interesting thing i, showed this guide off to olmate CGI Sam and he says that, and i quote: "if you're lighting a character, and dont have a massive scene to worry about, 3 point lighting is mega based.". what do you think about that?