POV-Ray : Newsgroups : povray.binaries.images : SSLT candle experiment Server Time
15 May 2024 13:04:32 EDT (-0400)
  SSLT candle experiment (Message 1 to 10 of 18)  
Goto Latest 10 Messages Next 8 Messages >>>
From: Bruno Cabasson
Subject: SSLT candle experiment
Date: 15 Feb 2011 11:25:00
Message: <web.4d5aa7f0e5f2dd434aa45fdf0@news.povray.org>
Playing with SSLT, I took the candle from the subsurface.pov example, and tried
to have a satisfactory result. Used radiosity.

Bruno


Post a reply to this message


Attachments:
Download 'candle7.png' (113 KB)

Preview of image 'candle7.png'
candle7.png


 

From: Bruno Cabasson
Subject: Re: SSLT candle experiment
Date: 17 Feb 2011 02:55:01
Message: <web.4d5cd3f944aed71b4aa45fdf0@news.povray.org>
"Bruno Cabasson" <bru### [at] alcatelaleniaspacefr> wrote:
> Playing with SSLT, I took the candle from the subsurface.pov example, and tried
> to have a satisfactory result. Used radiosity.
>
> Bruno

Following this post and the 'SSLT and scaling' thread, here an attempt for
scaling the candle and see what happens for SSLT parameters. It appears to me
that subsurface parameters must be adjusted wrt scaling so as to have consistent
behaviour. One can turn comment out the candles to see them individually, and
use DECLARE=QUALITY=1 for quick rendering.

It also seems that the wick projects a shadow at its base despite the no_shadow
keyword.

Finally, I am wondering about the smallest candle and the sharp shadows in the
bottom right.

I continue playing.

Bruno

//--------------------------

#version 3.7;

#include "colors.inc"

#declare m = 1;
#declare cm = m/100;
#declare mm = m/1000;
#declare FLAME_COLOR = (2*Orange+Yellow)/3;
#declare FLAME_POWER = 4;
#declare FLAME_FADE_DIST = 15*cm;
//#declare QUALITY = 1; // Use DECLARE=QUALITY=1 in command line

#declare RAD_COUNT = 50*QUALITY;
#declare SSLT_SAMPLES = <20, 5>*QUALITY*2;

#default { finish{ambient 0 emission 0}}

global_settings
{
    assumed_gamma 1
    mm_per_unit 1/mm
    subsurface { samples SSLT_SAMPLES.x, SSLT_SAMPLES.y}

    radiosity
    {
        pretrace_start 32/image_width
        pretrace_end 2/image_width
        count RAD_COUNT
        error_bound 0.5
        nearest_count 15
        recursion_limit 2
        low_error_factor 1
        media on
    }
}

// ----------------------------------------

camera {
  location  <0.0, 1.0, -4.0>*8*cm
  direction 1.5*z
  right     x*image_width/image_height
  look_at   <0.5, 0.75,  0.0>*8*cm
}

declare LS_Lamp = light_source {<-5, 5, -5>*m color rgb 0.2}

#macro makeLSCandle(_power)
    #local _ret = light_source
    {
      0
      color rgb FLAME_POWER*FLAME_COLOR*_power
      area_light 1*cm*x, 2*cm*y, 4*QUALITY, 4*QUALITY adaptive 1 circular orient
      //area_illumination on
      fade_power 2
      fade_distance FLAME_FADE_DIST
      //looks_like {sphere {0, 2*mm pigment {Red}}}
    }
    _ret
#end

// ----------------------------------------


#declare O_Floor = plane
{
    y, -0.1*mm
    pigment {rgb 1}
}

// a candle...
#macro make10cmCandleBody (_scale)
    blob
    {
      threshold 0.5
      cylinder { <0.0, 0.0,  0.0>,
                 <0.0, 2.0,  0.0>,  1.0,   1.0 } // candle "body"
      sphere   { <0.0, 2.5,  0.0>,  0.8,  -2.0 } // (used to shape the candle
top)
      sphere   { <0.0,-0.52, 0.0>,  0.8,  -2.0 } // (used to shape the candle
bottom)
      sphere   { <0.0, 2.0, -0.5>,  0.1,  -0.2 } // the "notch" where wax runs
over
      cylinder { <0.0, 1.88,-0.52>,
                 <0.0, 1.5, -0.52>, 0.05,  0.2 } // a streak of wax running over
      sphere   { <0.0, 1.5, -0.55>, 0.07,  0.2 } // a drop of of wax running
