POV-Ray : Newsgroups : povray.binaries.animations : Cyclic fire animation (~80kbu) Server Time
20 Jul 2024 19:29:14 EDT (-0400)
  Cyclic fire animation (~80kbu) (Message 1 to 7 of 7)  
From: Warp
Subject: Cyclic fire animation (~80kbu)
Date: 12 Jul 2000 17:28:49
Message: <396ce310@news.povray.org>
Someone posted a fire animation here and asked how to make it cyclic. Well,
thinking a bit about it I got it:


Post a reply to this message


Attachments:
Download 'fire.mpg' (79 KB)

From: Mike Weber
Subject: Re: Cyclic fire animation (~80kbu)
Date: 12 Jul 2000 18:24:49
Message: <396cf031$1@news.povray.org>
Cool - very well done..

"Warp" <war### [at] tagpovrayorg> wrote in message
news:396ce310@news.povray.org...
>   Someone posted a fire animation here and asked how to make it cyclic.
Well,
> thinking a bit about it I got it:
>
>


----------------------------------------------------------------------------
----


>
>
> --
> main(i,_){for(_?--i,main(i+2,"FhhQHFIJD|FQTITFN]zRFHhhTBFHhhTBFysdB"[i]
> ):5;i&&_>1;printf("%s",_-70?_&1?"[]":" ":(_=0,"\n")),_/=2);} /*- Warp -*/


Post a reply to this message

From: Bob Hughes
Subject: Re: Cyclic fire animation (~80kbu)
Date: 13 Jul 2000 04:26:06
Message: <396d7d1e$1@news.povray.org>
Cyclic maybe, but not purely so in MS Media Player :-( since it probably would need
either the
first or last frame to be dropped out as well.

Bob


Post a reply to this message

From: Spock
Subject: Re: Cyclic fire animation (~80kbu)
Date: 13 Jul 2000 07:44:52
Message: <396dabb4@news.povray.org>
Not as good as my imagination, but better than my ability :-)

How did you do it?  With a little modification I can see this
being used for all kinds of things, including fireplaces, jet
and spaceship exhaust, candles, etc.  Way cool!

"Warp" <war### [at] tagpovrayorg> wrote in message
news:396ce310@news.povray.org...
>   Someone posted a fire animation here and asked how to make it cyclic.
Well,
> thinking a bit about it I got it:
>
>


----------------------------------------------------------------------------
----


>
>
> --
> main(i,_){for(_?--i,main(i+2,"FhhQHFIJD|FQTITFN]zRFHhhTBFHhhTBFysdB"[i]
> ):5;i&&_>1;printf("%s",_-70?_&1?"[]":" ":(_=0,"\n")),_/=2);} /*- Warp -*/


Post a reply to this message

From: Josh English
Subject: Re: Cyclic fire animation (~80kbu)
Date: 13 Jul 2000 16:12:29
Message: <396E22F0.A1013107@spiritone.com>
Did you use turbulence pow(sin(clock),2)+0.5 or something like that? Very Cool.

Josh

Warp wrote:

>   Someone posted a fire animation here and asked how to make it cyclic. Well,
> thinking a bit about it I got it:
>
>                Name: fire.mpg
>    fire.mpg    Type: MPLAYER2 File (video/mpeg)
>            Encoding: x-uuencode
>
> --
> main(i,_){for(_?--i,main(i+2,"FhhQHFIJD|FQTITFN]zRFHhhTBFHhhTBFysdB"[i]
> ):5;i&&_>1;printf("%s",_-70?_&1?"[]":" ":(_=0,"\n")),_/=2);} /*- Warp -*/

--
Josh English -- Lexiphanic Lethomaniac
eng### [at] spiritonecom
The POV-Ray Cyclopedia http://www.spiritone.com/~english/cyclopedia/


Post a reply to this message

From: Kevin Wampler
Subject: Re: Cyclic fire animation (~80kbu)
Date: 13 Jul 2000 17:13:34
Message: <396E2FDB.FED5137E@u.arizona.edu>
Not bad, but it looks a bit too smooth and regular to me.  I've gotten some
pretty good results with some variations on:

