POV-Ray : Newsgroups : povray.general : Yo Colefax ! Server Time
17 Oct 2026 01:54:05 EDT (-0400)
  Yo Colefax ! (Message 1 to 18 of 18)  
From: Ken
Subject: Yo Colefax !
Date: 3 Dec 1999 00:52:09
Message: <384759F9.F3AE2793@pacbell.net>
How come your lens effects are attenuating my background scattering
media into oblivion ?





I have two very small objects say x*.2 y*.05 in the xy plane which are
opposing each other translated -x +x a wee bit. In between them is a
light source and lens effect centered at the origin. Behind this is a
spot light about 50 units in the +z direction pointing back towards
the camera's location. Because of the scale of the objects the camera
is necessarily close i.e. z*-.2. I'm presuming that it is your effects
and the scale of my scene that is causing my beautiful scattering media
to look like randomly placed white spots.

Solution or live with it ?

-- 
Ken Tyler -  1200+ Povray, Graphics, 3D Rendering, and Raytracing Links:
http://home.pacbell.net/tylereng/index.html http://www.povray.org/links/


Post a reply to this message

From: Nieminen Juha
Subject: Re: Yo Colefax !
Date: 3 Dec 1999 08:21:03
Message: <3847c3bf@news.povray.org>
Ken <tyl### [at] pacbellnet> wrote:
:  How come your lens effects are attenuating my background scattering
: media into oblivion ?

  Hard to say anything without seeing the code. Perhaps it has something to
do with max_trace_level? (Even an advanced user can fall in that sometimes...
I do :) ).

-- 
main(i,_){for(_?--i,main(i+2,"FhhQHFIJD|FQTITFN]zRFHhhTBFHhhTBFysdB"[i]
):5;i&&_>1;printf("%s",_-70?_&1?"[]":" ":(_=0,"\n")),_/=2);} /*- Warp -*/


Post a reply to this message

From: Ron Parker
Subject: Re: Yo Colefax !
Date: 3 Dec 1999 08:27:41
Message: <3847c54d@news.povray.org>
On Thu, 02 Dec 1999 21:49:45 -0800, Ken wrote:

>Solution or live with it ?

First, make sure the discs the lens effects plugin puts in front of
the camera are specified as hollow.  That does make a difference,
even for patch objects.  Unfortunately, it means you'll have to edit
Chris's masterwork if they're not.

Second, you might need to add some transparent bounds to force the
interval that passes through your scattering media to be shorter, 
or you may need to increase the number of intervals (as a last 
resort.)  I usually see this effect when the interval passing
through the media is much larger than the media effect itself.  It 
is especially prominent when you specify atmospheric media.

If your media is forward-scattering only, you can get good effects
by adding a plane parallel to the camera plane just beyond the light
source.  If it's backward-scattering only, add such a plane just 
before the light source and another one several units beyond the 
light source (depending on scale.)  If it's both, add a plane at
the light source and another one beyond.  The idea is to force an
interval to evaluate over the part of the media that has the most
contribution to the scene.

-- 
These are my opinions.  I do NOT speak for the POV-Team.
The superpatch: http://www2.fwi.com/~parkerr/superpatch/
My other stuff: http://www2.fwi.com/~parkerr/traces.html


Post a reply to this message

From: Margus Ramst
Subject: Re: Yo Colefax !
Date: 3 Dec 1999 12:22:44
Message: <3847FCF7.7EC76655@peak.edu.ee>
Are you sure the lens effects are to blame? I sometimes get the white spots when
the light source is in line with the camera vector (i.e. the camera is looking
straight into the light)
You could try bounding the media and increasing intervals/samples. And if all
else fails and the LF objects cause the problem, you could use <shudder> post
processing. Let's be honest, it's a fake lens flare either way.

Margus