over
      texture
      {
        //pigment {wrinlkles scale 0.1 color_map {[ 0.3 Blue] [0.3 Red]}}
        pigment {rgb 1}
        finish
        {
          specular 0.1 roughness 2*cm
          ambient 0
          // "artificial" wax parameters
          subsurface { < 1.6732, 1.2806, 0.6947>*pow(_scale,1/3),< 0.0005,
0.0018, 0.0131>*pow(_scale,1/3)}
        }
      }
      scale 1/2
      scale 10*cm
      scale _scale
      interior { ior 1.45 }
      rotate -y*45
    }
#end

// ... and the wick
#declare O_Wick = cylinder
{
    0, 1*cm*y, 1*mm
    pigment {rgb 0.05}
}

#macro makeFlame(_power)
    ovus
    {
        3.5*mm, 3*mm
        pigment {rgbt 1}
        //finish {emission 1}
        hollow
        interior
        {
            media
            {
                samples 20
                scattering {1, (1/_power)*3/(1*cm)}
                absorption 6/(1*cm)
                density {spherical scale 2 warp {turbulence 0.7 octaves 8} scale
1/2 scale 0.3*cm scale 2*y translate -1*mm*y }
                density {spherical scale 0.3*cm scale 2*y translate -1*mm*y }
                density {spherical scale 0.3*cm scale 2*y translate -1*mm*y }
            }
        }
        scale 3
        no_shadow
    }
#end

#macro make10cmCandle(_scale, _power)
    union
    {
        light_source {makeLSCandle(_power) translate 11*cm*y  scale _scale}
        object {make10cmCandleBody(_scale)}
        object {O_Wick translate 9.75*cm*y scale _scale no_shadow}
        object {makeFlame(_power) translate 11.5*cm*y scale _scale }
    }
#end

#declare O_Dome = sphere
{
    0, 5*m
    hollow
    pigment {checker scale 0.1*m}
}

//light_source {LS_Lamp}
object {O_Floor}
object {make10cmCandle(1, 1) rotate 90*y}
object {make10cmCandle(1/2, sqrt(1/2)) translate 7*cm*x - 5*cm*z}
object {make10cmCandle(1/4, sqrt(1/4)) translate 10*cm*x - 10*cm*z}
object {O_Dome}


Post a reply to this message


Attachments:
Download 'candle14.png' (134 KB)

Preview of image 'candle14.png'
candle14.png


 

From: Stephen
Subject: Re: SSLT candle experiment
Date: 17 Feb 2011 04:01:11
Message: <4d5ce3d7$1@news.povray.org>
On 17/02/2011 7:53 AM, Bruno Cabasson wrote:
> I continue playing.

My experiments lead me to believe that AA settings have a strong effect 
on SSLT.

-- 
Regards
     Stephen


Post a reply to this message

From: clipka
Subject: Re: SSLT candle experiment
Date: 17 Feb 2011 04:32:56
Message: <4d5ceb48$1@news.povray.org>
Am 17.02.2011 08:53, schrieb Bruno Cabasson:

> Following this post and the 'SSLT and scaling' thread, here an attempt for
> scaling the candle and see what happens for SSLT parameters. It appears to me
> that subsurface parameters must be adjusted wrt scaling so as to have consistent
> behaviour.

Scaling is /not/ necessary if you want the things to appear as being 
made out of the same material but different sizes.

The differences you see are probably due to the many other tweakables 
you have per candle.

> It also seems that the wick projects a shadow at its base despite the no_shadow
> keyword.

No. I'm pretty puzzled about what's going on there, but it's definitely 
not the wick, as can be plainly seen when you comment that out.

I prefer to think that the rim is brighter because it gets illuminated 
not only by the light from above, but also from light being reflected 
back at the candle's sides (remember fresnel reflectance), whereas at 
the center the light just diffuses towards the bottom and gets absorbed 
along the way, so maybe it's realistic after all (given the material 
parameters we have, which are potentially bogus).


> Finally, I am wondering about the smallest candle and the sharp shadows in the
> bottom right.

That is, of course, the shadow from the smallest and medium candle, cast 
by the light of the largest candle.


BTW, for more dramatic (and actually more realistic) atmosphere, reduce 
FLAME_FADE_DIST, and increase FLAME_POWER instead.

As a rule of thumb, fade_distance of an area light source should be 
about the same order of magnitude as the area light's dimensions.

Another issue with your scene is the non-circular circular area light. 
I'm not sure whether this works at all, but in combination with orient 
it may give you pretty surprising results, as the area light source may 
essentially be rotated about /any/ axis to achieve the necessary 
orientation.


