POV-Ray : Newsgroups : povray.binaries.animations : snow animations Server Time
1 Nov 2024 01:22:02 EDT (-0400)
  snow animations (Message 1 to 6 of 6)  
From: r20adek
Subject: snow animations
Date: 28 Dec 2005 19:25:01
Message: <web.43b32c06f15ea5a54272d270@news.povray.org>
Who help.I have this source code.

#declare PtA=<-30,0,-30>;
#declare PtB=<30,35,15>;
#declare nasio=seed(12345);

#declare ile=1000;
#declare licz=1;
#declare platek=sphere
{
  <0,0,0>,
  .1 pigment
  { color White }
}

#while
     (licz <ile)
        #declare los=VRand_In_Box(PtA, PtB, nasio);
        object { platek translate los }
        #declare licz=licz+1;
#end
I want snowing animations.What I must write to this code and where becasue
I'm newbie in Povray.
HELP ME.PLEASE


Post a reply to this message

From: Chris B
Subject: Re: snow animations
Date: 29 Dec 2005 05:33:55
Message: <43b3bb93@news.povray.org>
"r20adek" <rra### [at] o2pl> wrote in message 
news:web.43b32c06f15ea5a54272d270@news.povray.org...
> Who help.I have this source code.
> ... snip ...
> I want snowing animations.What I must write to this code and where becasue
> I'm newbie in Povray.
> HELP ME.PLEASE
>

Hi Radek,

To animate your snowflakes you need to modify the amount you move each one 
based upon the 'clock' variable. The following source adds a vector to the 
position of each flake to produce a very simple animation. It checks to make 
sure the flake hasn't dropped out of the bottom of the box and, if it has, 
it moves it back to the top of the box, positioning it so that it will 
produce a seamless animation cycle when rendered with the command line 
settings of   '+kfi1 +kff30 +kc'.

A couple of notes on protocol: I think it would have been better to post 
this question on the 'povray.animations' newsgroup as 
'povray.binaries.animations' is more for example animation files and stuff. 
CAPITALISATION is sort of like shouting and is more commonly used on 
newsgroups where questions don't get answered.


light_source { < -150, 80  ,-8> color rgb 1}
camera {location <0,20,-20> look_at <0,20,0>}
#include "colors.inc"
#include "rand.inc"

#declare PtA=<-30,0,-30>;
#declare PtB=<30,35,15>;
#declare nasio=seed(12345);

#declare FallVector = <-0.1,-1,-0.1>;

#declare ile=1000;
#declare licz=1;
#declare platek=sphere
{
  <0,0,0>,
  .1 pigment
  { color White }
}

#while
     (licz <ile)
        #declare los=VRand_In_Box(PtA, PtB, nasio);
        #declare los = los+FallVector*clock*35;
        #if (los.y<=0) #declare los = los-FallVector*35; #end
        object { platek translate los }
        #declare licz=licz+1;
#end


Regards,
Chris B.


Post a reply to this message

From: r20adek
Subject: Re: snow animations
Date: 29 Dec 2005 18:00:01
Message: <web.43b4698b37e0571554272d270@news.povray.org>
Can you tell me what I must do when snowflakes is animated??Because I'm vey
newbie and I don't now what I must do??????

#include "textures.inc"
#include "colors.inc"
#include "rand.inc"
plane
     {
        <0,1,0>,10000 hollow

      texture

             {

              pigment

              {color rgb<0.2,0.2,0.3>}

              finish

              {ambient 1  diffuse 0}
}
}

plane
     {
        <0,1,0>,1 hollow  //
      texture
            {
            pigment
                  {
                   bozo
                   turbulence 0.65
                        octaves 6  omega 0.7 lambda 2
                        color_map { [0.0 color rgb <0.95, 0.95, 0.95>]
                                    [0.1 color rgb <0.85, 0.85, 0.85>]
                                    [0.5 color rgbt <1, 1, 1, 1> ]
                                    [1.0 color rgbt <1, 1, 1, 1> ]   }
                        rotate<10,20,0>
                        scale <0.3, 0.4, 0.2>*3 }
              finish
                    {
              ambient 1 diffuse 0}}
      scale 1000}
// fog at the horizon
fog
   {
   distance 300000 color White}


sky_sphere {
  pigment {
    gradient y
    color_map {
      [0.0 rgb <0.6,0.7,1.0>]
      [0.7 rgb <0.0,0.1,0.8>]
    }
  }
}
  fog {
        fog_type 2 // tu określamy typ mgły
        fog_alt 1 // tu okreslamy jak szybko mgla ma malec
        fog_offset 0
        distance 2
        color <0.6,0.5,0.5>
}


light_source
           {
           <-400,2500,-1000> colour White}
plane
     {
       y,0 pigment
                 {colour White}
                 finish
                 {phong 1}
      }
camera
      {
      location <10,10,-50>
      look_at <0,22,0>
      }
