POV-Ray : Newsgroups : povray.general : Scattering media with a white background (w/ images) Server Time
1 Nov 2024 07:29:09 EDT (-0400)
  Scattering media with a white background (w/ images) (Message 1 to 10 of 15)  
Goto Latest 10 Messages Next 5 Messages >>>
From: Brad
Subject: Scattering media with a white background (w/ images)
Date: 10 Mar 2013 13:15:01
Message: <web.513cbed9ebda39e9c1b4166f0@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


Post a reply to this message

From: Le Forgeron
Subject: Re: Scattering media with a white background (w/ images)
Date: 10 Mar 2013 13:47:34
Message: <513cc736@news.povray.org>
Le 10/03/2013 18:11, Brad nous fit lire :
> What am I missing? Thanks for any pointers you can give.

scattering somehow "creates" light in your view from other interaction
from other light sources.

If you have an empty bag and put in it 2 g of grass... you have a bag
with 2 g of grass.
If you have a bag full of grass and put in it... you cannot see the
difference (unless you would be exporting to openexr, and it won't be
visible on your screen anyway).

To have the same kind of effect, with a white background, you might want
to had some absorption of the complementary of the scattering color.


Post a reply to this message

From: Brad
Subject: Re: Scattering media with a white background (w/ images)
Date: 10 Mar 2013 13:50:01
Message: <web.513cc6b9e2590dc5c1b4166f0@news.povray.org>
> 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've been playing with this some and I think at least part of my problem is the
0.07 value in the scattering specification, which dictates the colors that are
absorbed by the media (I had previously thought this was related to properties
like extinction -- I think I got 0.07 from an example somewhere online). Anyway,
making this value red gives me the following image:
http://tinypic.com/r/1jb76a/6

This is also not what I want, as you can see that now I have effectively a blue
background due to this choice (and in any case, the light looks white, despite
my wanting it to be red). What aspect of POVRAY and/or elementary school
color-mixing am I missing to make the image as I want it?


Post a reply to this message

From: clipka
Subject: Re: Scattering media with a white background (w/ images)
Date: 10 Mar 2013 13:52:56
Message: <513cc878$1@news.povray.org>
Am 10.03.2013 18:11, schrieb Brad:
> 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:

Well, what would you expect to happen with a white background? That the 
streaks of light caused by the scattering media will be even brighter 
than white?


Post a reply to this message

From: Brad
Subject: Re: Scattering media with a white background (w/ images)
Date: 10 Mar 2013 14:05:01
Message: <web.513ccb20e2590dc5c1b4166f0@news.povray.org>
> Well, what would you expect to happen with a white background? That the
> streaks of light caused by the scattering media will be even brighter
> than white?

This comment was made in the other thread (from 2002) as well I think, but I
don't quite understand it. If you look at this example from the POVRAY
documentation: http://www.povray.org/documentation/view/3.6.2/99/, there is this
tornado effect which is visible in front of a white background. Could this
tornado not have been made red? If so, that seems similar to what I want to do.


Post a reply to this message

From: Brad
Subject: Re: Scattering media with a white background (w/ images)
Date: 10 Mar 2013 14:10:01
Message: <web.513ccbc4e2590dc5c1b4166f0@news.povray.org>
>
> This comment was made in the other thread (from 2002) as well I think, but I
> don't quite understand it. If you look at this example from the POVRAY
> documentation: http://www.povray.org/documentation/view/3.6.2/99/, there is this
> tornado effect which is visible in front of a white background. Could this
> tornado not have been made red? If so, that seems similar to what I want to do.

Okay, 'smoke' not tornado. Maybe this is fundamentally different, but is what
gave me the idea that absorptive media could be used effectively in front of a
white background.


Post a reply to this message

From: Warp
Subject: Re: Scattering media with a white background (w/ images)
Date: 10 Mar 2013 14:42:42
Message: <513cd422@news.povray.org>
Brad <bra### [at] gmailcom> wrote:
> Okay, 'smoke' not tornado. Maybe this is fundamentally different, but is what
> gave me the idea that absorptive media could be used effectively in front of a
> white background.

Note that absorbing media does not take light into accoung in any way.
(The media will cast shadows, but the media itself will not be affected
by light.)

OTOH, if all you want is a cone of visible media, you can do that with
absorbing media.

-- 
                                                          - Warp


Post a reply to this message

From: Stephen
Subject: Re: Scattering media with a white background (w/ images)
Date: 10 Mar 2013 15:30:30
Message: <513cdf56$1@news.povray.org>
On 10/03/2013 5:47 PM, Le_Forgeron wrote:
> If you have an empty bag and put in it 2 g of grass... you have a bag
> with 2 g of grass.

So all you need now is some cigarette papers and some roach material.

Brad, if your background is white and you put a white object (or a white 
spotlight) in front of it. You will not see a difference in colour. 
White + white = white as (unless you are using an output that accepts 
values greater than 1) the output will be clipped to <1,1,1>.

Try using a background that is a very light grey.

-- 
Regards
     Stephen


Post a reply to this message

From: clipka
Subject: Re: Scattering media with a white background (w/ images)
Date: 10 Mar 2013 15:33:48
Message: <513ce01c$1@news.povray.org>
Am 10.03.2013 19:07, schrieb Brad:
>
>>
>> This comment was made in the other thread (from 2002) as well I think, but I
>> don't quite understand it. If you look at this example from the POVRAY
>> documentation: http://www.povray.org/documentation/view/3.6.2/99/, there is this
>> tornado effect which is visible in front of a white background. Could this
>> tornado not have been made red? If so, that seems similar to what I want to do.
>
> Okay, 'smoke' not tornado. Maybe this is fundamentally different, but is what
> gave me the idea that absorptive media could be used effectively in front of a
> white background.

Absorbing media - yes. Scattering media - no.


Post a reply to this message

From: Brad
Subject: Re: Scattering media with a white background (w/ images)
Date: 10 Mar 2013 16:50:01
Message: <web.513cf1e3e2590dc5c1b4166f0@news.povray.org>
>
> Absorbing media - yes. Scattering media - no.

Thanks for the help everyone. I appreciate all the comments.


Post a reply to this message

Goto Latest 10 Messages Next 5 Messages >>>

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