POV-Ray : Newsgroups : povray.newusers : Why doesn't this work? Server Time
23 Nov 2024 09:58:09 EST (-0500)
  Why doesn't this work? (Message 1 to 8 of 8)  
From: Bald Eagle
Subject: Why doesn't this work?
Date: 7 Sep 2014 23:15:01
Message: <web.540d1f2a9ef2f49b5e7df57c0@news.povray.org>
I can't get the example in the docs to work, or the candle flame example from F.
Lohmueller's site.  I've probably tried 5 others.

I've been at this for hours, and I'm done searching and testing.

I'm clearly missing something.
[0 rgb 0] wipes out the sphere completely - no color, no "light"
THAT drove me crazy for most of the time.
Commenting that out finally gave me a semitransparent sphere of the next color
in the map.  Adding absorbing media just makes it look more solid.
I don't get any sort of transparent glowing effect like shown in the examples
for this copy-and pasted code.  The first is from the docs, the second is from
F. Lohmueller's candle flame example.

Why?



box {<-300, 0, 100>, <300, 400, 101> pigment {Gray50}}
//sphere {<0, 0, 0> 100 pigment {rgbf <0.6, 0, 0, 0.9>} translate y*270}
//light_source {<0, 270, 10> color rgb <1, 1, 1>}


/*
sphere {<0, 270, 0>, 100
 pigment {rgbt 1} hollow
 interior {
  media {
   emission 1
   //intervals 3
   //samples 1, 1
   density {spherical
    density_map {
     //[0 rgb 0]
     [0.0 rgb <1,0,0>]
     [0.8 rgb <1,1,0>]
     [1 rgbf 1]
     }  // end density map
    }  // end density block
   }  // end media block
  //media {absorption 0.2}
  }  // end interior
 }  // end sphere
*/


sphere {<0, 270, 0>, 100 hollow
 pigment {color rgbf <1, 1, 1, 1>}
 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>]
     }  //  end color_map
    scale <1,2.5,1>
    }  //  end of density
   }  //  end of media
  }  // end interior
 }  //  end sphere


Post a reply to this message

From: Thomas de Groot
Subject: Re: Why doesn't this work?
Date: 8 Sep 2014 06:53:11
Message: <540d8a97@news.povray.org>
For media *always* use intervals 1 (default; like method 3) and *only* 
one parameter for samples (second parameter ignored). Confidence and 
variance are default values so you can comment them out.

Try this for the Lohmueller flame:

sphere {<0, 2.7, 0>, 1 hollow
  pigment {color rgbf <1, 1, 1, 1>}
  finish { ambient 0 diffuse 0 }
  interior {
   media {
    emission color rgb<1.0,0.75,0.1>*1.75
    intervals 1
    samples 100
    //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>]
      }  //  end color_map
     scale <1,3.5,1>
     }  //  end of density
    }  //  end of media
   }  // end interior
  }  //  end sphere


or this for the doc's flame:

sphere {<0, 2.7, 0>, 1
  pigment {rgbt 1} hollow
  interior {
   media {
    emission 1
    intervals 1
    samples 100
    density {spherical
     density_map {
      [0 rgb 0]
      [0.0 rgb <1,0,0>]
      [0.8 rgb <1,1,0>]
      [1 rgbf 1]
      }  // end density map
     scale <1,3.5,1>
     }  // end density block
    }  // end media block
   //media {absorption 0.2}
   }  // end interior
  }  // end sphere


Both work for me. Note that I scaled the spheres down! I also 
uncommented the [0 rgb 0] lines of course.

Thomas


Post a reply to this message

From: Bald Eagle
Subject: Re: Why doesn't this work?
Date: 8 Sep 2014 09:05:01
Message: <web.540da8a73faefec35e7df57c0@news.povray.org>
Thomas de Groot <tho### [at] degrootorg> wrote:
> For media *always* use intervals 1 (default; like method 3) and *only*
> one parameter for samples (second parameter ignored). Confidence and
> variance are default values so you can comment them out.

Thanks as always, Thomas - but I seem to be having some fundamental problem
that's preventing it from working.  Your code gives me the same troublesome
behaviour when _I_ run it.
POV-Ray 3.7, WinXP, 2GB, 640x480 aa0.3, +q9

Full code below.


#version 3.7;
global_settings{ assumed_gamma 1.0 }

#include "debug.inc"
 Set_Debug (true)
#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"

#declare Feet = 12;


  #declare Camera_Position = < 0, 150, -50*Feet> ;  // front view
  #declare Camera_Look_At  = < 0, 150,  0.00> ;
  #declare Camera_Angle    =  65 ;

camera { location Camera_Position
        right    x*image_width/image_height
        angle    Camera_Angle
        look_at  Camera_Look_At
 }


light_source {<25*Feet, 100*Feet, -100*Feet> color rgb <1, 1, 1>*0.4}

/*
sky_sphere{ pigment{ gradient <0,1,0>
                     color_map{ [0   color rgb <1, 1, 1>         ]//White
                                [0.4 color rgb <0.14, 0.14, 0.56>]//~Navy
                                [0.6 color rgb <0.14, 0.14, 0.56>]//~Navy
                                [1.0 color rgb <1, 1, 1>         ]//White
                              }
                     scale 2 }
           } // end of sky_sphere

*/



box {<-300, 0, 100>, <300, 400, 101> pigment {Gray50}}
//sphere {<0, 0, 0> 100 pigment {rgbf <0.6, 0, 0, 0.9>} translate y*270}
//light_source {<0, 270, 10> color rgb <1, 1, 1>}


