POV-Ray : Newsgroups : povray.binaries.images : Fire and... wait, what the hell...? [100 KB] Server Time
7 Aug 2024 19:26:59 EDT (-0400)
  Fire and... wait, what the hell...? [100 KB] (Message 6 to 15 of 15)  
<<< Previous 5 Messages Goto Initial 10 Messages
From: Eero Ahonen
Subject: Re: Fire and... wait, what the hell...? [100 KB]
Date: 9 Feb 2006 10:44:35
Message: <43eb6363$1@news.povray.org>
Trevor G Quayle wrote:
>
> If you're interested, I have a macro I made a couple years ago for a candle
> flame as in the attached image.
>

Nice one - open source? :)

-- 
Eero "Aero" Ahonen
   http://www.zbxt.net
      aer### [at] removethiszbxtnetinvalid


Post a reply to this message

From: Trevor G Quayle
Subject: Re: Fire and... wait, what the hell...? [100 KB]
Date: 9 Feb 2006 13:35:00
Message: <web.43eb8a3cf5fb88c4c8947640@news.povray.org>
Eero Ahonen <aer### [at] removethiszbxtnetinvalid> wrote:
> Trevor G Quayle wrote:
> >
> > If you're interested, I have a macro I made a couple years ago for a candle
> > flame as in the attached image.
> >
>
> Nice one - open source? :)
>
> --
> Eero "Aero" Ahonen
>    http://www.zbxt.net
>       aer### [at] removethiszbxtnetinvalid

Sure.  It evens contains a macro that attempts to reverse engineer the
turbulence to keep the flame properly postioned when turbulated (doesn't
work too well with turbulence of 1 or more, tends to get stuck and not be
able to find the turbulated point).

Feel free to adjust anything in it.  Don't ask me o explain the mathematics
though, I wrote it a few years ago and have no idea how it works anymore.


#macro Flam (Turb)
  #local R1=seed(2);
  #local OS=rand(R1)*50;
  #local Flam1 = function(x,y,z)
{pow(pow(pow(3*x,2)+pow(0.8*y-0.2,2)+pow(3*z,2),3)+pow(max(1-sqrt(pow(5*x,2)+pow(y+.5,2)+pow(5*z,2)),0),2))}
  #local Flam2 = function(x,y,z)
{floor(pow(sqrt(pow((3.5*x),2)+pow((0.4*y+0.6),2)+pow((3.5*z),2)),2))}
  #local FlamF = function(x,y,z) {min(max(Flam1(x,y,z),Flam2(x,y,z)),1)}
  #macro turb_translate (tTurb,tOcta,tLamb,tOmeg,P0,Acc)
    #local PC=P0;
    #local Dir=<0,0,0>;
    #local V0=vlength(vturbulence(tLamb, tOmeg, tOcta, P0)*tTurb);
    #local Step=V0/2;
    #macro AB(PC,Step,d,Dir,V0)
      #local P1=PC+Step*d;
      #local V1=vlength(P1+vturbulence(tLamb, tOmeg, tOcta, P1)*tTurb-P0);
      #if (V1<V0 | d.x=1)
        #local Dir=d;
        #local V0=V1;
      #end
    #end
    #while (V0>Acc)
      #local DrP=Dir;
      AB(PC,Step, x,Dir,V0)
      AB(PC,Step,-x,Dir,V0)
      AB(PC,Step, y,Dir,V0)
      AB(PC,Step,-y,Dir,V0)
      AB(PC,Step, z,Dir,V0)
      AB(PC,Step,-z,Dir,V0)
      #if (vlength(DrP+Dir)=0)
        #local Step=Step/2;
      #else
        #local Step=V0/2;
      #end
      #local PC=PC+Step*Dir;
    #end
    PC
  #end
  #local tOcta=7;
  #local tLamb=1.32;
  #local tOmeg=0.135;
  sphere{0 1.1 scale <1/2,1,1/2> translate y*(0.15+OS)
    hollow
    pigment{rgbt <1,1,1,1>}
    interior{
      media{
        emission rgb 0.3
        method 3
        intervals 2
        density{
          function{FlamF(x,y-OS,z)}
          color_map{
            [0.00 rgb <1,1,.5>]
            [0.20 rgb <1,.5,0>]
            [0.60 rgb <1,.1,0>]
            [0.78 rgb <0,0,0>]
            [0.84 rgb <0,0,0>]
            [0.89 rgb <1,0,1>]
            [0.93 rgb <0,0,1>]
            [0.98 rgb <0,1,1>]
            [1.00 rgb <0,0,0>]
          }
          warp{
            turbulence Turb
            octaves tOcta
            lambda tLamb
            omega tOmeg
          }
        }
      }
    }
    no_shadow
    translate turb_translate(Turb,tOcta,tLamb,tOmeg,y*(0.65-OS),0.001)
  }