Ken wrote:
> 
>  How come your lens effects are attenuating my background scattering
> media into oblivion ?
> 
> I have two very small objects say x*.2 y*.05 in the xy plane which are
> opposing each other translated -x +x a wee bit. In between them is a
> light source and lens effect centered at the origin. Behind this is a
> spot light about 50 units in the +z direction pointing back towards
> the camera's location. Because of the scale of the objects the camera
> is necessarily close i.e. z*-.2. I'm presuming that it is your effects
> and the scale of my scene that is causing my beautiful scattering media
> to look like randomly placed white spots.
> 
> Solution or live with it ?
> 
> --
> Ken Tyler -  1200+ Povray, Graphics, 3D Rendering, and Raytracing Links:
> http://home.pacbell.net/tylereng/index.html http://www.povray.org/links/


Post a reply to this message

From: Ken
Subject: Re: Yo Colefax !
Date: 3 Dec 1999 17:03:31
Message: <38483D84.5C24BF56@pacbell.net>
Margus Ramst wrote:
> 
> Are you sure the lens effects are to blame? I sometimes get the white spots when
> the light source is in line with the camera vector (i.e. the camera is looking
> straight into the light)

The media works perfectly with the absence of the lens effects.

> You could try bounding the media and increasing intervals/samples. And if all
> else fails and the LF objects cause the problem, you could use <shudder> post
> processing. Let's be honest, it's a fake lens flare either way.

I will NOT cheat. Besides I don't have a lens effects plug in handy.

-- 
Ken Tyler


Post a reply to this message

From: Ken
Subject: Re: Yo Colefax !
Date: 3 Dec 1999 17:04:29
Message: <38483DBD.4D589A9A@pacbell.net>
Nieminen Juha wrote:
> 
> Ken <tyl### [at] pacbellnet> wrote:
> :  How come your lens effects are attenuating my background scattering
> : media into oblivion ?
> 
>   Hard to say anything without seeing the code. Perhaps it has something to
> do with max_trace_level? (Even an advanced user can fall in that sometimes...
> I do :) ).

It had no effect except to raise the render time.

-- 
Ken Tyler


Post a reply to this message

From: Ken
Subject: Re: Yo Colefax !
Date: 3 Dec 1999 17:06:32
Message: <38483E3A.A7102769@pacbell.net>
Ron Parker wrote:
> 
> On Thu, 02 Dec 1999 21:49:45 -0800, Ken wrote:
> 
> >Solution or live with it ?
> 
> First,
> 
> Second,

I will ponder your words of wisdom.

-- 
Ken Tyler


Post a reply to this message

From: Chris Colefax
Subject: Re: Yo Colefax !
Date: 4 Dec 1999 09:55:00
Message: <38492b44@news.povray.org>
Ken <tyl### [at] pacbellnet> (yes, that Ken!) wrote in a rather
confrontational tone:
>  How come your lens effects are attenuating my background scattering
> media into oblivion ?
>
> I have two very small objects say x*.2 y*.05 in the xy plane which are
> opposing each other translated -x +x a wee bit. In between them is a
> light source and lens effect centered at the origin. Behind this is a
> spot light about 50 units in the +z direction pointing back towards
> the camera's location. Because of the scale of the objects the camera
> is necessarily close i.e. z*-.2. I'm presuming that it is your effects
> and the scale of my scene that is causing my beautiful scattering
media
> to look like randomly placed white spots.
>
> Solution or live with it ?

To be honest I don't have that much experience with scattering media.
Still, I would guess that the problem is not so much with the scale of
the scene as the scale of the lens effects, which appear to be altering
the way the media intervals are evaluated (to make the effects overlay
the rest of the scene the objects involved are scaled down to be 1e-2
units from the camera).

My first suggestion would be to set the effect_always_on_top option to
false: this will create the lens effect as part of the scene, with the
objects actually centred at the effect location.  If this seems to help,
but you want the effects overlaying the other objects you can either
leave the always on top option at false and change the effect location,
or set the always on top option to true and adjust the lens_scale option
(start at, say, 10 and work your way up...).


Post a reply to this message

