diff options
author | Matt Ebb <matt@mke3.net> | 2009-06-20 10:41:50 +0400 |
---|---|---|
committer | Matt Ebb <matt@mke3.net> | 2009-06-20 10:41:50 +0400 |
commit | 3b2ec949778649f19b83c5ada413f3a50bb0e0e8 (patch) | |
tree | 6364fe340dcb19f77046d406193cacd694b71d77 /source/blender/render/intern/include/voxeldata.h | |
parent | 44cebb39b88a6f411dbe0eb05109869ae82bbc9f (diff) |
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.
Diffstat (limited to 'source/blender/render/intern/include/voxeldata.h')
-rw-r--r-- | source/blender/render/intern/include/voxeldata.h | 10 |
1 files changed, 2 insertions, 8 deletions
diff --git a/source/blender/render/intern/include/voxeldata.h b/source/blender/render/intern/include/voxeldata.h index 36c7789da80..b291bdc096d 100644 --- a/source/blender/render/intern/include/voxeldata.h +++ b/source/blender/render/intern/include/voxeldata.h @@ -29,23 +29,17 @@ #ifndef VOXELDATA_H #define VOXELDATA_H -/** - * Load voxel data for all point density textures in the scene - */ - struct Render; struct TexResult; typedef struct VoxelDataHeader { -int resolX, resolY, resolZ; -int frames; + int resolX, resolY, resolZ; + int frames; } VoxelDataHeader; -__inline int _I(int x, int y, int z, int *n); void make_voxeldata(struct Render *re); void free_voxeldata(struct Render *re); int voxeldatatex(struct Tex *tex, float *texvec, struct TexResult *texres); - #endif /* VOXELDATA_H */ |