// PoVRay 3.7 Scene File "candle_flame_4.pov" // author: Friedrich A. Lohmueller, Oct-2008/Aug-2009 / Jan-2011 // email: Friedrich.Lohmueller_at_t-online.de // homepage: http://www.f-lohmueller.de //-------------------------------------------------------------------------- #version 3.7; global_settings{assumed_gamma 1.0} #default{ finish{ ambient 0.1 diffuse 0.9 }} //-------------------------------------------------------------------------- #include "colors.inc" #include "textures.inc" #include "glass.inc" #include "metals.inc" #include "golds.inc" #include "stones.inc" #include "woods.inc" #include "shapes.inc" #include "shapes2.inc" #include "functions.inc" #include "math.inc" #include "transforms.inc" //-------------------------------------------------------------------------------------------------------<<<< //------------------------------------------------------------- Camera_Position, Camera_look_at, Camera_Angle #declare Camera_Position = <0.0, 2.5,-24.0> ; #declare Camera_look_at = < 0.0, .5, 0.00>; #declare Camera_Angle = 12; // in degrees //--------------------------------------------------------------------------------------------------------<<<< camera{ /*ultra_wide_angle*/ // don't use fish eye - for proper text location Camera_Position right x*image_width/image_height angle Camera_Angle look_at Camera_look_at } //--------------------------------------------------------------------------------------------------------<<<< //------------------------------------------------------------------------ // sun ------------------------------------------------------------------- light_source{<200,2000,-1500> color White*0.15} // sun light light_source{ Camera_Position color rgb<0.9,0.9,1>*0.05} // flash light #macro Candle_1( Shining__On, // Light on, 0= off, >0 = intensity of candle light C__Height, // Candle_Height, C__Intensity, // Candle_Intensity, C__Scale // Candle_Flame_Scale ) // ----------------------------------- // --------------------------------------------------------------- #local D = 0.00001; // --------------------------------------------------------------- #local Flame__Shape = merge{ // egg intersection{ sphere{<0,0,0>,1} box{<-1,-D,-1>,< 1,1 ,1>} scale <1,2.5,1>} intersection{ sphere{<0,0,0>,1} box{<-1,-1 ,-1>,< 1,0+0.01,1>} } }//- ------------------------------------------------ // --------------------------------------------------------------- #local C__Flame = object{ Flame__Shape hollow pigment { color rgbf<1, 1, 1, 1> } // fully transparent !!! finish { ambient 0 diffuse 0 } interior { media { emission color rgb < 1.0, 0.75, 0.1>*1.75 intervals 9 samples 1, 20 confidence 0.9999 variance 1/100 density{ spherical ramp_wave turbulence 0.15 color_map { [0.0 color rgb <0.0, 0.0, 0.0>] [0.6 color rgb <0.8, 0.3, 0.0>] [0.9 color rgb <1.0, 0.8, 0.3>] [1.0 color rgb <1.0, 1.0, 0.1>] } scale <1,2.5,1> } // end density }//end of media media { emission color rgb < 1.0, 0.75, 0.1>*2.75 intervals 3 samples 32 method 3 aa_threshold 0.1 aa_level 5 density {crackle turbulence 0.3 scale 0.75 translate<0,24,0> color_map { [0 rgb 0] [0.00 rgb 0] [0.07 rgb 1] [0.10 rgb 1] [0.12 rgb 0] [1.00 rgb 0] } } // end density density {spherical color_map { [0 rgb 0] [0.7 rgb 1] [1 rgb 1] } } // end density scale <1,2.5,1>*0.5 translate<0,0.01,0> }// end media }//end of interior scale <1,1.5,1>*0.5 hollow // !!!! } union{ object{C__Flame scale <3.5,1.4,3.5> scale C__Scale translate<0,7,0> } #if(Shining__On>0) light_source { <0,0,0> color rgb <0.8, 0.5, 0.2>*Shining__On area_light // kind of light source (Art der Lichtquelle) <0, 0, 0> <0, 0.5, 0> // lights spread out across this distance 1, 10 // total number of lights in grid adaptive 3 // 0,1,2,3... jitter // adds random softening of light translate<0,0,0> } //---------------- end of area_light #end // of "#if(Shining__On>0)" } #end // ---------------------------------------------------- end of macro //-------------------------------------------------------------------------------- //-------------------------------------------------------------------------------- //-------------------------------------------------------------------------------- //-------------------------------------------------------------------------------- // ----------------------------------------------------------- object{ Candle_1( 0.5, // Shining__On, , 0= off, >0 = intensity of candle light 0.0, // Candle_Height, rel 0.65,// Candle_Intensity, 0.9, // Candle_Flame_Scale ) }