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:
authorMatt Ebb <matt@mke3.net>2009-01-26 05:42:17 +0300
committerMatt Ebb <matt@mke3.net>2009-01-26 05:42:17 +0300
commit1ed26fffb88ffcf70aa62c65964cc98348712b9d (patch)
tree30c858e298e90d0d2de680c06fdab3fda85c223a /source/blender/render/intern/include/volume_precache.h
parent6cfbb0017a525262f55767bf3b560ba3ae2e8d42 (diff)
Volume rendering: multiple scattering
This is mostly a contribution from Raul 'farsthary' Hernandez - an approximation for multiple scattering within volumes. Thanks, Raul! Where single scattering considers the path from the light to a point in the volume, and to the eye, multiple scattering approximates the interactions of light as it bounces around randomly within the volume, before eventually reaching the eye. It works as a diffusion process that effectively blurs the lighting information that's already stored within the light cache. A cloudy sky setup, with single scattering, and multiple scattering: http://mke3.net/blender/devel/rendering/volumetrics/vol_sky_ss_ms.jpg http://mke3.net/blender/devel/rendering/volumetrics/sky_ms.blend To enable it, there is a menu in the volume panel (which needs a bit of cleanup, for later), that lets you choose between self-shading methods: * None: No attenuation of the light source by the volume - light passes straight through at full strength * Single Scattering: (same as previously, with 'self-shading' enabled) * Multiple Scattering: Uses multiple scattering only for shading information * Single + Multiple: Adds the multiple scattering lighting on top of the existing single scattered light - this can be useful to tweak the strength of the effect, while still retaining details in the lighting. An example of how the different scattering methods affect the visual result: http://mke3.net/blender/devel/rendering/volumetrics/ss_ms_comparison.jpg http://mke3.net/blender/devel/rendering/volumetrics/ss_ms_comparison.blend The multiple scattering methods introduce 3 new controls when enabled: * Blur: A factor blending between fully diffuse/blurred lighting, and sharper * Spread: The range that the diffuse blurred lighting spreads over - similar to a blur width. The higher the spread, the slower the processing time. * Intensity: A multiplier for the multiple scattering light brightness Here's the effect of multiple scattering on a tight beam (similar to a laser). The effect of the 'spread' value is pretty clear here: http://mke3.net/blender/devel/rendering/volumetrics/ms_spread_laser.jpg Unlike the rest of the system so far, this part of the volume rendering engine isn't physically based, and currently it's not unusual to get non-physical results (i.e. much more light being scattered out then goes in via lamps or emit). To counter this, you can use the intensity slider to tweak the brightness - on the todo, perhaps there is a more automatic method we can work on for this later on. I'd also like to check on speeding this up further with threading too.
Diffstat (limited to 'source/blender/render/intern/include/volume_precache.h')
-rw-r--r--source/blender/render/intern/include/volume_precache.h4
1 files changed, 3 insertions, 1 deletions
diff --git a/source/blender/render/intern/include/volume_precache.h b/source/blender/render/intern/include/volume_precache.h
index 78409e4c646..9d87a219c82 100644
--- a/source/blender/render/intern/include/volume_precache.h
+++ b/source/blender/render/intern/include/volume_precache.h
@@ -28,4 +28,6 @@
void volume_precache(Render *re);
void free_volume_precache(Render *re);
-int point_inside_volume_objectinstance(ObjectInstanceRen *obi, float *co); \ No newline at end of file
+int point_inside_volume_objectinstance(ObjectInstanceRen *obi, float *co);
+
+#define VOL_MS_TIMESTEP 0.1f \ No newline at end of file