Rendering

Okay, we have our scene and camera set up, and we have our AO settings set up. We're now ready to render. To do this, we're going to make some changes to our SFM settings to enable to to render at 4K, and with the best possible quality.To begin with, close SFM, and in your Steam games library, find Source Filmmaker, right click on it, and click on 'Properties'. Then click on 'Set Launch Options'.A window like this will appear:Type the following into the box:-sfm_resolution 2160Click on OK once you've typed the above into the box, and launch SFM.Upon launching, you'll get a message box like this; you can just click OK and pass it without any problem:Load up your session again. Once it has, we need to enable some last graphical features. We can't do this in the launch settings since SFM disables these particular settings after having been force enabled. In the top-left of the screen, click on 'Windows', and then click on 'Console'. The SFM console will then appear.Type each of the following lines into the console, one by one, and hit enter. SFM will freeze for a small amount of time after entering each command, so be patient.mat_picmip -10mat_phong 1mat_specular 1mat_bumpmap 1mat_forceaniso 16Once that's done, it's time to render. Close the console, Click on 'File' in the top-left, highlight 'Export' and then click on 'Movie...'.This window will appear:We're going to change some options in here before rendering.· Click on the 'render' tab, and change 'Movie' to 'Image Sequence'.· Click on the 'format' tab, and change it to PNG. This will ensure a better quality render, since PNG has higher quality than JPG or TGA.· Untick 'Seperate WAV file'. We're not rendering something with sound, so there's no need to have this ticked.· In the 'resolution' tab, you'll see a box where it says '720p'. Click on this, and assuming you did indeed launch SFM with the -sfm_resolution 2160 switch, the '2160p' optionshould be available. Select it.· In the 'duration' tab, click on 'Sequence' and change it to 'Custom', and then click on 'Seconds' and change it to 'Frames'. The frame window will then be selectable. In the first box, change the value from 0 to 1, and change the value of the second box from 1440 to 3. This will render out two pictures, if for some reason the first frame does not look right.· Click on 'More Settings', and make sure 'Depth Of Field' and 'Subpixel Jitter Antialiasing' are ticked, and 'Depth Of Field' is set to a minimum of 128 samples. More samples mean better quality, but a longer render time.We'll be doing a second render with this after this first render is finished.Once that's done, your render settings should look something like this:I'm using 512 samples for this particular picture to ensure the best quality. You can go all the way up to 1024 samples, but the difference in quality is almost negligible. I'll stick with 512.Now click on 'Export Movie' and let your picture render. Thistake a while, depending on the complexity of your scene, how many lights you have and similar factors.Once it's done, don't close SFM just yet. We need to render a second time, but this time, we need to activate the AO greyscale. Follow the same procedure as above, but make sure to check 'Ambient Occlusion', 'Show Ambient Occlusion', and make sure the AO tab is set to 'AO Only'. Also be sure to name your render something else, otherwise it'll ask if you want to overwrite the first render, which is not what you want to do.The greyscale shouldn't take long to render.And voilà, both our picture and the greyscale are rendered as two seperate files!We can now close SFM now that rendering has finished.