>
> I continue playing.
>
> Bruno
>
> //--------------------------
>
> #version 3.7;
>
> #include "colors.inc"
>
> #declare m = 1;
> #declare cm = m/100;
> #declare mm = m/1000;
> #declare FLAME_COLOR = (2*Orange+Yellow)/3;
> #declare FLAME_POWER = 4;
> #declare FLAME_FADE_DIST = 15*cm;
> //#declare QUALITY = 1; // Use DECLARE=QUALITY=1 in command line
>
> #declare RAD_COUNT = 50*QUALITY;
> #declare SSLT_SAMPLES =<20, 5>*QUALITY*2;
>
> #default { finish{ambient 0 emission 0}}
>
> global_settings
> {
>      assumed_gamma 1
>      mm_per_unit 1/mm
>      subsurface { samples SSLT_SAMPLES.x, SSLT_SAMPLES.y}
>
>      radiosity
>      {
>          pretrace_start 32/image_width
>          pretrace_end 2/image_width
>          count RAD_COUNT
>          error_bound 0.5
>          nearest_count 15
>          recursion_limit 2
>          low_error_factor 1
>          media on
>      }
> }
>
> // ----------------------------------------
>
> camera {
>    location<0.0, 1.0, -4.0>*8*cm
>    direction 1.5*z
>    right     x*image_width/image_height
>    look_at<0.5, 0.75,  0.0>*8*cm
> }
>
> declare LS_Lamp = light_source {<-5, 5, -5>*m color rgb 0.2}
>
> #macro makeLSCandle(_power)
>      #local _ret = light_source
>      {
>        0
>        color rgb FLAME_POWER*FLAME_COLOR*_power
>        area_light 1*cm*x, 2*cm*y, 4*QUALITY, 4*QUALITY adaptive 1 circular orient
>        //area_illumination on
>        fade_power 2
>        fade_distance FLAME_FADE_DIST
>        //looks_like {sphere {0, 2*mm pigment {Red}}}
>      }
>      _ret
> #end
>
> // ----------------------------------------
>
>
> #declare O_Floor = plane
> {
>      y, -0.1*mm
>      pigment {rgb 1}
> }
>
> // a candle...
> #macro make10cmCandleBody (_scale)
>      blob
>      {
>        threshold 0.5
>        cylinder {<0.0, 0.0,  0.0>,
>                   <0.0, 2.0,  0.0>,  1.0,   1.0 } // candle "body"
>        sphere   {<0.0, 2.5,  0.0>,  0.8,  -2.0 } // (used to shape the candle
> top)
>        sphere   {<0.0,-0.52, 0.0>,  0.8,  -2.0 } // (used to shape the candle
> bottom)
>        sphere   {<0.0, 2.0, -0.5>,  0.1,  -0.2 } // the "notch" where wax runs
> over
>        cylinder {<0.0, 1.88,-0.52>,
>                   <0.0, 1.5, -0.52>, 0.05,  0.2 } // a streak of wax running over
>        sphere   {<0.0, 1.5, -0.55>, 0.07,  0.2 } // a drop of of wax running
> over
>        texture
>        {
>          //pigment {wrinlkles scale 0.1 color_map {[ 0.3 Blue] [0.3 Red]}}
>          pigment {rgb 1}
>          finish
>          {
>            specular 0.1 roughness 2*cm
>            ambient 0
>            // "artificial" wax parameters
>            subsurface {<  1.6732, 1.2806, 0.6947>*pow(_scale,1/3),<  0.0005,
> 0.0018, 0.0131>*pow(_scale,1/3)}
>          }
>        }
>        scale 1/2
>        scale 10*cm
>        scale _scale
>        interior { ior 1.45 }
>        rotate -y*45
>      }
> #end
>
> // ... and the wick
> #declare O_Wick = cylinder
> {
>      0, 1*cm*y, 1*mm
>      pigment {rgb 0.05}
> }
>
> #macro makeFlame(_power)
>      ovus
>      {
>          3.5*mm, 3*mm
>          pigment {rgbt 1}
>          //finish {emission 1}
>          hollow
>          interior
>          {
>              media
>              {
>                  samples 20
>                  scattering {1, (1/_power)*3/(1*cm)}
>                  absorption 6/(1*cm)
>                  density {spherical scale 2 warp {turbulence 0.7 octaves 8} scale
> 1/2 scale 0.3*cm scale 2*y translate -1*mm*y }
>                  density {spherical scale 0.3*cm scale 2*y translate -1*mm*y }
>                  density {spherical scale 0.3*cm scale 2*y translate -1*mm*y }
>              }
>          }
>          scale 3
>          no_shadow
>      }
> #end
>
> #macro make10cmCandle(_scale, _power)
>      union
>      {
>          light_source {makeLSCandle(_power) translate 11*cm*y  scale _scale}
>          object {make10cmCandleBody(_scale)}
>          object {O_Wick translate 9.75*cm*y scale _scale no_shadow}
>          object {makeFlame(_power) translate 11.5*cm*y scale _scale }
>      }
> #end
>
> #declare O_Dome = sphere
> {
>      0, 5*m
>      hollow
>      pigment {checker scale 0.1*m}
> }
>
> //light_source {LS_Lamp}
> object {O_Floor}
> object {make10cmCandle(1, 1) rotate 90*y}
> object {make10cmCandle(1/2, sqrt(1/2)) translate 7*cm*x - 5*cm*z}
> object {make10cmCandle(1/4, sqrt(1/4)) translate 10*cm*x - 10*cm*z}
> object {O_Dome}


