Skip to content
This repository has been archived by the owner on Jul 18, 2020. It is now read-only.

Commit

Permalink
Merge pull request #32 from DavidBluecame/adaptative_AA
Browse files Browse the repository at this point in the history
Automatic AA Threshold reduction based on a "floor" for resampled pixels
  • Loading branch information
DarkTide committed Nov 8, 2015
2 parents 160333e + 9e06ac2 commit a168716
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 0 deletions.
1 change: 1 addition & 0 deletions io/yaf_scene.py
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,7 @@ def exportAA(yi, scene):
yi.paramsSetFloat("AA_pixelwidth", scene.AA_pixelwidth)
yi.paramsSetFloat("AA_threshold", scene.AA_threshold)
yi.paramsSetString("filter_type", scene.AA_filter_type)
yi.paramsSetInt("AA_resampled_floor", scene.AA_resampled_floor)


def exportRenderSettings(yi, scene):
Expand Down
8 changes: 8 additions & 0 deletions prop/yaf_scene.py
Original file line number Diff line number Diff line change
Expand Up @@ -381,6 +381,13 @@ def register():
min=0.0, max=1.0, precision=4,
default=0.05)

Scene.AA_resampled_floor = IntProperty(
name="Resampled floor",
description=("For better noise reduction, if the amount of resampled pixels go below this value,"
" the AA threshold will automatically decrease before the next pass"),
min=0,
default=0)

Scene.AA_pixelwidth = FloatProperty(
name="Pixelwidth",
description="AA filter size",
Expand Down Expand Up @@ -458,3 +465,4 @@ def unregister():
Scene.AA_threshold
Scene.AA_pixelwidth
Scene.AA_filter_type
Scene.AA_resampled_floor
2 changes: 2 additions & 0 deletions ui/properties_yaf_AA_settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,8 @@ def draw(self, context):
spp.prop(scene, "AA_passes")
sub.prop(scene, "AA_inc_samples")
sub.prop(scene, "AA_threshold")
if scene.intg_light_method != "SPPM":
sub.prop(scene, "AA_resampled_floor")


if __name__ == "__main__": # only for live edit.
Expand Down

0 comments on commit a168716

Please sign in to comment.