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/blenloader/intern/readfile.c | |
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/blenloader/intern/readfile.c')
-rw-r--r-- | source/blender/blenloader/intern/readfile.c | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/source/blender/blenloader/intern/readfile.c b/source/blender/blenloader/intern/readfile.c index 568513650e0..249459bf3a4 100644 --- a/source/blender/blenloader/intern/readfile.c +++ b/source/blender/blenloader/intern/readfile.c @@ -7882,6 +7882,7 @@ static void do_versions(FileData *fd, Library *lib, Main *main) if (main->versionfile <= 247) { Material *ma; + Tex *tex; for(ma=main->mat.first; ma; ma= ma->id.next) { /* trigger for non-volumetric file */ @@ -7893,6 +7894,18 @@ static void do_versions(FileData *fd, Library *lib, Main *main) ma->vol_absorption_col[0] = ma->vol_absorption_col[1] = ma->vol_absorption_col[2] = 0.0f; } } + + for(tex=main->tex.first; tex; tex= tex->id.next) { + if (tex->pd == NULL) + tex->pd = BKE_add_pointdensity(); + else if (tex->pd->noise_size < 0.0001f) { + tex->pd->noise_size = 0.5f; + tex->pd->noise_depth = 1; + tex->pd->noise_fac = 1.0f; + tex->pd->noise_influence = TEX_PD_NOISE_STATIC; + } + } + } /* set the curve radius interpolation to 2.47 default - easy */ |