light_source
            {
               <0,10,-6>
               colour White
             }
        sphere
              {
                 <-30,8,20>
                 9 pigment
                         {colour White}
                          finish
                          {reflection 0 phong 0}
               }
 sphere
       {
           <-27,6,13>
           1.5 pigment
                      {colour Yellow}
                      finish
                      {reflection 0 phong 0}
       }
 sphere
         {
             <-27,10,13>
             1.5 pigment
                        {colour Yellow}
                        finish
                        {reflection 0 phong 0}
          }
 sphere
       {
           <-27.4,14.5,14>
           1.2 pigment
           {colour Yellow}
           finish
           {reflection 0 phong 0}
        }
        sphere
               {
                   <-28,21.9,15>
                   7.8 pigment
                   {colour White}
                   finish
                   {reflection 0 phong 0}
                }
  sphere
        {
            <-24.7,16,8.4>
            1 pigment
            {colour Yellow}
            finish
            {reflection 0 phong 0}
         }
  sphere
        {
            <-24.5,20,8>
            1 pigment
            {colour Yellow}
            finish
            {reflection 0 phong 0}
         }
  sphere
         {
             <-20.7,22.5,1>
             0.9 pigment
             {colour Yellow}
             finish
             {reflection 0 phong 0}
          }
        sphere
               {
                   <-26.3,33,9>
                   6 pigment
                   {colour White}
                   finish
                   {reflection 0 phong 0}
                }


     union
          {

  cone
       {
          <-20.3,27,0>
          1
          <-20,22,0>
          0
}
  pigment
         {colour Red}
}
sphere
      {
          <-25,32,2>
          0.9 pigment
          {colour Blue}
          finish
          {reflection 0 phong 0}
}
sphere
      {
          <-20,31.5,2>
          0.9 pigment
          {colour Blue}
          finish
          {reflection 0 phong 0}
}
cylinder
        {
             <-24,45,2>   <-24,35,5>
             5 texture
             {
               pigment
               {Black}
              }
}





#declare PtA=<-30,0,-30>;
#declare PtB=<30,35,15>;
#declare nasio=seed(12345);

#declare FallVector = <-0.1,-1,-0.1>;

#declare ile=1000;
#declare licz=1;
#declare platek=sphere
{
  <0,0,0>,
  .1 pigment
  { color White }
}

#while
     (licz <ile)
        #declare los=VRand_In_Box(PtA, PtB, nasio);
        #declare los = los+FallVector*clock*35;
        #if (los.y<=0) #declare los = los-FallVector*35; #end
        object { platek translate los }
        #declare licz=licz+1;
#end


Post a reply to this message

From: Chris B
Subject: Re: snow animations
Date: 29 Dec 2005 19:07:26
Message: <43b47a3e$1@news.povray.org>
"r20adek" <rra### [at] o2pl> wrote in message 
news:web.43b4698b37e0571554272d270@news.povray.org...
> Can you tell me what I must do when snowflakes is animated??Because I'm 
> vey
> newbie and I don't now what I must do??????

The source you have is fine for animation.

If you render your source with the command line options "+kfi1 +kff30 +kc" 
(Initial_Frame=1, Final_Frame=30 and Cyclic Animation) you'll get 30 images 
numbered 1 to 30. If you're on Windows you can get a preview of your 
animation by putting the images in a separate directory and using the 
Windows Picture and Fax Viewer to open the first image, then holding the 
mouse button down on the 'Next Image' button cycles through the images.

To build these images into a proper animation you will need to use a 
separate piece of software to take the individual frames and generate an 
animation file. You need to decide upon a suitable format for your animated 
sequence, for example mpeg, moov, avi or animated gif.
There are many different tools you can use, some of them free and available 
for download over the Internet.

The choice of format depends on how you want to use the animated file. If 
you want to embed it on a web page then animated gif is the simplest and 
most widely compatible approach and you can build animated gif's with the 
Gif Constructor Set (do a Google search for gifcon32.exe).

You'll need to read up on how to use your tool of choice to generate 
whichever format you choose.

Regards,
Chris B.


Post a reply to this message

From: Chris B
Subject: Re: snow animations
Date: 29 Dec 2005 19:11:10
Message: <43b47b1e@news.povray.org>
"Chris B" <c_b### [at] btconnectcomnospam> wrote in message 
news:43b47a3e$1@news.povray.org...
> If you're on Windows you can get a preview of your animation by putting 
> the images in a separate directory and using the Windows Picture and Fax 
> Viewer to open the first image, then holding the mouse button down on the 
> 'Next Image' button cycles through the images.
>

Correction. - Holding the Page Down button on your keyboard cycles through 
the images.

Regards,
Chris B.


Post a reply to this message

From: Jaap
Subject: Re: snow animations
Date: 5 Jan 2006 05:30:00
Message: <web.43bcf4cb37e05715a8399d8d0@news.povray.org>
> Correction. - Holding the Page Down button on your keyboard cycles through
> the images.

or even better: http://www.irfanview.com/
open the first file, and use the mouse wheel to scroll through the
animation.
Irfanview also has a slide show option that can be set to 25Hz (0.04
sec/image)
It can also be used to do batch conversion between different image formats,
this is helpful if you rendered your frames as png, but your animation
software needs jpg's or bmp's. (to bad there isn't a Linux version :-)


Post a reply to this message

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