Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBrecht Van Lommel <brechtvanlommel@gmail.com>2013-12-29 18:40:43 +0400
committerBrecht Van Lommel <brechtvanlommel@gmail.com>2014-01-07 18:03:41 +0400
commit01df756bd10709bb707d4f88f14c50e5680d05a5 (patch)
tree62d1374ada6e9c62bae736a7e0e62a6cb2c0a14d /intern/cycles/blender/blender_sync.cpp
parentb174e7b0b89d0e03a20a11f4a754029689af56a9 (diff)
Cycles Volume Render: scattering support.
This is done by adding a Volume Scatter node. In many cases you will want to add together a Volume Absorption and Volume Scatter node with the same color and density to get the expected results. This should work with branched path tracing, mixing closures, overlapping volumes, etc. However there's still various optimizations needed for sampling. The main missing thing from the volume branch is the equiangular sampling for homogeneous volumes. The heterogeneous scattering code was arranged such that we can use a single stratified random number for distance sampling, which gives less noise than pseudo random numbers for each step. For volumes where the color is textured there still seems to be something off, needs to be investigated.
Diffstat (limited to 'intern/cycles/blender/blender_sync.cpp')
-rw-r--r--intern/cycles/blender/blender_sync.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/intern/cycles/blender/blender_sync.cpp b/intern/cycles/blender/blender_sync.cpp
index 826402c8ba6..14e9f27ee39 100644
--- a/intern/cycles/blender/blender_sync.cpp
+++ b/intern/cycles/blender/blender_sync.cpp
@@ -166,6 +166,7 @@ void BlenderSync::sync_integrator()
integrator->max_diffuse_bounce = get_int(cscene, "diffuse_bounces");
integrator->max_glossy_bounce = get_int(cscene, "glossy_bounces");
integrator->max_transmission_bounce = get_int(cscene, "transmission_bounces");
+ integrator->max_volume_bounce = get_int(cscene, "volume_bounces");
integrator->transparent_max_bounce = get_int(cscene, "transparent_max_bounces");
integrator->transparent_min_bounce = get_int(cscene, "transparent_min_bounces");
@@ -201,6 +202,7 @@ void BlenderSync::sync_integrator()
int ao_samples = get_int(cscene, "ao_samples");
int mesh_light_samples = get_int(cscene, "mesh_light_samples");
int subsurface_samples = get_int(cscene, "subsurface_samples");
+ int volume_samples = get_int(cscene, "volume_samples");
if(get_boolean(cscene, "use_square_samples")) {
integrator->diffuse_samples = diffuse_samples * diffuse_samples;
@@ -209,6 +211,7 @@ void BlenderSync::sync_integrator()
integrator->ao_samples = ao_samples * ao_samples;
integrator->mesh_light_samples = mesh_light_samples * mesh_light_samples;
integrator->subsurface_samples = subsurface_samples * subsurface_samples;
+ integrator->volume_samples = volume_samples * volume_samples;
}
else {
integrator->diffuse_samples = diffuse_samples;
@@ -217,6 +220,7 @@ void BlenderSync::sync_integrator()
integrator->ao_samples = ao_samples;
integrator->mesh_light_samples = mesh_light_samples;
integrator->subsurface_samples = subsurface_samples;
+ integrator->volume_samples = volume_samples;
}