POV-Ray : Newsgroups : povray.text.scene-files : fire media : Re: fire media Server Time
8 Jul 2024 11:48:42 EDT (-0400)
  Re: fire media  
From: Elias Pschernig
Date: 14 Dec 2000 17:52:53
Message: <3a394f45$1@news.povray.org>
> I made a candle lit with an emission media.
> When the background is black the flames look right, but as soon as I
> add the candle to my scene the fire looks too clear, even if I
> increase the amount of emission. What should I do?
> Should I add absorption or scattering media to the fire ?

I asked almost exactly the same 2 month ago in povray.newusers, and
someone gave me a solution which works for me:

Duplicate your complete emission media, and in the duplicate, replace
emission by absorption. Then replace all color-components by 1 -
color-components. e.g. <1,0,0.4> becomes <1-1,1-0,1-0.4> = <0,1,0.6>. To
get it look right, i then had to multiply emission and absorption
color...

This is what i have so far. It's not completely like I want it yet, but
maybe it gives you an idea:

#declare m_flame=
   material{
      texture

         pigment { color rgbf 1 }
         finish { ambient 1 diffuse 0 }
      }
      interior


         media {
            intervals 40
            emission rgb 5
            density

               spherical
               color_map

                  [0.0 color rgb <0,0,0>]
                  [0.3 color rgb <1,.6,0>]
                  [0.5 color rgb <1,.8,0>]
                  [1.0 color rgb <1,1,1>]
               }
               warp {
                  black_hole <0,0,-1> 2
                  falloff 1
                  strength 1
                  inverse
               }
               warp {
                  black_hole <0,0,1> 2
                  falloff 1
                  strength 1
               }
            }
         }

         media {
            intervals 40
            absorption rgb 8
            density

               spherical
               color_map

                  [0.0 color rgb <0,0,0>]
                  [0.3 color rgb <0,.4,1>]
                  [0.5 color rgb <0,.2,1>]
                  [1.0 color rgb <0,0,0>]
               }
               warp {
                  black_hole <0,0,-1> 2
                  falloff 1
                  strength 1
                  inverse
               }
               warp {
                  black_hole <0,0,1> 2
                  falloff 1
                  strength 1
               }
            }
         }
      }
   }


camera

   location y*-5
   up z
   right x*4/3
   direction y
}

plane {
   y,10
   material {
      texture {
         pigment {checker}
         finish {ambient .5}
      }
   }
   hollow
}


sphere {
   <0, 0, 0> 1
   material {
      m_flame
   }
   scale <.3 1 1>
   hollow
}


Post a reply to this message

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