POV-Ray : Newsgroups : povray.general : Splash Texture : Re: Splash Texture Server Time
8 Aug 2024 01:22:25 EDT (-0400)
  Re: Splash Texture  
From: Geoff Wedig
Date: 17 Mar 2001 16:29:57
Message: <3ab3d755@news.povray.org>
Christoph Hormann <chr### [at] gmxde> wrote:

> You could try Chris Huff's particle system patch, AFAIK it also allows to
> make pigments from the simulated particles.  

> Of course the 'running down' could be problematic, the visibility pattern
> I wrote (Megapov MCP) could be used for that, but right now it's probably
> not flexible enough.  

> Another attempt would be to code something with blobs and maybe use blob
> pattern / object pattern.

Well, I wanted to avoid particles and such.  I've come up with something
procedural that isn't bad using Megapov's functions, and could probably be
made better with some work.

Since someone else asked, I'm posting it here.  IF anyone has any
suggestions for making it better (the point at the top bothers me)  I'd love
to hear them.

Geoff

#version unofficial Megapov 0.7;
camera
{
  location <0,20,0>
  look_at 0
}  

light_source
{
  <0,1000,0>
  1
}      

// A streaking pattern.  Standard bozo 10 times longer on the x.

#declare funct =
  function
  {
    pigment
    {
      bozo
    
      color_map
      {
        [0 rgbt 0]
        [1 rgbt 1]
      } 
      scale <10,1,1>*.1
    }
  }

// Function that takes the above and turns it into a radial pattern.

#declare pig =
pigment
{
  function { funct(sqrt(x*x+z*z), y, atan2(z,x)) }
}

// The streaks pigment is the radial pigment above, but only in the region
down at a - 45 degree
// angle.

#declare streaks = 
  pigment
  {
    radial
    pigment_map
    {
      [0 rgbt 1]
      [0.120 rgbt 1 ]
      [.13 pig ]
      [.38 pig ]
      [0.39 rgbt 1 ]
      [0.5 rgbt 1]
    }
  }

// Turn it into a function

#declare streak_func =
function
{
  pigment { streaks }
}

// Make the streak function fall faster as it gets further away by modifying
the z.

#declare falling_streaks =
pigment
{
  function { 1- streak_func(x, y, sqrt(z)*z/abs(z)) } 
}

Cause it to fade as it get further down.

#declare Fading_falling_streaks =
pigment
{
  gradient z
  pigment_map
  {
    [0 falling_streaks ]
    [.5 rgbt 0]
    [1 rgbt 0]
  }
  scale <1,1,10> 
  turbulence .3
  warp { reset_children }
}

// Experiment.  Comment out lines to see patternas it develops.

plane
{
  y, 0
  
//  texture { streaks}
//  texture { falling_streaks}
  texture { Fading_falling_streaks}

}


Post a reply to this message

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