From 8b955e9b19dd8616f61c27d5e9d2d80d66dacd96 Mon Sep 17 00:00:00 2001 From: Thomas Dinges Date: Sat, 17 Aug 2013 16:08:03 +0000 Subject: Cycles / Sky Model: * Replaced the Preetham model with the newer Hosek / Wilkie model: "An Analytic Model for Full Spectral Sky-Dome Radiance" http://cgg.mff.cuni.cz/projects/SkylightModelling/ * We use the sample code data, which comes with the paper, but removed some unnecessary parts, we only need the xyz version. * New "Albedo" UI paraemeter, to control the ground albedo (between 0 and 1). * Works with SVM only atm (CPU and CUDA). Example render: http://www.pasteall.org/pic/show.php?id=57635 ToDo / Open Questions: * OSL still uses the old model, will be done later. In the meantime it's useful to compare the two models this way. * The new model needs a much weaker Strength value (0.01), otherwise it's white. Can this be fixed? * Code cleanup. --- source/blender/makesrna/intern/rna_nodetree.c | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'source/blender/makesrna/intern/rna_nodetree.c') diff --git a/source/blender/makesrna/intern/rna_nodetree.c b/source/blender/makesrna/intern/rna_nodetree.c index 3b594ab0961..a23a7fa998f 100644 --- a/source/blender/makesrna/intern/rna_nodetree.c +++ b/source/blender/makesrna/intern/rna_nodetree.c @@ -3243,6 +3243,11 @@ static void def_sh_tex_sky(StructRNA *srna) RNA_def_property_range(prop, 1.0f, 30.0f); RNA_def_property_ui_text(prop, "Turbidity", "Atmospheric turbidity"); RNA_def_property_update(prop, NC_NODE | NA_EDITED, "rna_Node_update"); + + prop = RNA_def_property(srna, "albedo", PROP_FLOAT, PROP_NONE); + RNA_def_property_range(prop, 0.0f, 1.0f); + RNA_def_property_ui_text(prop, "Albedo", "Ground albedo"); + RNA_def_property_update(prop, NC_NODE | NA_EDITED, "rna_Node_update"); } static void def_sh_tex_environment(StructRNA *srna) -- cgit v1.2.3