From: Chris Colefax
Subject: Re: Yo Colefax !
Date: 4 Dec 1999 09:55:02
Message: <38492b46@news.povray.org>
Ron Parker <ron### [at] povrayorg> wrote:
> First, make sure the discs the lens effects plugin puts in front of
> the camera are specified as hollow.  That does make a difference,
> even for patch objects.  Unfortunately, it means you'll have to edit
> Chris's masterwork if they're not.

All lens effects are indeed set to be hollow and not to cast shadows,
precisely so the lens effects can be used with POV-Ray's various
atmospheric features.

> Second, you might need to add some transparent bounds to force the
> interval that passes through your scattering media to be shorter,
> or you may need to increase the number of intervals (as a last
> resort.)  I usually see this effect when the interval passing
> through the media is much larger than the media effect itself.  It
> is especially prominent when you specify atmospheric media.
>
> If your media is forward-scattering only, you can get good effects
> by adding a plane parallel to the camera plane just beyond the light
> source.  If it's backward-scattering only, add such a plane just
> before the light source and another one several units beyond the
> light source (depending on scale.)  If it's both, add a plane at
> the light source and another one beyond.  The idea is to force an
> interval to evaluate over the part of the media that has the most
> contribution to the scene.

As I replied to Ken, I suspect it may have something to do with the
distances involved in the creation of the lens effects...bounding the
media may well be part of the solution.


Post a reply to this message

From: Chris Colefax
Subject: Re: Yo Colefax !
Date: 4 Dec 1999 09:55:05
Message: <38492b49@news.povray.org>
Ken <tyl### [at] pacbellnet> demanded to know:
> How come your lens effects are attenuating my background scattering
> media into oblivion ?

To which Nieminen Juha <war### [at] punarastascstutfi> complacently replied:
>   Hard to say anything without seeing the code. Perhaps it has
something to
> do with max_trace_level? (Even an advanced user can fall in that
sometimes...
> I do :) ).

If you are using the pre-defined lens effects (Lens.inc) then this
should happen automatically - by default the file increases the level to
20.  With many layered effects or other transparent objects in the scene
this may not be enough, so the trick is to increase the level *after*
you include Lens.inc (otherwise the include file will set it back to
20).


Post a reply to this message

From: Ken
Subject: Re: Yo Colefax I Solved The Problem !
Date: 4 Dec 1999 18:55:30
Message: <3849A8D7.8FC2DEF1@pacbell.net>
Ken wrote:
 
>  How come your lens effects are attenuating my background scattering
> media into oblivion ?

  The reason my media was not performing correctly had nothing to do with
the lens effects themselves. It turns out that I made a silly little mistake
when specifying light sources for the lens effects. You see if you don't
specify "media_interaction off" for the lens effects point light sources it
really messes with the scattering media in the scene. Once I changed that
everything started working as intended.

  It should also be noted that removing hollow from the lens effects disks does
really bad things and should be avoided.

  Just goes to show even advaced users can make mistakes and there is always
something new to learn with this splended program called POV-Ray.

-- 
Ken Tyler -  1200+ Povray, Graphics, 3D Rendering, and Raytracing Links:
http://home.pacbell.net/tylereng/index.html http://www.povray.org/links/


Post a reply to this message

From: Rodolphe
Subject: Re: Yo Colefax I Solved The Problem !
Date: 4 Dec 1999 19:18:59
Message: <3849af73@news.povray.org>
you are the best, oncle Ken
Rodolphe
galerie: http://perso.infonie.fr/rod.gelaude
          annuaire "Povray Sites"
     http://www.multimania.com/povsite
  le forum en français de pov
news://news.newz.net/nzn.fr.3d.pov

