POV-Ray : Newsgroups : povray.general : Snow Server Time
13 Aug 2024 03:15:39 EDT (-0400)
  Snow (Message 4 to 13 of 13)  
<<< Previous 3 Messages Goto Initial 10 Messages
From: Mike
Subject: Re: Snow
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

From: Lance Birch
Subject: Re: Snow
Date: 14 Dec 1998 22:58:06
Message: <3675de4e.0@news.povray.org>
The easiest (gulp, not really) way to do this is make a particle system.
For the particles use triangles, although they sound rather primitive, they
do produce a good looking snow because of the way the light reacts with them
as they tumble.  It might be hard to simulate this with POV-Ray.  I oce
tried to make a particle system with POV-Ray but ended in failure.  The only
really good snow I was able to make was with MAX's particle dynamics.  Once
again, I used triangles (although facing triangles are a good way to start,
by facing I mean camera normalised).  This is the best way to go about
animating it.  If you're planning on doing any kind of animation it's best
of have a particle system (perhaps POV-Ray's macros would help, I've never
used macros so I wouldn't know, I presume it's like MAXScript, in which case
it would help tremedously!).  There are a few particle simulators out there
but I'm not sure if you could convert the particles to POV-Ray.

--
Lance.


---
For the latest MAX plug-ins, images and much more, go to:
The Zone - http://come.to/the.zone


Post a reply to this message

From: Abe
Subject: Re: Snow
Date: 15 Dec 1998 09:51:11
Message: <36767797.5435088F@atmos.albany.edu>
It would be my inclination to use triangles (or some polygon) for the snow.
In the real world falling snow can assume a variety of characteristics, but in
a snow globe the stuff seems to be composed of little white chips which are
generally flat. (I may be wrong here since I have not taken one of these things
in hand for some time.) Further, as has been mentioned, randomly oriented flat
surfaces (e.g. triangles) would help achieve the twinkling effect.
  If the final rendering is to be a still image, filling a spherical space with
whatever objects randomly distributed should present no problem . However, if
it is to be an animation, I would agree with previous posts that the problem
becomes a little more complex - though being constrained to a sphere volume as
opposed to a box may be a good thing.


Abe


Post a reply to this message

From: Spider
Subject: Re: Snow
Date: 15 Dec 1998 11:30:26
Message: <36768DEA.B031F468@bahnhof.se>
Ho Mike.
I jump in here with a THANKYOU.
I posted a line about this pice called 3D match a while up...
Hadn't found the bounded_by statement... Or was to dumb to use it....

