Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatt Ebb <matt@mke3.net>2008-09-22 05:51:24 +0400
committerMatt Ebb <matt@mke3.net>2008-09-22 05:51:24 +0400
commit7522f86d010e600e17e82f98364235e96df21c1e (patch)
treec48305d18c6895613782560d20a1150bf56ae175 /source/blender/makesdna/DNA_material_types.h
parent6701f07e66368604fcd6286bbbd42f479c5c9880 (diff)
* Volume rendering
This is an initial commit to get it in SVN and make it easier to work on. Don't expect it to work perfectly, it's still in development and there's plenty of work still needing to be done. And so no I'm not very interested in hearing bug reports or feature requests at this stage :) There's some info on this, and a todo list at: http://mke3.net/weblog/volume-rendering/ Right now I'm trying to focus on getting shading working correctly (there's currently a problem in which 'surfaces' of the volume facing towards or away from light sources are getting shaded differently to how they should be), then I'll work on integration issues, like taking materials behind the volume into account, blending with alpha, etc. You can do simple testing though, mapping textures to density or emission on a cube with volume material.
Diffstat (limited to 'source/blender/makesdna/DNA_material_types.h')
-rw-r--r--source/blender/makesdna/DNA_material_types.h21
1 files changed, 21 insertions, 0 deletions
diff --git a/source/blender/makesdna/DNA_material_types.h b/source/blender/makesdna/DNA_material_types.h
index c92a33bbcbb..940f57c1ebc 100644
--- a/source/blender/makesdna/DNA_material_types.h
+++ b/source/blender/makesdna/DNA_material_types.h
@@ -62,6 +62,16 @@ typedef struct Material {
float translucency;
/* end synced with render_types.h */
+ short material_type; /* solid, halo, volumetric */
+ short pad5[3];
+
+ /* volumetrics */
+ float vol_alphathresh;
+ float vol_stepsize, vol_shade_stepsize;
+ float vol_absorption, vol_scattering;
+ short vol_shadeflag;
+ short vpad;
+
float fresnel_mir, fresnel_mir_i;
float fresnel_tra, fresnel_tra_i;
float filter; /* filter added, for raytrace transparency and transmissivity */
@@ -154,6 +164,12 @@ typedef struct Material {
/* for render */
#define MA_IS_USED 1
+/* material_type */
+#define MA_SOLID 0
+#define MA_PTHALO 1
+#define MA_VOLUME 2
+#define MA_VOLUMESOLID 3
+
/* mode (is int) */
#define MA_TRACEBLE 1
#define MA_SHADOW 2
@@ -327,5 +343,10 @@ typedef struct Material {
/* sss_flag */
#define MA_DIFF_SSS 1
+/* vol_shadeflag */
+#define MA_VOL_SHADED 1
+#define MA_VOL_ATTENUATED 2
+#define MA_VOL_SHADOWED 4
+
#endif