POV-Ray : Newsgroups : povray.newusers : Re: Fire Server Time
2 Nov 2024 07:25:28 EDT (-0400)
  Re: Fire (Message 1 to 4 of 4)  
From: jute
Subject: Re: Fire
Date: 5 Sep 2004 17:55:01
Message: <web.413b8a5616273ab26f84e23f0@news.povray.org>
There are so many different kinds of flames and fires (from gasoline
explosion to a gentle candle flame) that without more information it's
difficult to give you anything but this:

#declare Flame = density {
  spherical
  scale 0.5
  // warp { turbulence 0.5 }
  #local ovec = <Orange.x, Orange.y, Orange.z>;
  #local yvec = <Yellow.x, Yellow.y, Yellow.z>;
  color_map {
    [0.0 rgb 0]
    [0.7 rgb 0]
    [0.7 rgb 0.5]
    [0.75 rgb vlength(ovec)]
    [0.8 rgb vlength(yvec)]
    [0.9 rgb 1]
    [1.0 rgb 1]
  }
}

I've used it succesfully with media { emission Gold*Brightness }, where
Brightness is adjusted according to your media container and/or other
environmental details.  Add turbulence according to your needs; the scaling
is there to account for precisely that, in the common case of having a unit
sphere/cube as a container.   Note, however, that this Flame does not
simulate the bluish base (or outline) present in many flames.  If you wish
to try other patterns than spherical, be aware that the color_map above
works very well if you just adjust the 'baseline', that is, keep the
relative distances between the non-black colors the same.

I've been playing with fire ( ;-) ) in POV-Ray for waaaaay too many hours
during the past six months, and will post on my results 'any day now' (that
is, whenever I get around to doing that RSOCF 'first post' image!)


Post a reply to this message

From: Oleguer Vilella
Subject: Re: Fire
Date: 6 Sep 2004 03:45:05
Message: <413c1581$1@news.povray.org>
Hello Jute,

Thank you very much to ask my question.
You put: " #declare Flame = density {"
I'm traying to see the object and I put after your code " object { Flame },
but the program give mw and error.
I was looking it on the Help File and I found this:
density {
       [DENSITY_IDENTIFIER] [PATTERN_TYPE] [DENSITY_MODIFIER...]
    }   |
If I take away #declare directive the program give me an other error. Why
can not remove this directive? and Why if I put "object { Flame }" I can not
see it?

Best regards,
Oleguer


news:web.413b8a5616273ab26f84e23f0@news.povray.org...
> There are so many different kinds of flames and fires (from gasoline
> explosion to a gentle candle flame) that without more information it's
> difficult to give you anything but this:
>
> #declare Flame = density {
>   spherical
>   scale 0.5
>   // warp { turbulence 0.5 }
>   #local ovec = <Orange.x, Orange.y, Orange.z>;
>   #local yvec = <Yellow.x, Yellow.y, Yellow.z>;
>   color_map {
>     [0.0 rgb 0]
>     [0.7 rgb 0]
>     [0.7 rgb 0.5]
>     [0.75 rgb vlength(ovec)]
>     [0.8 rgb vlength(yvec)]
>     [0.9 rgb 1]
>     [1.0 rgb 1]
>   }
> }
>
> I've used it succesfully with media { emission Gold*Brightness }, where
> Brightness is adjusted according to your media container and/or other
> environmental details.  Add turbulence according to your needs; the
scaling
> is there to account for precisely that, in the common case of having a
unit
> sphere/cube as a container.   Note, however, that this Flame does not
> simulate the bluish base (or outline) present in many flames.  If you wish
> to try other patterns than spherical, be aware that the color_map above
> works very well if you just adjust the 'baseline', that is, keep the
> relative distances between the non-black colors the same.
>
> I've been playing with fire ( ;-) ) in POV-Ray for waaaaay too many hours
> during the past six months, and will post on my results 'any day now'
(that
> is, whenever I get around to doing that RSOCF 'first post' image!)
>
>
>
>
>
>
>
>
>
>


Post a reply to this message

From: Tim Nikias
Subject: Re: Fire
Date: 6 Sep 2004 04:21:40
Message: <413c1e14$1@news.povray.org>
Hi there!

> You put: " #declare Flame = density {"
> I'm traying to see the object and I put after your code " object {
Flame },
> but the program give mw and error.

The code is missing the closing bracket. When you use a { you have to put
a } at a position so that POV-Ray knows what belongs together. In this case,
the } is missing after the warp-comment, like this:

 #declare Flame = density {
   spherical
   scale 0.5
   // warp { turbulence 0.5 }
  }

Then, declaring something using #declare, sort of memorizes it instead of
placing it directly. So when you declare an object, you have to use the
object{...} to actually make use of the memorized object.
In this case, however, the memorized thing is not an object, but a density.
Media makes use of density, and you'd use it on an object like this:

lathe{...
pigment { rgbt <1,1,1,1>} finish { ambient 0.4  }
interior{media{emission 1 intervals 1 method 3 samples 5,10
density{Flame} }}
}

There are some other keywords however, which will affect the look and detail
of the media, the above is just a quick example. Look at the documentation
for "media", "interior" and "#declare" for further insight.

Regards,
Tim

-- 
"Tim Nikias v2.0"
Homepage: <http://www.nolights.de>


Post a reply to this message

From: Oleguer Vilella
Subject: Re: Fire
Date: 6 Sep 2004 05:20:53
Message: <413c2bf5$1@news.povray.org>
Ok Tim, thank you.

Regards,
Oleguer


mensaje news:413c1e14$1@news.povray.org...
> Hi there!
>
> > You put: " #declare Flame = density {"
> > I'm traying to see the object and I put after your code " object {
> Flame },
> > but the program give mw and error.
>
> The code is missing the closing bracket. When you use a { you have to put
> a } at a position so that POV-Ray knows what belongs together. In this
case,
> the } is missing after the warp-comment, like this:
>
>  #declare Flame = density {
>    spherical
>    scale 0.5
>    // warp { turbulence 0.5 }
>   }
>
> Then, declaring something using #declare, sort of memorizes it instead of
> placing it directly. So when you declare an object, you have to use the
> object{...} to actually make use of the memorized object.
> In this case, however, the memorized thing is not an object, but a
density.
> Media makes use of density, and you'd use it on an object like this:
>
> lathe{...
> pigment { rgbt <1,1,1,1>} finish { ambient 0.4  }
> interior{media{emission 1 intervals 1 method 3 samples 5,10
> density{Flame} }}
> }
>
> There are some other keywords however, which will affect the look and
detail
> of the media, the above is just a quick example. Look at the documentation
> for "media", "interior" and "#declare" for further insight.
>
> Regards,
> Tim
>
> -- 
> "Tim Nikias v2.0"
> Homepage: <http://www.nolights.de>
>
>


Post a reply to this message

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