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.
This commit is contained in:
Brecht Van Lommel
2013-12-29 15:40:43 +01:00
parent b174e7b0b8
commit 01df756bd1
16 changed files with 580 additions and 131 deletions

View File

@@ -33,6 +33,7 @@ public:
int max_diffuse_bounce;
int max_glossy_bounce;
int max_transmission_bounce;
int max_volume_bounce;
bool probalistic_termination;
int transparent_min_bounce;
@@ -59,6 +60,7 @@ public:
int ao_samples;
int mesh_light_samples;
int subsurface_samples;
int volume_samples;
enum Method {
BRANCHED_PATH = 0,