diff options
author | Matt Ebb <matt@mke3.net> | 2008-10-06 16:25:22 +0400 |
---|---|---|
committer | Matt Ebb <matt@mke3.net> | 2008-10-06 16:25:22 +0400 |
commit | 25ece3ba2f60ec4271828bb4ab1c083c6fa36761 (patch) | |
tree | 53124d534e2714095a6f214cced5cc04675c1f0a /source/blender/makesdna | |
parent | 67a9d4154d520a98e572e98f680995fca701f728 (diff) |
* New point density update: Turbulence
This addition allows you to perturb the point density with noise, to give
the impression of more resolution. It's a quick way to add detail, without
having to use large, complex, and slower to render particle systems.
Rather than just overlaying noise, like you might do by adding a secondary
clouds texture, it uses noise to perturb the actual coordinate looked up
in the density evaluation. This gives a much better looking result, as it
actually alters the original density.
Comparison of the particle cloud render without, and with added turbulence
(the render with turbulence only renders slightly more slowly):
http://mke3.net/blender/devel/rendering/volumetrics/pd_turbulence.jpg
Using the same constant noise function/spatial coordinates will give a
static appearance. This is fine (and quicker) if the particles aren't
moving, but on animated particle systems, it looks bad, as if the
particles are moving through a static noise field. To overcome this, there
are additional options for particle systems, to influence the turbulence
with the particles' average velocity, or average angular velocity. This
information is only available for particle systems at the present.
Here you can see the (dramatic) difference between no turbulence, static
turbulence, and turbulence influenced by particle velocity:
http://mke3.net/blender/devel/rendering/volumetrics/turbu_compare.mov
Diffstat (limited to 'source/blender/makesdna')
-rw-r--r-- | source/blender/makesdna/DNA_texture_types.h | 18 |
1 files changed, 16 insertions, 2 deletions
diff --git a/source/blender/makesdna/DNA_texture_types.h b/source/blender/makesdna/DNA_texture_types.h index 95bacbbd4c6..95f61e73c79 100644 --- a/source/blender/makesdna/DNA_texture_types.h +++ b/source/blender/makesdna/DNA_texture_types.h @@ -144,8 +144,13 @@ typedef struct PointDensity { short pdpad2; void *point_tree; /* the acceleration tree containing points */ - void *point_data; /* dynamically allocated extra for extra information, like particle age */ - int pdpad3[2]; + float *point_data; /* dynamically allocated extra for extra information, like particle age */ + + float noise_size; + short noise_depth; + short noise_influence; + float noise_fac; + float pdpad4; } PointDensity; @@ -429,6 +434,15 @@ typedef struct TexMapping { #define TEX_PD_OBJECTSPACE 1 #define TEX_PD_WORLDSPACE 2 +/* flag */ +#define TEX_PD_TURBULENCE 1 + + +/* noise_influence */ +#define TEX_PD_NOISE_STATIC 0 +#define TEX_PD_NOISE_VEL 1 +#define TEX_PD_NOISE_ANGVEL 2 +#define TEX_PD_NOISE_TIME 3 #endif |