POV-Ray : Newsgroups : povray.general : Snow : Re: Snow Server Time
12 Aug 2024 23:19:48 EDT (-0400)
  Re: Snow  
From: Mike
Date: 14 Dec 1998 21:29:03
Message: <36766400.78E44BC@aol.com>
Hmm, could try something like this:

/*untested code, but should be a good starting point*/

//The globe

difference {

sphere {<0, 0, 0>, 5
interior {ior 1.48 caustics .5 fade_distance 9 fade_power 2}
}

sphere {<0, 0, 0>, 4.9
interior {ior 1.33 caustics .5 fade_distance 15 fade_power 2}
}

pigment {color rgbf <.97, .98, .975, .98>}
finish {reflection .05 phong .5 phong_size 70 ambient 0}

}

#declare R1 = seed(1234)
#declare R2 = seed(4321)
#declare R3 = seed(1+2+3+4+4+3+2+1)  

#declare make_snow = 0

union {

#while (make_snow < 1000)  //how many flakes

sphere {<0, 0, 0>, .01
translate <-5, -5, -5>  //move to one corner of the cube
translate <10*rand(R1), 10*rand(R2), 10*rand(R3)> //then spread around
}

#declare make_snow = make_snow + 1
#end

/*This should be the shape of the globe*/
bounded_by { sphere {<0, 0, 0>, 4.899} } 

pigment {color White}
finish {ambient .5}
}

That should work pretty good unless you want to animate it.

-Mike

Mary K Casteel wrote:
> 
> I'm working on creating a snowglobe and don't know what to do about snow,
> does anyone have a tip for creating sparkling particles within the globe?
> -Patrick Casteel


Post a reply to this message

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