Cycles / Sampling UI:

* Add a "Squared Samples" option to the UI, to use squared values for ease of use. This can make it easier from an artist point of view, to weak settings. 

With this enabled, all Sample values will be squared. So 10 Samples become 100 Samples.
For the Non-Progressive integrator: 4 AA Samples * 5 Diffuse Samples would become 16 AA Samples * 25 Diffuse = 400 in total.

Patch by Matt Heimlich, with some minor edits by myself. Thanks!
This commit is contained in:
2013-07-19 22:51:48 +00:00
parent 3cd53aff09
commit d336ae8992
4 changed files with 69 additions and 14 deletions

View File

@@ -154,10 +154,16 @@ void BlenderSync::sync_light(BL::Object b_parent, int persistent_id[OBJECT_PERSI
light->shader = used_shaders[0];
/* shadow */
PointerRNA cscene = RNA_pointer_get(&b_scene.ptr, "cycles");
PointerRNA clamp = RNA_pointer_get(&b_lamp.ptr, "cycles");
light->cast_shadow = get_boolean(clamp, "cast_shadow");
light->use_mis = get_boolean(clamp, "use_multiple_importance_sampling");
light->samples = get_int(clamp, "samples");
int samples = get_int(clamp, "samples");
if(get_boolean(cscene, "squared_samples"))
light->samples = samples * samples;
else
light->samples = samples;
/* visibility */
uint visibility = object_ray_visibility(b_ob);
@@ -174,6 +180,7 @@ void BlenderSync::sync_background_light()
BL::World b_world = b_scene.world();
if(b_world) {
PointerRNA cscene = RNA_pointer_get(&b_scene.ptr, "cycles");
PointerRNA cworld = RNA_pointer_get(&b_world.ptr, "cycles");
bool sample_as_light = get_boolean(cworld, "sample_as_light");
@@ -188,8 +195,13 @@ void BlenderSync::sync_background_light()
{
light->type = LIGHT_BACKGROUND;
light->map_resolution = get_int(cworld, "sample_map_resolution");
light->samples = get_int(cworld, "samples");
light->shader = scene->default_background;
int samples = get_int(cworld, "samples");
if(get_boolean(cscene, "squared_samples"))
light->samples = samples * samples;
else
light->samples = samples;
light->tag_update(scene);
light_map.set_recalc(b_world);