POV-Ray : Newsgroups : povray.binaries.images : Sand : Re: Sand Server Time
2 Aug 2024 04:20:52 EDT (-0400)
  Re: Sand  
From: Bruno Cabasson
Date: 23 Nov 2007 06:10:01
Message: <web.4746b46aee83a16ce8ba46670@news.povray.org>
"Stephen" <mcavoys_AT_aolDOT.com> wrote:
> William Tracy <wtr### [at] calpolyedu> wrote:
> > -----BEGIN PGP SIGNED MESSAGE-----
> > Hash: SHA1
> >
> > I'm starting to come up with some stuff that I want to build sand
> > castles in. :-)
> >
> > I'm starting to wonder if all my "details" are really helping or
> > hurting. Here's two renders, one with lots of yummy little patterns, and
> > one that's completely flat except for the subsurface scattering.
> >
> > Speaking of subsurface scattering, just a little goes a long way. I
> > probably overdid the scattering media in these images, because
> > everything looks like its underwater. Which is still cool. ;-)
> >
> > - --
> > William Tracy
>
>
> I like these two images, individually. Is there a way that you could merge the
> materials, with the grainy one in the foreground fading to the smooth one in the
> midground?
>
> Stephen

I used a kind of 'fadeaway' technique for my snow texture for TerraPOV, and I
posted recently and test render here. It is based on the distance wrt camera
(use of spherical pattern): when near it is one texture, when far it tends to
be a plain color (or whatever else). I intend to integrate fadeaway texturing
macros like this in TerraPOV, because terrain pigments become plain colors with
distance. Something like this can be applied to sand (same problem). It can also
be used for other purposes, of course.

Currently, it is coded as:
// --------------------------------------------------------------
// Parameters:
//    _color
//        Color of the snow. Can be C_SNOW_COLOR_BLUEISH.
//    _distance
//        Distance where the texture becomes a plain color
//    _scale
//        Scale for the near aspect of the texture
//
#macro TP_SnowFadeaway (_color, _distance, _scale)
    #local _t = texture
    {
        pigment_pattern {spherical scale _distance}
        texture_map
        {
            [0 TP_FarSnow(_color)]
            [.8 TP_SparkleSnow(_color, _scale)]
            [1 TP_SparkleSnow(_color, _scale/3)]
        }
    };
    _t
#end
// --------------------------------------------------------------

with TP_FarSnow() and TP_SparkleSnow() as other texture macros. This snow
texture is quite complex, but I think the result is OK.

I'll probablly define a general convenience macro with the following interface

#macro _tp_make_fadeway (_texture1, _texture2, _distance, _campos)
   // use of a more generic macro with thresholds and scales
#end

If this can help...


    Bruno


Post a reply to this message

Copyright 2003-2023 Persistence of Vision Raytracer Pty. Ltd.