Blender Git Commit Log
Git Commits -> Revision 71b3088
September 29, 2009, 22:01 (GMT) |
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... |
Commit Details:
Full Hash: 71b3088596feb008e503be6430a30555aaffa586
SVN Revision: 23563
Parent Commit: 98ee2a7
Lines Changed: +395, -283
18 Modified Paths:
/release/scripts/ui/buttons_material.py (+41, -22) (Diff)
/release/scripts/ui/buttons_texture.py (+4, -2) (Diff)
/source/blender/blenkernel/intern/material.c (+3, -3) (Diff)
/source/blender/blenkernel/intern/texture.c (+1, -0) (Diff)
/source/blender/blenloader/intern/readfile.c (+16, -3) (Diff)
/source/blender/editors/render/render_preview.c (+15, -0) (Diff)
/source/blender/makesdna/DNA_material_types.h (+17, -27) (Diff)
/source/blender/makesdna/DNA_texture_types.h (+2, -1) (Diff)
/source/blender/makesrna/intern/rna_material.c (+51, -56) (Diff)
/source/blender/makesrna/intern/rna_texture.c (+18, -6) (Diff)
/source/blender/render/intern/include/volumetric.h (+1, -2) (Diff)
/source/blender/render/intern/include/volume_precache.h (+1, -1) (Diff)
/source/blender/render/intern/source/convertblender.c (+24, -0) (Diff)
/source/blender/render/intern/source/rayshade.c (+2, -1) (Diff)
/source/blender/render/intern/source/texture.c (+10, -7) (Diff)
/source/blender/render/intern/source/volumetric.c (+145, -137) (Diff)
/source/blender/render/intern/source/volume_precache.c (+44, -9) (Diff)
/source/blender/render/intern/source/voxeldata.c (+0, -6) (Diff)
/release/scripts/ui/buttons_texture.py (+4, -2) (Diff)
/source/blender/blenkernel/intern/material.c (+3, -3) (Diff)
/source/blender/blenkernel/intern/texture.c (+1, -0) (Diff)
/source/blender/blenloader/intern/readfile.c (+16, -3) (Diff)
/source/blender/editors/render/render_preview.c (+15, -0) (Diff)
/source/blender/makesdna/DNA_material_types.h (+17, -27) (Diff)
/source/blender/makesdna/DNA_texture_types.h (+2, -1) (Diff)
/source/blender/makesrna/intern/rna_material.c (+51, -56) (Diff)
/source/blender/makesrna/intern/rna_texture.c (+18, -6) (Diff)
/source/blender/render/intern/include/volumetric.h (+1, -2) (Diff)
/source/blender/render/intern/include/volume_precache.h (+1, -1) (Diff)
/source/blender/render/intern/source/convertblender.c (+24, -0) (Diff)
/source/blender/render/intern/source/rayshade.c (+2, -1) (Diff)
/source/blender/render/intern/source/texture.c (+10, -7) (Diff)
/source/blender/render/intern/source/volumetric.c (+145, -137) (Diff)
/source/blender/render/intern/source/volume_precache.c (+44, -9) (Diff)
/source/blender/render/intern/source/voxeldata.c (+0, -6) (Diff)