POV-Ray : Newsgroups : povray.binaries.images : Gas Flame (needs help) Server Time
11 Aug 2024 15:14:56 EDT (-0400)
  Gas Flame (needs help) (Message 11 to 15 of 15)  
<<< Previous 10 Messages Goto Initial 10 Messages
From: Hughes, B 
Subject: Re: Gas Flame (needs help)
Date: 21 Mar 2004 18:02:12
Message: <405e1ef4@news.povray.org>

news:405de0ae$1@news.povray.org...
>
> I'm not talking of the sampling methods (1, 2 and 3) which work with
> any kind of media, but of the emission method, of which there are two
> and which I know didn't make it into 3.5


then! I've done very little with MegaPOV and it shows.

-- 
Bob H.
http://www.3digitaleyes.com


Post a reply to this message

From: Tek
Subject: Re: Gas Flame (needs help)
Date: 21 Mar 2004 19:22:53
Message: <405e31dd$1@news.povray.org>
"Steve Shelby" <ssh### [at] rexnetnet> wrote in message
news:405d9c7a@news.povray.org...
> The flame is a bezier patch with scattering media. In flame1 the only light
> is a blue spotlight at its base, and it's almost acceptable. As soon as I
> add a point light to the scene (flame2), it's totally unacceptable. I've
> tried tweeking everything I can think of, and can't keep the outside of the
> bezier patch from showing. Is there a way to fix this, or am I going about
> it all wrong?

Dunno if this is the sort of thing you're after, but I've got this flame that
looks pretty good under most lighting conditions:
http://www.evilsuperbrain.com/gallery/index.php?gallery=wip&movie=boostertest

The media just uses emission, so it won't be affected by lights. Plus the
density drops to 0 at the edge of the bounding volume, so you can never see the
shape of the object.

The source is as follows:

#declare fBoosterGlow = .4;

   cylinder {
      <0,0,0>, <0,0,-1>, 1.2

      pigment { rgbf 1.0 }

      hollow on

      interior {
        media {
      emission 32.0*fBoosterGlow
        absorption 4*fBoosterGlow

      #declare cocentric_rings = 3;

        density {
         function { min(max( pow( -z, 0.25 ), 0),1) }
         density_map {
          [0.0
           wood
           sine_wave
           //poly_wave 1.0
           phase -0.25
           scale 1/cocentric_rings
           density_map {
            [0.0 //rgb 0]
             cylindrical
             poly_wave 2
             rotate <90,0,0>
             scale cocentric_rings
             colour_map {
              [0.0 rgb 0.2*<0.0, 0.0, 0.2>] //dark (i.e. pale) blue
              [1.0 rgb 0.2*<2.0, 1.0, 0.5>] //bright orange
             } //colour_map
            ]
            [1.0 //rgb 1]
             cylindrical
             poly_wave 2
             rotate <90,0,0>
             scale cocentric_rings
             colour_map {
              [0.0 rgb <0.0, 0.0, 0.2>] //dark (i.e. pale) blue
              [1.0 rgb <2.0, 1.0, 0.5>] //bright orange
             } //colour_map
            ]
           } //density_map
          ]
          [1.0 rgb 0]
         } //density_map
        } //density
        } //media
      } //interior

    scale <1,1,6>
   } //cylinder

Hope that helps.

-- 
Tek
www.evilsuperbrain.com


Post a reply to this message

From: John VanSickle
Subject: Re: Gas Flame (needs help)
Date: 21 Mar 2004 22:04:51
Message: <405E57D0.F934AA7C@hotmail.com>
Tek wrote:
> 
> Dunno if this is the sort of thing you're after, but I've got this
> flame that looks pretty good under most lighting conditions:

I posted one either here or on one of the scene-file groups which
uses emission and absorption (with identical density for each).

Got good results with it, and it animated well.

Regards,
John


Post a reply to this message

