POV-Ray : Newsgroups : povray.binaries.images : Rainbow : Re: Rainbow Server Time
1 Aug 2024 04:10:35 EDT (-0400)
  Re: Rainbow  
From: Mike Hough
Date: 16 Dec 2008 18:24:28
Message: <494838ac$1@news.povray.org>
I have done a few test renders with your include file. Your model appears 
more accurate than mine, as I just threw the colors in at regular intervals. 
Rendering took about 10 times longer to render than my method using the 
scene provided, which is probably because I made the changes internally 
rather than in SDL. My changes were to scattering rather than emission 
media, which increases the render times many times when there is complex 
geometry in the scene due to shadow tests, but is relatively fast without 
many objects in the scene.

Mike


"Florian Siegmund" <flo### [at] gmxat> wrote in message 
news:web.49459cdf619c0ff365a1cfee0@news.povray.org...
> "Chris B" <nom### [at] nomailcom> wrote:
>> Your instructions don't seem to say how to get a rainbow to appear. They
>> just seem to describe the options for tailoring it once you get to see 
>> it.
>> Do you have a simple scene file to serve as an example for getting the
>> default one to appear?
>>
>> The include file seems to add a couple of spheres to the scene, but I 
>> placed
>> a camera and a light source at the default location specified in the 
>> include
>> file and got a black screen. I changed the background to white and got a
>> white screen, so I guess it needs something specific in the scene file to
>> make the rainbow visible.
>>
>> BTW. You shouldn't necessarily be discouraged by a lack of feedback. The
>> POV-Ray object collection has had over 20,000 downloads since it started 
>> a
>> year ago, but there's been very little feedback.
>>
>> Regards,
>> Chris B.
>
> Sorry, that was my fault. Here's a simple scene file with nothing but a 
> plane,
> light and the rainbow. Don't bother when the scene takes some time to 
> parse.
> This is because the include file is nothing else than a 'rainbow 
> raytracer'
> which is calculating the reflection, rafraction and dispersion of light 
> rays in
> a water droplet. The couple of spheres you mentioned is just the container
> object for the media. Don't bother your head about this :)
>
> So here's a little bit of code for you:
>
> // only the following two identifiers declared before including
> // the "rainbow.inc" file are really necessary to see the rainbow
> #declare camera_location = <0, 3, 0>;
> #declare rb_light_location = <500, 50, -500>;
>
> #declare rb_light_c = rgb <1, 1, 1>; // a color to be multiplied
> // with the rainbow color bands
> // (color of the virtual light source which is casting the rainbow)
>
> camera {
>    location camera_location  // this setting is obligatory for getting
>    // a correct result
>    look_at <0, 3, 1>
>    angle 30
> }
>
> light_source {rb_light_location  color rb_light_c} // not really 
> necessary,
> // because the rainbow media is emitting, not scattering
>
> plane {y, 0  pigment {color rgb 1}}
>
> background {color rgb <0.01, 0.05, 0.15>}
>
> // the following lines are just for playing around with and testing speed 
> and
> // quality of the resulting image
> #declare secondary_rb = on;
> #declare rb_distance = 40;
> #declare rb_brightness = 0.75;
> #declare rb_type = 2; // slower but more accurate than type 1
> // (type 1 is very good for testing purposes, because it renders really 
> fast!)
> #declare rb_spectrum_samples = 50; // number of samples in the wave 
> spectrum
> #declare rb_intervals = 20; // number of color maps put together
> // to create the rainbow
> #declare rb_c_map_samples = 80; // samples in a single color map
> #declare rb_area_light_angle = 0.15; // faking an area light source for
> // obtaining a smooth rainbow
> #declare rb_area_light_samples = 10;
>
> #include "rainbow.inc"
>


Post a reply to this message

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