Blender Git Commit Log

Git Commits -> Revision 9d2fc97

Revision 9d2fc97 by Matt Ebb (master)
October 20, 2008, 07:08 (GMT)
New volume rendering feature: Light Cache

This was a bit complicated to do, but is working pretty well now, and can make shading significantly faster to render.

This option pre-calculates self-shading information into a
3d voxel grid before rendering, then uses and interpolates
that data during the main rendering phase, rather than
calculating shading for each sample. It's an approximation
and isn't as accurate as getting the lighting directly,
but in many cases it looks very similar and renders much faster.
The voxel grid covers the object's 3D screen-aligned bounding box
so this may not be that useful for large volume regions like a
big range of cloud cover, since you'll need a lot of resolution.

The render time speaks for itself here:
http://mke3.net/blender/devel/rendering/volumetrics/vol_light_cache_interpolation.jpg

The resolution is set in the volume panel - it's the resolution
of one edge of the voxel grid. Keep in mind that the higher the
resolution, the more memory needed, like in fluid sim. The
memory requirements increase with the cube of the edge
resolution so be careful. I might try and add a little memory
calculator thing like fluid sim has there later.

The voxels are interpolated using trilinear interpolation -
here's a comparison image I made during testing:
http://mke3.net/blender/devel/rendering/volumetrics/vol_light_cache_compare.jpg

There might still be a couple of little tweaks I can do to
improve the visual quality, I'll see.

Commit Details:

Full Hash: 9d2fc97827e2b94eb436081185108db9043ae54e
SVN Revision: 17127
Parent Commit: 49aa7ed
Lines Changed: +274, -77

6 Modified Paths:

/source/blender/blenkernel/intern/material.c (+1, -0) (Diff)
/source/blender/blenloader/intern/readfile.c (+2, -0) (Diff)
/source/blender/render/extern/include/RE_shader_ext.h (+1, -0) (Diff)
/source/blender/render/intern/source/shadeinput.c (+1, -0) (Diff)
/source/blender/render/intern/source/volumetric.c (+239, -60) (Diff)
/source/blender/src/buttons_shading.c (+30, -17) (Diff)
By: Miika HämäläinenLast update: Nov-07-2014 14:18MiikaHweb | 2003-2021