Ken a écrit dans le message <3849A8D7.8FC2DEF1@pacbell.net>...
>
>
>Ken wrote:
>
>>  How come your lens effects are attenuating my background scattering
>> media into oblivion ?
>
>  The reason my media was not performing correctly had nothing to do with
>the lens effects themselves. It turns out that I made a silly little
mistake
>when specifying light sources for the lens effects. You see if you don't
>specify "media_interaction off" for the lens effects point light sources it
>really messes with the scattering media in the scene. Once I changed that
>everything started working as intended.
>
>  It should also be noted that removing hollow from the lens effects disks
does
>really bad things and should be avoided.
>
>  Just goes to show even advaced users can make mistakes and there is
always
>something new to learn with this splended program called POV-Ray.
>
>--
>Ken Tyler -  1200+ Povray, Graphics, 3D Rendering, and Raytracing Links:
>http://home.pacbell.net/tylereng/index.html http://www.povray.org/links/


Post a reply to this message

From: Margus Ramst
Subject: Re: Yo Colefax I Solved The Problem !
Date: 5 Dec 1999 14:42:10
Message: <384AC0A5.1CCA9225@peak.edu.ee>
Ken wrote:
> 
>   The reason my media was not performing correctly had nothing to do with
> the lens effects themselves. It turns out that I made a silly little mistake
> when specifying light sources for the lens effects. You see if you don't
> specify "media_interaction off" for the lens effects point light sources it
> really messes with the scattering media in the scene. Once I changed that
> everything started working as intended.
> 

Glad to hear you solved the problem. But I'm not sure I understand. You have two
light sources, in line with the camera, and the spot light in the background was
causing the media to display as white spots, right?
But why is it 'a silly mistake' to expect this spot light to work correctly with
scattering media? Why should the media display as white spots?

Margus


Post a reply to this message

From: Ken
Subject: Re: Yo Colefax I Solved The Problem !
Date: 5 Dec 1999 17:12:49
Message: <384AE1AE.20480782@pacbell.net>
Margus Ramst wrote:

> 
> Glad to hear you solved the problem. But I'm not sure I understand. You have two
> light sources, in line with the camera, and the spot light in the background was
> causing the media to display as white spots, right?
> But why is it 'a silly mistake' to expect this spot light to work correctly with
> scattering media? Why should the media display as white spots?
> 
> Margus

  Your guess is as good as mine. Media is a tricky beast and I will be the
first to admit that I am not a master with it.

  This should be enough for you to recreate it for yourself. For the two
point light sources turn media interation = on and you should see the
problem immediately.

camera{location<0,0,-.20>look_at<0,0,0>}

 light_source{< 0,.004,2>rgb<1,1,1>  media_interaction off}

 light_source{< 0,50,2>rgb<1,1,1>*.5 media_interaction off}

 light_source{<0,0,10>color rgb<.7,.3,.8> spotlight point_at<0,0,0>
 radius 1 falloff 10 tightness 1 media_interaction on}

media {
scattering {4, .1 extinction .25}
samples 5, 15
intervals 7
ratio .99
confidence .999
variance 1/100
}  

-- 
Ken Tyler -  1200+ Povray, Graphics, 3D Rendering, and Raytracing Links:
http://home.pacbell.net/tylereng/index.html http://www.povray.org/links/


Post a reply to this message

From: Ron Parker
Subject: Re: Yo Colefax I Solved The Problem !
Date: 6 Dec 1999 12:29:57
Message: <slrn84nskc.v8.ron.parker@ron.gwmicro.com>
On Sun, 05 Dec 1999 14:05:34 -0800, Ken wrote:
>
>
>Margus Ramst wrote:
>
>> 
>> Glad to hear you solved the problem. But I'm not sure I understand. You have two
>> light sources, in line with the camera, and the spot light in the background was
>> causing the media to display as white spots, right?
>> But why is it 'a silly mistake' to expect this spot light to work correctly with
>> scattering media? Why should the media display as white spots?
>> 
>> Margus
>
>  Your guess is as good as mine. Media is a tricky beast and I will be the
>first to admit that I am not a master with it.
>
>  This should be enough for you to recreate it for yourself. For the two
>point light sources turn media interation = on and you should see the
>problem immediately.