#end

object{Flam(0.2) scale 10}


-tgq


Post a reply to this message

From: Orchid XP v2
Subject: Re: Fire and... wait, what the hell...? [100 KB]
Date: 9 Feb 2006 16:30:28
Message: <43ebb474@news.povray.org>
> Intriguing image...
> 
> One is not sure what it is at first glance but... yes there is something
> there. I think you should explore this more in detail.
> 
> Where are your wood and marble textures?

That's Not Good(tm)... :-/

> ... oh! the background, or box?

Yeah. The box is supposed to be wood. And the thing the candle stands on 
is supposed to be a slab of cold marble.


Post a reply to this message

From: Orchid XP v2
Subject: Re: Fire and... wait, what the hell...? [100 KB]
Date: 9 Feb 2006 16:33:35
Message: <43ebb52f$1@news.povray.org>
> I suggest a change in lighting: a subtle pale blue light from above, 
> preferably an area light or even totally shadowless so it doesn't look too 
> obvious. This will shift the image away from the monochromatic and, assuming 
> your ice is white and everything else is orange, should really help make it 
> look like ice and make it stand out from the background.

I tried making the candle flame cyan instead of yellow.

It made the wood look green! :-S

The ice did look slightly more icy though. But only slightly. I think 
maybe the ice is just too damn transparent? Or maybe I should put some 
scattering media in it or something? (I mean heck, it's only 4 hours a 
render at the moment; why not make it 4,000 hours??)


The candle is *supposed* to be composed of snow. But nobody would ever 
realise that. It just looks... well, like granite, actually. Or maybe 
brass, with all that orange light on it. (Candle flame is orange, wood 
is orange, radiosity.....)

I haven't even started on the flame yet. As I see it, I need to fix the 
abysmal wood and marble textures, make the ice look more like ice, and 
somehow make my snow look like snow.

So, basically, change the entire image, actually... >_<


Post a reply to this message

From: Gail Shaw
Subject: Re: Fire and... wait, what the hell...? [100 KB]
Date: 9 Feb 2006 23:35:44
Message: <43ec1820@news.povray.org>
"Orchid XP v2" <voi### [at] devnull> wrote in message
news:43ebb52f$1@news.povray.org...

>
> I tried making the candle flame cyan instead of yellow.
>
> It made the wood look green! :-S

Leave the candle flame orange/yellow and put a fade_distance on it, then a
blue light from above will look very nice. Warm in the center (within range
of the candle) and cool further away

> The ice did look slightly more icy though. But only slightly. I think
> maybe the ice is just too damn transparent? Or maybe I should put some
> scattering media in it or something? (I mean heck, it's only 4 hours a
> render at the moment; why not make it 4,000 hours??)
>

Try these...

#declare M_Ice= // might be suitable, was designed for a frozen lake
 material {
  texture {
   pigment{rgb <.9,.9,1>}
   normal {bumps 0.02 scale 0.25 turbulence .5}
   finish {specular 0.5 roughness 0.02 diffuse 0.7 ambient 0.3
    reflection { 0 , 0.15 }
    conserve_energy
   }
  }
  interior {
   ior 1.25
   fade_distance 0.002
   fade_power 2
   fade_color rgb <1,1,1>
  }
}

#declare T_Snow=
  texture {
   pigment {rgb <0.95,0.95,1>}
   finish {
    ambient 0.25
    diffuse 0.55
    reflection {0,0.2}
    specular 0.6 roughness 0.008
   }
   normal {granite 0.1 scale 0.01}
  }

> I haven't even started on the flame yet. As I see it, I need to fix the
> abysmal wood and marble textures, make the ice look more like ice, and
> somehow make my snow look like snow.

