Blender Git Commit Log

Git Commits -> Revision 92f5c71

Revision 92f5c71 by Matt Ebb (master)
December 13, 2008, 05:41 (GMT)
* Volume Rendering: Voxel data

This commit introduces a new texture ('Voxel Data'), used to load up saved voxel
data sets for rendering, contributed by Rau�l 'farsthary' Ferna�ndez Herna�ndez
with some additional tweaks. Thanks, Rau�l!

The texture works similar to the existing point density texture, currently it
only provides intensity information, which can then be mapped (for example) to
density in a volume material. This is an early version, intended to read the
voxel format saved by Rau�l's command line simulators, in future revisions
there's potential for making a more full-featured 'Blender voxel file format',
and also for supporting other formats too.

Note: Due to some subtleties in Rau�l's existing released simulators, in order
to load them correctly the voxel data texture, you'll need to raise the
'resolution' value by 2. So if you baked out the simulation at resolution 50,
enter 52 for the resolution in the texture panel. This can possibly be fixed in
the simulator later on.

Right now, the way the texture is mapped is just in the space 0,0,0 <-> 1,1,1
and it can appear rotated 90 degrees incorrectly. This will be tackled, for now,
probably the easiest way to map it is with and empty, using Map Input -> Object.

Smoke test: http://www.vimeo.com/2449270

One more note, trilinear interpolation seems a bit slow at the moment, we'll
look into this.

For curiosity, while testing/debugging this, I made a script that exports a mesh
to voxel data. Here's a test of grogan (www.kajimba.com) converted to voxels,
rendered as a volume: http://www.vimeo.com/2512028

The script is available here: http://mke3.net/projects/bpython/export_object_voxeldata.py

* Another smaller thing, brought back early ray termination (was disabled
previously for debugging) and made it user configurable. It now appears as a new
value in the volume material: 'Depth Cutoff'. For some background info on what
this does, check:
http://farsthary.wordpress.com/2008/12/11/cutting-down-render-times/

* Also some disabled work-in-progess code for light cache

Commit Details:

Full Hash: 92f5c719aedf79db7e45d3b887146a559321981e
SVN Revision: 17817
Parent Commit: aef61a7
Lines Changed: +324, -57

15 Modified Paths:

/source/blender/blenkernel/BKE_texture.h (+6, -0) (Diff)
/source/blender/blenkernel/intern/texture.c (+49, -0) (Diff)
/source/blender/blenloader/intern/readfile.c (+18, -0) (Diff)
/source/blender/blenloader/intern/writefile.c (+1, -0) (Diff)
/source/blender/include/butspace.h (+2, -0) (Diff)
/source/blender/makesdna/DNA_material_types.h (+2, -0) (Diff)
/source/blender/makesdna/DNA_texture_types.h (+23, -1) (Diff)
/source/blender/render/intern/include/render_types.h (+14, -0) (Diff)
/source/blender/render/intern/include/volume_precache.h (+2, -1) (Diff)
/source/blender/render/intern/source/convertblender.c (+52, -9) (Diff)
/source/blender/render/intern/source/texture.c (+5, -0) (Diff)
/source/blender/render/intern/source/volumetric.c (+12, -4) (Diff)
/source/blender/render/intern/source/volume_precache.c (+58, -40) (Diff)
/source/blender/src/butspace.c (+1, -1) (Diff)
/source/blender/src/buttons_shading.c (+79, -1) (Diff)
By: Miika HämäläinenLast update: Nov-07-2014 14:18MiikaHweb | 2003-2021