The spotlight isn't necessary to get this effect.  The problem, as I had 
suspected, is that the sampling interval for the point lights is essentially
infinite, so the chance of getting a sample that scatters the light from the
point sources is vanishingly small.  If you add a backstop like

 plane {-z,-500 pigment {rgbt 1}}                     

to the scene, it renders as expected (though it's all white.)  Notice the 
lack of the hollow keyword.  Since I didn't expect significant contributions
from the media beyond 500 units, I elected to remove it from consideration and
speed up the render a tad.  (indeed, if you add hollow it's still all white,
as expected.)

-- 
These are my opinions.  I do NOT speak for the POV-Team.
The superpatch: http://www2.fwi.com/~parkerr/superpatch/
My other stuff: http://www2.fwi.com/~parkerr/traces.html


Post a reply to this message

From: Margus Ramst
Subject: Re: Yo Colefax I Solved The Problem !
Date: 6 Dec 1999 13:08:20
Message: <384BFC1E.E7A7175F@peak.edu.ee>
Ron Parker wrote:
> 
> The spotlight isn't necessary to get this effect.  The problem, as I had
> suspected, is that the sampling interval for the point lights is essentially
> infinite, so the chance of getting a sample that scatters the light from the
> point sources is vanishingly small.

Ah! Now I see the light :)

Margus


Post a reply to this message

From: Ken
Subject: Re: Yo Colefax I Solved The Problem !
Date: 6 Dec 1999 13:11:44
Message: <384BF9E7.4EA25295@pacbell.net>
Ron Parker wrote:

> The spotlight isn't necessary to get this effect.  The problem, as I had
> suspected, is that the sampling interval for the point lights is essentially
> infinite, so the chance of getting a sample that scatters the light from the
> point sources is vanishingly small.  If you add a backstop like
> 
>  plane {-z,-500 pigment {rgbt 1}}
> 
> to the scene, it renders as expected (though it's all white.)  Notice the
> lack of the hollow keyword.  Since I didn't expect significant contributions
> from the media beyond 500 units, I elected to remove it from consideration and
> speed up the render a tad.  (indeed, if you add hollow it's still all white,
> as expected.)

The question that arises then is if this is desirable behavior. I expect
a point light to interact with media in a similar way as a spot light with
the exception that it is a uniform distribution of interaction rather than
a focused interaction like you recieve with a spotlight. To some degree
I understand why adding the plane works but wouldn't it be considered
a hack rather than desirable behavior ?

-- 
Ken Tyler -  1200+ Povray, Graphics, 3D Rendering, and Raytracing Links:
http://home.pacbell.net/tylereng/index.html http://www.povray.org/links/


Post a reply to this message

From: Ron Parker
Subject: Re: Yo Colefax I Solved The Problem !
Date: 6 Dec 1999 13:55:15
Message: <slrn84o1k2.v8.ron.parker@ron.gwmicro.com>
On Mon, 06 Dec 1999 10:01:11 -0800, Ken wrote:

>The question that arises then is if this is desirable behavior. I expect
>a point light to interact with media in a similar way as a spot light with
>the exception that it is a uniform distribution of interaction rather than
>a focused interaction like you recieve with a spotlight. To some degree
>I understand why adding the plane works but wouldn't it be considered
>a hack rather than desirable behavior ?

Yes, it is a hack.  Offhand, I can't think of a way to do the right thing
with respect to effectively infinite intervals, but I'll sleep on it.  
Suggestions are welcome, of course.  One idea I'm bouncing around is 
the notion that rays leaving the bounding sphere of the scene should be
split into intervals at the point where they leave the sphere, but I'm 
not sure what implications that would have.

-- 
These are my opinions.  I do NOT speak for the POV-Team.
The superpatch: http://www2.fwi.com/~parkerr/superpatch/
My other stuff: http://www2.fwi.com/~parkerr/traces.html


Post a reply to this message

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