POV-Ray : Newsgroups : povray.general : Scattering media with a white background (w/ images) : Re: Scattering media with a white background (w/ images) Server Time
29 Jul 2024 10:32:29 EDT (-0400)
  Re: Scattering media with a white background (w/ images)  
From: Alain
Date: 11 Mar 2013 22:44:44
Message: <513e969c$1@news.povray.org>

> Hello,
>
> I'm trying to create an image with scattering media, on a white background. This
> topic seems to be similar to that posted by someone in 2002
>
(http://news.povray.org/povray.general/thread/%3CXns92C3BC15D86CCseed7%40povray.org%3E/),
> but I did  not see a solution in that thread.
>
> I can create the image I want with no problem with a BLACK background (see this
> image: http://tinypic.com/r/1sh8gw/6). While my input *pov file is rather large,
> below are the (I think) essential elements of creating that image:
> ---------------------------------------
> #declare color_light = rgb <2.00, 2.00, 2.00>;
> #declare color_background = rgb <0.00, 0.00, 0.00>;
>
> light_source { light_location color color_light media_interaction off shadowless
>   scale light_scale }background { color color_background }
>
> light_source { <80, 15.516/2, 65.259> color color_light spotlight point_at <5*43
> ..628/6., 15.516/2, 65.259/2> radius 10 falloff 5 tightness 20 media_attenuation
> on}
>
> box {
>     <0, 0, 0>, <80, 15.51625, 80>
>     texture {pigment { color rgbt <1,1,1,1>}} hollow interior { media {scattering
>   {1, 0.07 extinction 0.01} intervals 5 samples 300,300}}}
>
> ---------------------------------------------
>
> I wanted to make a white background, so I made color_background rgb < 1,1,1> and
> then tried to modify the spotlight light_source by setting the spotlight color
> to something like red. However, this is what the outputted image looks like in
> this case: http://tinypic.com/r/10prshz/6.
>
> You can see in that image that there is some-sort of red spotlight action going
> on, in that the atomic positions in the spotlight have some mixture of red color
> on them, but definitely the image does not have the scattering effects present
> with the white background.
>
> What am I missing? Thanks for any pointers you can give.
>
> Best,
> Brad
>
>

Your media seems to comform to the obsolete sampling method 1. The 
default is method 3. With that method, the followings apply:

Your media will render faster if you omit intervals 5. It default to 
intervals 1 and should be left alone. For example, intervals 1 samples 
1000 renders faster than intervals 10 samples 20 for 5 times as many 
samples.
Also, the second samples parameter is NOT used.

Against a white background, the colouring can easily get drowned out, 
especialy when using a very smal extinction value. Remove extinction 
0.01 and use the default of 1. This will darken the background.

For all light_source, "media_atenuation" defaults to ON, no need to set it.

As other pointed out, you can use absorbing media.
You can also use a background that is not totaly white.

Scaling a light is the same as multiplying it's location by the scale value.


Alain


Post a reply to this message

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