The textures in woods.inc and stones.in are quite nice, at least as
starting point

> So, basically, change the entire image, actually... >_<

As my archery coach is fond of saying Why should you be different from
everyone else? Most of my scenes go through 2-3 complete redesigns before
I'm happy.


Post a reply to this message

From: Tek
Subject: Re: Fire and... wait, what the hell...? [100 KB]
Date: 10 Feb 2006 00:05:06
Message: <43ec1f02$1@news.povray.org>
"Gail Shaw" <gshaw AT sentechsa com> wrote in message 
news:43ec1820@news.povray.org...
>
> Leave the candle flame orange/yellow and put a fade_distance on it, then a
> blue light from above will look very nice. Warm in the center (within 
> range
> of the candle) and cool further away

Yeah exactly, you need the orange but it will look more orange if there's a 
second light that's at the other end of the spectrum and in a different part 
of the scene, lots of nice contrast and varying tone.

-- 
Tek
http://evilsuperbrain.com


Post a reply to this message

From: Orchid XP v2
Subject: Re: Fire and... wait, what the hell...? [100 KB]
Date: 10 Feb 2006 14:17:24
Message: <43ece6c4$1@news.povray.org>
>>I tried making the candle flame cyan instead of yellow.
>>
>>It made the wood look green! :-S
> 
> 
> Leave the candle flame orange/yellow and put a fade_distance on it, then a
> blue light from above will look very nice. Warm in the center (within range
> of the candle) and cool further away

The yellow light source inside the flame already has face_distance set. 
(And face_power=2.)

Now, here's a question. Should I add a blue *light source*, or just make 
the roof of the box bright blue and let radiosity do the rest?

>>The ice did look slightly more icy though. But only slightly. I think
>>maybe the ice is just too damn transparent? Or maybe I should put some
>>scattering media in it or something? (I mean heck, it's only 4 hours a
>>render at the moment; why not make it 4,000 hours??)
> 
> 
> Try these...
> 
> #declare M_Ice= // might be suitable, was designed for a frozen lake
>  material {
>   texture {
>    pigment{rgb <.9,.9,1>}
>    normal {bumps 0.02 scale 0.25 turbulence .5}
>    finish {specular 0.5 roughness 0.02 diffuse 0.7 ambient 0.3
>     reflection { 0 , 0.15 }
>     conserve_energy
>    }
>   }
>   interior {
>    ior 1.25
>    fade_distance 0.002
>    fade_power 2
>    fade_color rgb <1,1,1>
>   }
> }
> 
> #declare T_Snow=
>   texture {
>    pigment {rgb <0.95,0.95,1>}
>    finish {
>     ambient 0.25
>     diffuse 0.55
>     reflection {0,0.2}
>     specular 0.6 roughness 0.008
>    }
>    normal {granite 0.1 scale 0.01}
>   }

Thanks. I'll give 'em a whirl.

>>I haven't even started on the flame yet. As I see it, I need to fix the
>>abysmal wood and marble textures, make the ice look more like ice, and
>>somehow make my snow look like snow.
> 
> 
> The textures in woods.inc and stones.in are quite nice, at least as
> starting point

Um... isn't that defined as cheating?

>>So, basically, change the entire image, actually... >_<
> 
> 
> As my archery coach is fond of saying Why should you be different from
> everyone else? Most of my scenes go through 2-3 complete redesigns before
> I'm happy.

Ah well... we'll see what I can get done over the weekend...


Post a reply to this message

From: Gail Shaw
Subject: Re: Fire and... wait, what the hell...? [100 KB]
Date: 10 Feb 2006 14:50:51
Message: <43ecee9b@news.povray.org>
"Orchid XP v2" <voi### [at] devnull> wrote in message
news:43ece6c4$1@news.povray.org...
>
> The yellow light source inside the flame already has face_distance set.
> (And face_power=2.)

What's the fade_distance, what's the colour and how big is the scene?

> Now, here's a question. Should I add a blue *light source*, or just make
> the roof of the box bright blue and let radiosity do the rest?

personally, I'd say scrap the radiosity, but that's because I've never had
much luck with it.
Give it a try both with and without if you have the time.