Post a reply to this message

From: clipka
Subject: Re: SSLT candle experiment
Date: 17 Feb 2011 04:35:47
Message: <4d5cebf3$1@news.povray.org>
Am 17.02.2011 10:01, schrieb Stephen:
> On 17/02/2011 7:53 AM, Bruno Cabasson wrote:
>> I continue playing.
>
> My experiments lead me to believe that AA settings have a strong effect
> on SSLT.

They do insofar as they counter some of the noise. Other than that, they 
shouldn't make a difference.

(Note in that context that if you're using an assumed_gamma other than 
1.0, or have your display gamma wrong, noisy areas appear to have 
different brightness than de-noised ones.)


Post a reply to this message

From: Bruno Cabasson
Subject: Re: SSLT candle experiment
Date: 18 Feb 2011 01:40:01
Message: <web.4d5e134344aed71bf7fe15af0@news.povray.org>
clipka <ano### [at] anonymousorg> wrote:
> Am 17.02.2011 10:01, schrieb Stephen:
> > On 17/02/2011 7:53 AM, Bruno Cabasson wrote:
> >> I continue playing.
> >
> > My experiments lead me to believe that AA settings have a strong effect
> > on SSLT.
>
> They do insofar as they counter some of the noise. Other than that, they
> shouldn't make a difference.
>
> (Note in that context that if you're using an assumed_gamma other than
> 1.0, or have your display gamma wrong, noisy areas appear to have
> different brightness than de-noised ones.)

Is this one better?


Post a reply to this message


Attachments:
Download 'candle15.png' (139 KB)

Preview of image 'candle15.png'
candle15.png


 

From: Edouard
Subject: Re: SSLT candle experiment
Date: 18 Feb 2011 02:35:01
Message: <web.4d5e1fa744aed71b53da43a00@news.povray.org>
> Is this one better?

The wax looks just right, you can see the sizes just at a glance by the SSLT!

Cheers,
Edouard.


Post a reply to this message

From: Bruno Cabasson
Subject: Re: SSLT candle experiment
Date: 18 Feb 2011 05:05:01
Message: <web.4d5e43e544aed71b4aa45fdf0@news.povray.org>
"Edouard" <pov### [at] edouardinfo> wrote:
> > Is this one better?
>
> The wax looks just right, you can see the sizes just at a glance by the SSLT!
>
> Cheers,
> Edouard.

In this experiment, I intended to make the size of the flame proportional to the
size of the candle. So, I adjusted the lights powers according to the sizes
proportionally, ie: *2 for the biggest, *1, *1/2, *1/4 respectively. I don't
know the law for the illumination of flames wrt their size. I suppose the
illumination comes from the surface of the flame, and therefore follows a
quadratic law. My powers are surely wrong for flame powers proportional to the
flame sizes.

However, in RL, the size of the flame is generally not proportional to the size
of the candle ...

I also set the fade_distance in the same order of magnitude than the area light
(twice). I am a bit confused by the fact that the dome is so barely visible,
despite 4 candles. But, after all, they are small (the biggest is 16 cm high)
and the dome is 5 metre from there. Maybe relative illuminations are correct.


Post a reply to this message

From: clipka
Subject: Re: SSLT candle experiment
Date: 18 Feb 2011 07:17:47
Message: <4d5e636b$1@news.povray.org>
Am 18.02.2011 07:35, schrieb Bruno Cabasson:

> Is this one better?

Hell, yeah!


Post a reply to this message

From: clipka
Subject: Re: SSLT candle experiment
Date: 18 Feb 2011 07:20:39
Message: <4d5e6417$1@news.povray.org>
Am 18.02.2011 11:03, schrieb Bruno Cabasson:

> I also set the fade_distance in the same order of magnitude than the area light
> (twice). I am a bit confused by the fact that the dome is so barely visible,
> despite 4 candles. But, after all, they are small (the biggest is 16 cm high)
> and the dome is 5 metre from there. Maybe relative illuminations are correct.

I never liked that dome anyway :-P


Post a reply to this message

Goto Latest 10 Messages Next 8 Messages >>>

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