sphere {<0, 270, 0>, 10 hollow
  pigment {color rgbf <1, 1, 1, 1>}
  finish { ambient 0 diffuse 0 }
  interior {
   media {
    emission color rgb<1.0,0.75,0.1>*1.75
    intervals 1
    samples 100
    //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>]
      }  //  end color_map
     scale <1,3.5,1>
     }  //  end of density
    }  //  end of media
   }  // end interior
  }  //  end sphere

/*
sphere {<0, 270, 0>, 1
 pigment {rgbt 1} hollow
 interior {
  media {
   emission 1
   intervals 1
   samples 100
   density {spherical
    density_map {
     [0 rgb 0]
     [0.0 rgb <1,0,0>]
     [0.8 rgb <1,1,0>]
     [1 rgbf 1]
     }  // end density map
    }  // end density block
   }  // end media block
  //media {absorption 0.2}
  }  // end interior
 }  // end sphere
*/

/*
sphere {<0, 270, 0>, 100 hollow
 pigment {color rgbf <1, 1, 1, 1>}
 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>]
     }  //  end color_map
    scale <1,2.5,1>
    }  //  end of density
   }  //  end of media
  }  // end interior
 }  //  end sphere
*/


/*
sphere {<0, 270, 0>, 100
 pigment {rgbt 1} hollow
 interior {
  media {
   emission <1,1,1>
   intervals 3
   samples 1, 1 //min,max
   } // end of media ---
  } // end of interior
  //translate <0, 1.00, 0>
} //----- end of sphere
*/


Post a reply to this message

From: Thomas de Groot
Subject: Re: Why doesn't this work?
Date: 8 Sep 2014 10:31:51
Message: <540dbdd7$1@news.povray.org>
I think that the main problem resides in the definition of the sphere. 
Try this:

sphere {<0, 0, 0>, 100 hollow
   pigment {color rgbf <1, 1, 1, 1>}
   finish { ambient 0 diffuse 0 }
   interior {
    media {
     emission color rgb<1.0,0.75,0.1>*1.75
     intervals 1
     samples 100
     //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>]
       }  //  end color_map
      scale <1,3.5,1>*10
      }  //  end of density
     }  //  end of media
   }  // end interior
   translate <0,270,0>
   }  //  end sphere

This initialises the sphere at the origin and only translates it to its 
final position when everything is in place. Also increase the radius to 
make the sphere visible at all. Somehow the scale of the density needs 
to be scaled up too.

However, I am not too sure how the flame should look like in the end. 
Something you can do also is change the turbulence value to <0.15, 1.0, 
0.15>.

With all these settings I get the image I upload to p.b.i.

Thomas


Post a reply to this message

From: Bald Eagle
Subject: Re: Why doesn't this work?
Date: 8 Sep 2014 11:00:01
Message: <web.540dc41b3faefec35e7df57c0@news.povray.org>
Thomas de Groot <tho### [at] degrootorg> wrote:
> I think that the main problem resides in the definition of the sphere.
> Try this:

Tried.  Works.  _Thank You_
I was losing my mind.

> This initialises the sphere at the origin and only translates it to its
> final position when everything is in place.

Right-o.  I need to really discipline myself to do the Start-at-the-Origin
thing.
It avoids so many easily preventable problems.

> Also increase the radius to make the sphere visible at all. Somehow the scale
> of the density needs to be scaled up too.

The large scale is just a hold-over from the lathe / prism objects that I made
in EPspline, and finally got correctly oriented.  THAT was educational.
Likely the radius will wind up being more like _4_ instead of 100.

> However, I am not too sure how the flame should look like in the end.

I was really just trying to get _anything_ to show up, and figured that once it
was working, I could dabble with the details.  Hopefully something decent will
come of all this to make it onto tc-rtc...

Thanks again for the expert assistance!


Post a reply to this message

From: Thomas de Groot
Subject: Re: Why doesn't this work?
Date: 8 Sep 2014 11:01:18
Message: <540dc4be$1@news.povray.org>
Additional afterthought:

I think that you will obtain the best results by always defining the 
object at the origin and with unit scale. Only at the end of the built 
do you scale the object and translate it to its correct position. This 
is how it is done in the file candle_flame_4.pov .

Note: particularly when using scattering media, you need to divide the 
scattering by the used scale for the object in order to keep the same 
results. This is explained in the docs btw. For instance:

sphere {0, 1
   pigment {rgbt 1}
   hollow
   interior {
     media {
       scattering {1, <0.5,0.4, 0.3>/MyScale}
     }
   }
   scale MyScale
}

I am not sure, but I think this gives also better results with emission. 
With density, it is more complicated and you have to experiment.

Thomas


Post a reply to this message

From: Cousin Ricky
Subject: Re: Why doesn't this work?
Date: 8 Sep 2014 11:45:00
Message: <web.540dceca3faefec3192ae5f10@news.povray.org>
"Bald Eagle" <cre### [at] netscapenet> wrote:
> POV-Ray 3.7, WinXP, 2GB, 640x480 aa0.3, +q9

You're still using WinXP?  Microsoft is no longer issuing updates for WinXP.
If^H^H When some hacker finds another security hole, it will not be fixed.


Post a reply to this message

From: Bald Eagle
Subject: Re: Why doesn't this work?
Date: 8 Sep 2014 15:45:01
Message: <web.540e072c3faefec35e7df57c0@news.povray.org>
> You're still using WinXP?  Microsoft is no longer issuing updates for WinXP.
> If^H^H When some hacker finds another security hole, it will not be fixed.

Considering my ex-wife stole or destroyed everything I had, I'm lucky I've even
got the little laptop that I have.  You do what you can with what you've got.

I'll probably switch over to Linux or a dual-boot once things get more ...
stable.


Post a reply to this message

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