>
> Thanks. I'll give 'em a whirl.

Pleasure

> > The textures in woods.inc and stones.in are quite nice, at least as
> > starting point
>
> Um... isn't that defined as cheating?

No, why would it? It's called not reinventing the wheel when it's not
necessary.

Irtc doesn't say that you must create everything yourself, just that you
must give credit for other's work
Do you not use any of the standard pov includes?


Post a reply to this message

From: Orchid XP v2
Subject: Re: Fire and... wait, what the hell...? [100 KB]
Date: 10 Feb 2006 16:55:08
Message: <43ed0bbc$1@news.povray.org>
>>The yellow light source inside the flame already has face_distance set.
>>(And face_power=2.)
> 
> 
> What's the fade_distance, what's the colour and how big is the scene?

*checks*

face_distance is 50 cm. (For reference, the candle is 20 cm tall.)

Colour is <0.9, 0.8, 0.5>.

>>Now, here's a question. Should I add a blue *light source*, or just make
>>the roof of the box bright blue and let radiosity do the rest?
> 
> 
> personally, I'd say scrap the radiosity, but that's because I've never had
> much luck with it.
> Give it a try both with and without if you have the time.

Without the radiosity, almost the entire floor is in shaddow and comes 
out pure black. (It's shaded by the candle. BTW, *real* candles do this 
also. I have *lots* of candles. What can I say? I enjoy burning things. 
Erm...)

Of course, if I add another light source...

>>>The textures in woods.inc and stones.in are quite nice, at least as
>>>starting point
>>
>>Um... isn't that defined as cheating?
> 
> 
> No, why would it? It's called not reinventing the wheel when it's not
> necessary.
> 
> Irtc doesn't say that you must create everything yourself, just that you
> must give credit for other's work
> Do you not use any of the standard pov includes?

I used functions.inc so I could access f_bozo [which is what generates 
that bizzare candle] and f_crackle [for the ice crystals]. But no, I 
never use anything else.


Post a reply to this message

From: Tek
Subject: Re: Fire and... wait, what the hell...? [100 KB]
Date: 11 Feb 2006 04:04:48
Message: <43eda8b0$1@news.povray.org>
Personally I always use radiosity if it doesn't make my renders too slow 
(which it usually does!), particularly if I have an enclosed scene like this 
where you'd need a lot of lights to fake all the light that should be 
bouncing off the walls. I normally use the Radiosity_Fast setting in 
rad_def.inc, because it's way too complex to figure out what all the 
radiosity settings do.

-- 
Tek
http://evilsuperbrain.com

"Orchid XP v2" <voi### [at] devnull> wrote in message 
news:43ed0bbc$1@news.povray.org...
>>>The yellow light source inside the flame already has face_distance set.
>>>(And face_power=2.)
>>
>>
>> What's the fade_distance, what's the colour and how big is the scene?
>
> *checks*
>
> face_distance is 50 cm. (For reference, the candle is 20 cm tall.)
>
> Colour is <0.9, 0.8, 0.5>.
>
>>>Now, here's a question. Should I add a blue *light source*, or just make
>>>the roof of the box bright blue and let radiosity do the rest?
>>
>>
>> personally, I'd say scrap the radiosity, but that's because I've never 
>> had
>> much luck with it.
>> Give it a try both with and without if you have the time.
>
> Without the radiosity, almost the entire floor is in shaddow and comes out 
> pure black. (It's shaded by the candle. BTW, *real* candles do this also. 
> I have *lots* of candles. What can I say? I enjoy burning things. Erm...)
>
> Of course, if I add another light source...
>
>>>>The textures in woods.inc and stones.in are quite nice, at least as
>>>>starting point
>>>
>>>Um... isn't that defined as cheating?
>>
>>
>> No, why would it? It's called not reinventing the wheel when it's not
>> necessary.
>>
>> Irtc doesn't say that you must create everything yourself, just that you
>> must give credit for other's work
>> Do you not use any of the standard pov includes?
>
> I used functions.inc so I could access f_bozo [which is what generates 
> that bizzare candle] and f_crackle [for the ice crystals]. But no, I never 
> use anything else.


Post a reply to this message

<<< Previous 5 Messages Goto Initial 10 Messages

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