translate <0, -clock, 0>
warp { turbulence 1-clock }
translate <0, clock, 0>

translate <0, -clock+1, 0>
warp { turbulence clock }
translate <0, clock-1, 0>

as clock goes from 0 to 1-(1/frames) over the length of the animation.


Warp wrote:

>   Someone posted a fire animation here and asked how to make it cyclic. Well,
> thinking a bit about it I got it:
>
>                Name: fire.mpg
>    fire.mpg    Type: MPLAYER2 File (video/mpeg)
>            Encoding: x-uuencode
>
> --
> main(i,_){for(_?--i,main(i+2,"FhhQHFIJD|FQTITFN]zRFHhhTBFHhhTBFysdB"[i]
> ):5;i&&_>1;printf("%s",_-70?_&1?"[]":" ":(_=0,"\n")),_/=2);} /*- Warp -*/


Post a reply to this message

From: Warp
Subject: Re: Cyclic fire animation (~80kbu)
Date: 17 Jul 2000 11:28:47
Message: <3973262f@news.povray.org>
Well, the idea is quite simple.
  Some people said that the fire looks too smooth and regular. Well, I didn't
spend much time making a good-looking fire, but I just wanted to show that
the idea of cyclic fire animation works. The idea should be easily applicable
to almost any other fire animation.

  I made the fire with a media with a density function like this:

noise3d(x*5, y*5-clock*10, z*5)*exp(-sqr(x)-sqr(y)-sqr(z))

  Now, this makes a fire very similar to the one in the animation, but it's
not cyclic.
  The idea behind this function is that the y-parameter of the noise3d is
translated with the clock, thus creating the upwards movement of the function.
  To get a cyclic animation we need to get the same function in the last
frame as in the first one (well, the same if we are not using +KC).
  So we need another similar function that will have the same value with
clock being 1 as the abobe function with the clock being 0. Also the direction
and speed of the movement should be equal. This function is:

noise3d(x*5, y*5+10-clock*10, z*5)*exp(-sqr(x)-sqr(y)-sqr(z))

  Now we have to interpolate between these two functions so that when the
clock is 0 only the first function is in effect and when clock is 1 only the
second one is in effect. The linear interpolation function is the usual:

F1*(1-clock)+F2*clock

  I wasn't sure if this would work well (because for example when interpolating
image maps it doesn't morph between the images but just fades between them,
and here what we want is more like morphing than fading), but it seems to
work very well.

  And here is the povray code for the animation I posted:

#version Unofficial MegaPov 0.5;

camera { location -y-z*6 look_at 0 }

#declare F1 =
  function { noise3d(x*5,y*5-clock*10,z*5) }
#declare F2 =
  function { noise3d(x*5,y*5+10-clock*10,z*5) }

sphere
{ 0, 2
  hollow no_shadow pigment { rgbt 1 }
  interior
  { media
    { emission .5
      density
      { function
        { (F1(x,y,z)*(1-clock)+F2(x,y,z)*clock)*exp(-sqr(x)-sqr(y)-sqr(z))
        }
        density_map
        { [0 rgb 0]
          [.1 rgb <1,0,0>]
          [.2 rgb <1,1,0>]
          [1 rgb 1]
        }
      }
      method 3
    }
  }
  scale <1,2,1>
  translate -y
}

light_source { 0,2 }

difference
{ sphere { 0,2 }
  sphere { 0,1.8 }
  box { <-2,0,-2><2,2,2> }
  pigment { rgb <1,.6,.3> }
  scale 1.2 translate -y*1.5
}
light_source { <100,50,-200>, .5 }


-- 
main(i,_){for(_?--i,main(i+2,"FhhQHFIJD|FQTITFN]zRFHhhTBFHhhTBFysdB"[i]
):5;i&&_>1;printf("%s",_-70?_&1?"[]":" ":(_=0,"\n")),_/=2);} /*- Warp -*/


Post a reply to this message

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