Thanx again...
But, the question remains... What are the formula to test if a pont is inside a sphere
(useful in a few othjer progs I'm doing... ??

Well, thankya again...
AS for the snowflakes, try a scaled sphere.... scale <0.1,1,1> or so... Then a
rotation...

//Spider


Mike wrote:
> 
> 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

From: Remco de Korte
Subject: Re: Snow
Date: 15 Dec 1998 14:57:14
Message: <36766677.6300C6AC@xs4all.nl>
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


I'll add my non-realistic two cents to the other suggestions.
I made a small animation with snow some time ago and found this made a great
difference. For the flakes I used simple white spheres, but with a high ambient
value. Snow IS white, after all...

Regards,

Remco
http://www.xs4all.nl/~remcodek/


Post a reply to this message

From: PoD
Subject: Re: Snow
Date: 15 Dec 1998 17:06:23
Message: <3676DD63.4190@merlin.net.au>
Spider wrote:
> 
> Ho Mike.
> I jump in here with a THANKYOU.
> I posted a line about this pice called 3D match a while up...
> Hadn't found the bounded_by statement... Or was to dumb to use it....
> 
> Thanx again...
> But, the question remains... What are the formula to test if a pont is inside a
sphere
> (useful in a few othjer progs I'm doing... ??
> 
> Well, thankya again...
> AS for the snowflakes, try a scaled sphere.... scale <0.1,1,1> or so... Then a
rotation...
> 
> //Spider
> 

Couldn't be simpler in POV,
  #if( vlength( Point - SphereCentre ) < SphereRadius )
     ...
  #end

if it's not in POV
  X = Point.x - SphereCentre.x
  Y = Point.y - SphereCentre.y
  Z = Point.z - SphereCentre.y
  D = X*X + Y*Y + Z*Z
  if( D < SphereRadius * SphereRadius )

Cheers, PoD.


Post a reply to this message

From: Spider
Subject: Re: Snow
Date: 15 Dec 1998 19:38:18
Message: <36770048.9BD682F6@bahnhof.se>
Once again...
There was a new reply in teh 3d math thread, using a good algorithm..
It was posted by Abe (Thanx)

Try it out, it should(may) be what you want...

//Spider


Post a reply to this message

From: Tony Vigil
Subject: Re: Snow (the lazy man's way)
Date: 16 Dec 1998 13:42:22
Message: <367800A3.885DC385@emc-inc.com>
I am naturally a lazy person.  I wanted to see if a texture could be used
to simulate snow in a snow globe.  I just posted the results in
povray.binaries.images with the subject "Snow Globe".  The model &
textures were created in Moray for Windows.  Creating the model &
textures took about 10 minutes.  Rendering the scene took about 25
minutes.

I used the following texture on tori oriented to each axis (X,Y,Z)...

#declare Snowflakes =
   texture  // Snowflakes
   {
      pigment
      {
         leopard
         color_map
         {
            [ 0.0     rgbft <1.0, 1.0, 1.0, 1.0, 0.0> ]
            [ 0.8     rgbft <1.0, 1.0, 1.0, 1.0, 0.0> ]
            [ 0.9     rgbft <1.0, 1.0, 1.0, 0.0, 0.0> ]
            [ 1.0     rgbft <1.0, 1.0, 1.0, 0.0, 0.0> ]
         }
         turbulence 1.0
      }
      finish
      {
         ambient 0.7
         diffuse 0.3
      }
      scale  0.025
   }


Spider wrote:

> Once again...
> There was a new reply in teh 3d math thread, using a good algorithm..
> It was posted by Abe (Thanx)
>
> Try it out, it should(may) be what you want...
>
> //Spider


Post a reply to this message

From: Spider
Subject: Re: Snow (the lazy man's way)
Date: 16 Dec 1998 15:57:24
Message: <36781E01.20016127@bahnhof.se>
Yes... Very lazy..
Can you convert it to a JPEG ???
At this size, I don't intend to download it..

//Spider

Tony Vigil wrote:
> 
> I am naturally a lazy person.  I wanted to see if a texture could be used
> to simulate snow in a snow globe.  I just posted the results in
> povray.binaries.images with the subject "Snow Globe".  The model &
> textures were created in Moray for Windows.  Creating the model &
> textures took about 10 minutes.  Rendering the scene took about 25
> minutes.
> 
> I used the following texture on tori oriented to each axis (X,Y,Z)...
> 
> #declare Snowflakes =
>    texture  // Snowflakes
>    {
>       pigment
>       {
>          leopard
>          color_map
>          {
>             [ 0.0     rgbft <1.0, 1.0, 1.0, 1.0, 0.0> ]
>             [ 0.8     rgbft <1.0, 1.0, 1.0, 1.0, 0.0> ]
>             [ 0.9     rgbft <1.0, 1.0, 1.0, 0.0, 0.0> ]
>             [ 1.0     rgbft <1.0, 1.0, 1.0, 0.0, 0.0> ]
>          }
>          turbulence 1.0
>       }
>       finish
>       {
>          ambient 0.7
>          diffuse 0.3
>       }
>       scale  0.025
>    }
> 
> Spider wrote:
> 
> > Once again...
> > There was a new reply in teh 3d math thread, using a good algorithm..
> > It was posted by Abe (Thanx)
> >
> > Try it out, it should(may) be what you want...
> >
> > //Spider


Post a reply to this message

From: Tony Vigil
Subject: Re: Snow (the lazy man's way)
Date: 17 Dec 1998 13:43:09
Message: <3679524A.95595106@emc-inc.com>
yeah yeah yeah, I already repented for my mistake.

The new & improved smaller version is there for all to see.

regards,
tv

Spider wrote:

> Yes... Very lazy..
> Can you convert it to a JPEG ???
> At this size, I don't intend to download it..
>
> //Spider
>
> Tony Vigil wrote:
> >
> > I am naturally a lazy person.  I wanted to see if a texture could be used
> > to simulate snow in a snow globe.  I just posted the results in
> > povray.binaries.images with the subject "Snow Globe".  The model &
> > textures were created in Moray for Windows.  Creating the model &
> > textures took about 10 minutes.  Rendering the scene took about 25
> > minutes.
> >
> > I used the following texture on tori oriented to each axis (X,Y,Z)...
> >
> > #declare Snowflakes =
> >    texture  // Snowflakes
> >    {
> >       pigment
> >       {
> >          leopard
> >          color_map
> >          {
> >             [ 0.0     rgbft <1.0, 1.0, 1.0, 1.0, 0.0> ]
> >             [ 0.8     rgbft <1.0, 1.0, 1.0, 1.0, 0.0> ]
> >             [ 0.9     rgbft <1.0, 1.0, 1.0, 0.0, 0.0> ]
> >             [ 1.0     rgbft <1.0, 1.0, 1.0, 0.0, 0.0> ]
> >          }
> >          turbulence 1.0
> >       }
> >       finish
> >       {
> >          ambient 0.7
> >          diffuse 0.3
> >       }
> >       scale  0.025
> >    }
> >
> > Spider wrote:
> >
> > > Once again...
> > > There was a new reply in teh 3d math thread, using a good algorithm..
> > > It was posted by Abe (Thanx)
> > >
> > > Try it out, it should(may) be what you want...
> > >
> > > //Spider


Post a reply to this message

<<< Previous 3 Messages Goto Initial 10 Messages

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