Blender Git Commit Log

Git Commits -> Revision 3b2ec94

Revision 3b2ec94 by Matt Ebb (master)
June 20, 2009, 06:41 (GMT)
Voxel data & volume light cache

* Added support for additional file types in the voxel data texture. I added
support for 8 bit raw files, but most notably for image sequences.

Image sequences generate the voxel grid by stacking layers of image slices on top
of each other to generate the voxels in the Z axis - the number of slices in the
sequence is the resolution of the voxel grid's Z axis.

i.e. http://mke3.net/blender/devel/rendering/volumetrics/skull_layers.jpg

The image sequence option is particularly useful for loading medical data into
Blender. 3d medical data such as MRIs or CT scans are often stored as DICOM
format image sequences. It's not in Blender's scope to support the DICOM format,
but there are plenty of utilities such as ImageMagick, Photoshop or OsiriX that
can easily convert DICOM files to formats that Blender supports, such as PNG or JPEG.

Here are some example renderings using these file formats to load medical data:
http://vimeo.com/5242961
http://vimeo.com/5242989
http://vimeo.com/5243228

Currently the 8 bit raw and image sequence formats only support the 'still'
rendering feature.

* Changed the default texture placement to be centred around 0.5,0.5,0.5, rather
than within the 0.0,1.0 cube. This is more consistent with image textures, and it
also means you can easily add a voxel data texture to a default cube without
having to mess around with mapping.

* Added some more extrapolation modes such as Repeat and Extend rather than just clipping

http://mke3.net/blender/devel/rendering/volumetrics/bradybunch.jpg

* Changed the voxel data storage to use MEM_Mapalloc (memory mapped disk cache)
rather than storing in ram, to help cut down memory usage.

* Refactored and cleaned up the code a lot. Now the access and interpolation code
is separated into a separate voxel library inside blenlib. This is now properly
shared between voxel data texture and light cache (previously there was some
duplicated code).

* Made volume light cache support non-cubic voxel grids. Now the resolution
specified in the material properties is used for the longest edge of the volume
object's bounding box, and the shorter edges are proportional (similar to how
resolution is calculated for fluid sim domains).

This is *much* more memory efficient for squashed volume regions like clouds
layer bounding boxes, allowing you to raise the resolution considerably while
still keeping memory usage acceptable.

Commit Details:

Full Hash: 3b2ec949778649f19b83c5ada413f3a50bb0e0e8
SVN Revision: 21028
Parent Commit: 44cebb3
Lines Changed: +806, -586

2 Added Paths:

/source/blender/blenlib/BLI_voxel.h (+40, -0) (View)
/source/blender/blenlib/intern/voxel.c (+311, -0) (View)

8 Modified Paths:

/source/blender/makesdna/DNA_texture_types.h (+15, -7) (Diff)
/source/blender/render/intern/include/render_types.h (+10, -3) (Diff)
/source/blender/render/intern/include/voxeldata.h (+2, -8) (Diff)
/source/blender/render/intern/source/shadeinput.c (+1, -0) (Diff)
/source/blender/render/intern/source/volumetric.c (+11, -62) (Diff)
/source/blender/render/intern/source/volume_precache.c (+144, -116) (Diff)
/source/blender/render/intern/source/voxeldata.c (+134, -330) (Diff)
/source/blender/src/buttons_shading.c (+138, -60) (Diff)
By: Miika HämäläinenLast update: Nov-07-2014 14:18MiikaHweb | 2003-2021