POV-Ray : Newsgroups : povray.text.scene-files : media for jrg Server Time
5 Jul 2024 09:57:26 EDT (-0400)
  media for jrg (Message 1 to 2 of 2)  
From: Tom Melly
Subject: media for jrg
Date: 6 Mar 2001 06:34:04
Message: <3aa4cb2c$1@news.povray.org>
// by K.Wampler and M.Hazelgrove
#version unofficial MegaPov 0.6;

#include "colors.inc"

global_settings{
  assumed_gamma 1.0
  max_trace_level 45
}

light_source{
  0*x                     // light's position (translated below)
  color rgb <1,1,0.9>*0.8//1       // light's color
  translate <6000, 3000,-1000> // <x y z> position of light
  fade_power 2
  fade_distance 5000
}

camera{location<2,2.75,-2.5> look_at<0,1,0>}

sky_sphere{pigment{rgb<0.2,0.2,0.5>}}
// ----------------------------------------

#declare Cloud_form =
function{
  pigment {
    blob {
      sphere { <0,0,0>, 10, strength 1 density_function 0, 1 }
      sphere { <1,8,0>, 5, strength 1 density_function 0, 1 }
      sphere { <0, 0, 0>, 8, strength 1 density_function 0, 1 scale <1, .7,
1> translate<6, 1, 1>}
      sphere { <0, 0, 0>, 6, strength 1 density_function 0, 1 scale <1, .6,
1> translate<10, 4, -2> }
      sphere { <0,0,0>, 13, strength 1 density_function 0, 1 scale <1, .5,
.6> translate<-10, 3, 4> }
      threshold 0.075 //varying this produces some interesting variations
.05 to .2
      max_density 1//leave
    }
    color_map {
      [0 rgb 0]
      [1 rgb 1]// seems to break up cloud lower more broken up higher more
solid(no higher than 1.1)
    }
  }
}

#declare Cloud_turb =
function{
  pigment {   //Play with this to get best cloud quality
    granite //warp{turbulence .25 omega .7 lambda .3}
    color_map {
      [0.0 rgb 0.0]
      [0.4 rgb 0.8]
      [1.0 rgb 0.5]
    }
    scale 15 // size of turbulence 10 to 25
  }
}

#declare Cloud1 = function { max(0,Cloud_form-0.6*(1-Cloud_turb))} //max(0,
whichever is greater, 0 or equation

#declare Cloud_Mass =
intersection {
  box { <-20, -10, -20>, <20, 20, 20> } // you can control the shape of the
base of the clouds with this

  blob {
    sphere { <0,0,0>, 10, 1 }
    sphere { <1,8,0>, 5, 1 }
    sphere { <0, 0, 0>, 8, 1 scale <1, .7, 1> translate <6, 1, 1>}
    sphere { <0, 0, 0>, 6, 1 scale <1, .6, 1> translate <10, 4, -2> }
    sphere { <0,0,0>, 13, 1 scale <1, .5, .6> translate <-10, 3, 4> }
    threshold .001
  }

  texture{pigment{ color rgbf 1 }}
  interior{
    media{
      method 2
      intervals 3
      scattering{ 5, color rgb <.1385,.15,.1375>*150 extinction 1.25}
      density{
        function {Cloud1}
        color_map {
          [0  color rgb 0.0]
          [1  color rgb 0.1
        }
      }
    }
  }
  hollow
}

object{Cloud_Mass scale 0.1 translate y*1}


Post a reply to this message

From: =Bob=
Subject: Re: media for jrg
Date: 10 Mar 2001 13:16:15
Message: <3aaa6f6f@news.povray.org>
There's an error in the code at line: 84

[Deletions]

: #declare Cloud_Mass =

etc.....

:       density{
:         function {Cloud1}
:         color_map {
:           [0  color rgb 0.0]
:           [1  color rgb 0.1

missing the closing ']'

:         }
:       }
:     }
:   }
:   hollow
: }
:
: object{Cloud_Mass scale 0.1 translate y*1}

=Bob=


Post a reply to this message

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