diff options
author | Matt Ebb <matt@mke3.net> | 2008-12-13 08:41:34 +0300 |
---|---|---|
committer | Matt Ebb <matt@mke3.net> | 2008-12-13 08:41:34 +0300 |
commit | 92f5c719aedf79db7e45d3b887146a559321981e (patch) | |
tree | 877e8a5c91f19a17dcce8cc5d14f2dda00ef6e80 /source/blender/render/intern/include/render_types.h | |
parent | aef61a7000c279a96f1bb0e1fedf7da2574292fd (diff) |
* Volume Rendering: Voxel data
This commit introduces a new texture ('Voxel Data'), used to load up saved voxel
data sets for rendering, contributed by Raúl 'farsthary' Fernández Hernández
with some additional tweaks. Thanks, Raú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 Raú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 Raú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
Diffstat (limited to 'source/blender/render/intern/include/render_types.h')
-rw-r--r-- | source/blender/render/intern/include/render_types.h | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/source/blender/render/intern/include/render_types.h b/source/blender/render/intern/include/render_types.h index 6f4537d84fb..65bb12e059d 100644 --- a/source/blender/render/intern/include/render_types.h +++ b/source/blender/render/intern/include/render_types.h @@ -203,6 +203,8 @@ struct Render struct Object *excludeob; ListBase vol_precache_obs; + ListBase render_volumes_inside; + ListBase volumes; /* arena for allocating data for use during render, for * example dynamic TFaces to go in the VlakRen structure. @@ -409,6 +411,18 @@ typedef struct VolPrecache struct ObjectRen *obr; } VolPrecache; +typedef struct VolumeOb +{ + struct VolumeOb *next, *prev; + struct Material *ma; + struct ObjectRen *obr; +} VolumeOb; + +typedef struct MatInside { + struct MatInside *next, *prev; + struct Material *ma; +} MatInside; + /* ------------------------------------------------------------------------- */ struct LampRen; |