From: Kurts
Subject: Re: Gas Flame (needs help) - briquet.jpg (1/1)
Date: 22 Mar 2004 02:21:45
Message: <kurtzlepirate-E4BA4D.08214522032004@news.povray.org>
In article <405d9c7a@news.povray.org>, "Steve Shelby" <ssh### [at] rexnetnet> 
wrote:

> The flame is a bezier patch with scattering media. In flame1 the only light
> is a blue spotlight at its base, and it's almost acceptable. As soon as I
> add a point light to the scene (flame2), it's totally unacceptable. I've
> tried tweeking everything I can think of, and can't keep the outside of the
> bezier patch from showing. Is there a way to fix this, or am I going about
> it all wrong?

//  --------------------------------------------------------------------------
//  --- MACRO : FLAMME -------------------------------------------------------
//  --------------------------------------------------------------------------
#macro flamme(FAltitude, rayon, longueur, drawFlame, drawLight, useAreaLight, 
drawGlow)
  // -- flamme --------------------------------------------------------
  #if (drawFlame)
  #declare theFlame = blob {
    threshold 0.5
    #local f=0;
    #while (f<15)
      sphere {
        #local xPos = sin((0.5*f/14)*2)*0.5;
        #local yPos = 0.3+0.5*f/14;
        #local zPos = cos((0.5*f/14)*2)*0.5;
        #local rSphere = (0.4-0.2*f/15);
        <xPos, yPos, zPos>,
        rSphere
        strength 1
        }
        // #debug concat("\nx = ",str(xPos,6,4)," y = ",str(yPos,6,4)," z = 
",str(zPos,6,4)) 
      #local f=f+1;
    #end
    hollow   
    pigment { rgbt 1 }
    interior {
      media {
        method 3
        emission 0.80//rgb <1,.7,.25> 
        density {
          gradient y
          color_map {
            [0.0 rgb <0.2, 0.3, 0.8>*0.8]
            [0.3 rgb <1.0, 0.7, 0.25>]
            }
          scale 2
          }
        density {
          spherical color_map {
          [0.45 rgb 1]
          [.5 rgb 0]}
        scale 1.5/4
        translate 0.3*y
        }
      }
    }
    rotate rand(longueur)*360*y                                        
    scale <rayon,2.5*rayon,rayon>*2
    translate (FAltitude+1)*y
    no_shadow
    }
  #end
  // -- light -----------------------------------------------------------
  #if (drawLight)
  #declare theLight = light_source {
    <0,FAltitude+1+2*rayon,0>
    rgb <1.00, 0.75, 0.50>
    fade_distance 25 //50 ?
    fade_power 2 //3  
    #if (useAreaLight)
      area_light
      1.5*x,1.5*y,3,3
      adaptive 0
      jitter
      orient
      circular
    #end
    media_attenuation on
    }
  #end
  // -- glow ------------------------------------------------------------
  #if (drawGlow)
  #declare theGlow = box {
    -1,1
    hollow
    no_shadow
    pigment {rgbt 1}
    interior {
      media {
        method 3
        emission 0.035
        density {
        spherical
        color_map {
          [0.00 rgb <0.00, 0.00, 0.00>]
          [1.00 rgb <1.00, 0.80, 0.12>]
          }
        turbulence 0.1
        poly_wave 2
        }
      }
    } 
    translate y/2
    scale <rayon,rayon,rayon>*9
    translate FAltitude*y
    }
  #end
  union {
    object { theFlame }
    object { theLight }
    object { theGlow }
    }
#end


#declare alea = seed(0);
object {
  flamme(0,3,alea,true,true,false,true)
  translate <0, 57, 5>
  }


Post a reply to this message


Attachments:
Download 'briquet.jpg' (4 KB)

Preview of image 'briquet.jpg'
briquet.jpg


 

From: Steve Shelby
Subject: Re: Gas Flame (needs help)
Date: 22 Mar 2004 17:36:43
Message: <405f6a7b$1@news.povray.org>
Wow, more help than I ever expected! Thank you, everyone. Now I just have to
figure out what will work best for my purposes.
Steve Shelby


Post a reply to this message

<<< Previous 10 Messages Goto Initial 10 Messages

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