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-28 12:00:22 +0400
committerMatt Ebb <matt@mke3.net>2008-09-28 12:00:22 +0400
commit8056705ae9b2467a013f2372c0579687d3723229 (patch)
tree2df1ce63d5dc007d8fe5cef3df9648fb1239c13c /source/blender/makesdna/DNA_texture_types.h
parentc301a059bd59672daf022755181f114ce70a21e9 (diff)
* Volumetrics
Removed all the old particle rendering code and options I had in there before, in order to make way for... A new procedural texture: 'Point Density' Point Density is a 3d texture that find the density of a group of 'points' in space and returns that in the texture as an intensity value. Right now, its at an early stage and it's only enabled for particles, but it would be cool to extend it later for things like object vertices, or point cache files from disk - i.e. to import point cloud data into Blender for rendering volumetrically. Currently there are just options for an Object and its particle system number, this is the particle system that will get cached before rendering, and then used for the texture's density estimation. It works totally consistent with as any other procedural texture, so previously where I've mapped a clouds texture to volume density to make some of those test renders, now I just map a point density texture to volume density. Here's a version of the same particle smoke test file from before, updated to use the point density texture instead: http://mke3.net/blender/devel/rendering/volumetrics/smoke_test02.blend There are a few cool things about implementing this as a texture: - The one texture (and cache) can be instanced across many different materials: http://mke3.net/blender/devel/rendering/volumetrics/pointdensity_instanced.png This means you can calculate and bake one particle system, but render it multiple times across the scene, with different material settings, at no extra memory cost. Right now, the particles are cached in world space, so you have to map it globally, and if you want it offset, you have to do it in the material (as in the file above). I plan to add an option to bake in local space, so you can just map the texture to local and it just works. - It also works for solid surfaces too, it just gets the density at that particular point on the surface, eg: http://mke3.net/blender/devel/rendering/volumetrics/pointdensity_solid.mov - You can map it to whatever you want, not only density but the various emissions and colours as well. I'd like to investigate using the other outputs in the texture too (like the RGB or normal outputs), perhaps with options to colour by particle age, generating normals for making particle 'dents' in a surface, whatever!
Diffstat (limited to 'source/blender/makesdna/DNA_texture_types.h')
-rw-r--r--source/blender/makesdna/DNA_texture_types.h30
1 files changed, 30 insertions, 0 deletions
diff --git a/source/blender/makesdna/DNA_texture_types.h b/source/blender/makesdna/DNA_texture_types.h
index 111dc08ee02..ed172c24474 100644
--- a/source/blender/makesdna/DNA_texture_types.h
+++ b/source/blender/makesdna/DNA_texture_types.h
@@ -127,6 +127,22 @@ typedef struct EnvMap {
short recalc, lastsize;
} EnvMap;
+typedef struct PointDensity {
+ short flag;
+
+ short nearest;
+ float radius;
+
+ short type;
+ short pdpad[3];
+
+ struct Object *object; /* for 'Particle system' type - source object */
+ short psysindex; /* and object's psys number */
+ short pdpad2[3];
+
+ void *point_tree; /* the kd-tree containing points */
+} PointDensity;
+
typedef struct Tex {
ID id;
@@ -172,6 +188,7 @@ typedef struct Tex {
struct ColorBand *coba;
struct EnvMap *env;
struct PreviewImage * preview;
+ struct PointDensity *pd;
} Tex;
@@ -208,6 +225,8 @@ typedef struct TexMapping {
#define TEX_MUSGRAVE 11
#define TEX_VORONOI 12
#define TEX_DISTNOISE 13
+/* predicting ocean texture for 14 */
+#define TEX_POINTDENSITY 15
/* musgrave stype */
#define TEX_MFRACTAL 0
@@ -385,5 +404,16 @@ typedef struct TexMapping {
#define ENV_NORMAL 1
#define ENV_OSA 2
+/* **************** PointDensity ********************* */
+
+/* type */
+#define TEX_PD_PSYS 0
+#define TEX_PD_OBJECT 1
+#define TEX_PD_FILE 2
+
+/* psys_space */
+#define TEX_PD_PSYS_WORLDSPACE 0
+#define TEX_PD_PSYS_OBJECTSPACE 1
+
#endif