diff options
author | Matt Ebb <matt@mke3.net> | 2009-09-30 02:01:32 +0400 |
---|---|---|
committer | Matt Ebb <matt@mke3.net> | 2009-09-30 02:01:32 +0400 |
commit | 71b3088596feb008e503be6430a30555aaffa586 (patch) | |
tree | 0c2e7fe3cb4cc46939cebd80f1027efd7eb3108e /source/gameengine/Ketsji/KX_ISceneConverter.h | |
parent | 98ee2a781dd20bb58f72ee5700a11b2dd5124d74 (diff) |
Rework of volume shading
After code review and experimentation, this commit makes some changes to the way that volumes are shaded. Previously, there were problems with the 'scattering' component, in that it wasn't physically correct - it didn't conserve energy and was just acting as a brightness multiplier. This has been changed to be more correct, so that as the light is scattered out of the volume, there is less remaining to penetrate through.
Since this behaviour is very similar to absorption but more useful, absorption has been removed and has been replaced by a 'transmission colour' - controlling the colour of light penetrating through the volume after it has been scattered/absorbed. As well as this, there's now 'reflection', a non-physically correct RGB multiplier for out-scattered light. This is handy for tweaking the overall colour of the volume, without having to worry about wavelength dependent absorption, and its effects on transmitted light. Now at least, even though there is the ability to tweak things non-physically, volume shading is physically based by default, and has a better combination of correctness and ease of use.
There's more detailed information and example images here:
http://wiki.blender.org/index.php/User:Broken/VolumeRendering
Also did some tweaks/optimisation:
* Removed shading step size (was a bit annoying, if it comes back, it will be in a different form)
* Removed phase function options, now just one asymmetry slider controls the range between back-scattering, isotropic scattering, and forward scattering. (note, more extreme values gives artifacts with light cache, will fix...)
* Disabled the extra 'bounce lights' from the preview render for volumes, speeds updates significantly
* Enabled voxeldata texture in preview render
* Fixed volume shadows (they were too dark, fixed by avoiding using the shadfac/AddAlphaLight stuff)
More revisions to come later...
Diffstat (limited to 'source/gameengine/Ketsji/KX_ISceneConverter.h')
0 files changed, 0 insertions, 0 deletions