Progressive refinement

From Valve Developer Community
< SFM
Jump to navigation Jump to search

Overview

Warning.pngWarning:"Depth of field sampling" affects more than just the camera, it also influences the quality of lights, cast shadows (when radius is used) and ambient occlusion. disabling this setting is not recommended unless your scene contains no radius lights and you have ambient occlusion disabled.
Note.pngNote:Due to the non-real-time nature of progressive refinement, effects cannot be seen unless paused inside the clip editor

In SFM, a single frame is not a still image; it's 1 second divided by the number of frames per second your project is working in (the default being 24). This means that any object in motion in-between the frames is being interpolated, that motion data is stored in your session. When motion blur is enabled, each frame of the motion data is sampled by the number of samples specified in your project render settings, the same also applies for the cameras aperture and light radius attributes. Progressive refinement is a rendering technique that simulates motion blur, depth of field, soft lighting and shadows. It does this by slightly altering the location and rotation of cameras and lights within each frame, adding all the samples to a single frame and dividing by however many samples there are, to get a result that is the average of all the samples in the frame. The more samples in each frame, the better the quality, as samples are less distinguishable from each other. The main benefit of doing this inside of SFM is it's ability to use the internal HDR format to render motion blur and bright volumetric lights in a more realistic fashion, with bright highlights staying bright. However this comes with the downside of massively increased render times.

For "Depth of field" progressive refinement, instead of sampling interpolated motion data, SFM instead Generates randomly positioned motion data to sample in between frames. For the camera's "out of focus" effect, it takes the position of the camera and shifts the location relative to the focal plane randomly for each sample. At the default 8 samples, this looks off-putting, so instead the samples are increased to 64 or above or the camera's "aperture" channel is set to 0 whilst the setting is still enabled. When the aperture is set to 0, Extra care will have to be taken to separate the subject from the background using lights and a lower tone-map scale on the camera.


Sampling is done in parallel up to 64 samples, each increment above that is calculated sequentially and takes twice as long. For this reason, 64 samples for progressive refinement is recommended as the best middle ground when rendering. while there is an upper limit of how much motion blur you can use, the same can't be said for depth of field blur or light radus, so caution must be used whe setting high values for them. If you are struggling to render, right click the viewpoint and under "render settings" disable motion blur, ambient occlusion and set the aperture attribute on your scene camera to 0.

Sample Settings

These can be found by clicking the top entry in the list when right-clicking the viewpoint, also found in the render settings or element viewer. Currently, the number of samples you can utilize for progressive refinement is as follows:

Depth of Field: 8, 16, 32, 64, 128, 256, 512, 1024

Motion Blur: 8, 16, 32, 64, 128, 256

Note.pngNote:You may also use your camera settings to render progressive refinement, as selecting any other sample value shall override your current camera settings. You can edit the camera's values in the element viewer.

See also