POV-Ray : Newsgroups : povray.advanced-users : Spotlight and media Server Time
24 Nov 2024 21:30:31 EST (-0500)
  Spotlight and media (Message 1 to 10 of 13)  
Goto Latest 10 Messages Next 3 Messages >>>
From: Carl
Subject: Spotlight and media
Date: 17 Nov 2004 21:15:01
Message: <web.419c04b17356f369a54c62600@news.povray.org>
I'm getting a result I didn't expect and don't understand.  I have a light
source inside some media and I get this effect.

http://www.wwwmwww.com/TRON/tanktest3.jpg

I change the light source to a spot light and I get this.

http://www.wwwmwww.com/TRON/tanktest2.jpg

Why is the interaction of the light and the media no longer uniform?  It
looks like an error similar to a coincident surface.  For that mater even
when a normal light source is used the media doesn't look that uniform.
Only at the other edge does it really look right to me.  Can some that
knows more about spot lights and or media tell me what I'm doing wrong?

Thanks,
Carl


Post a reply to this message

From: Mike Raiford
Subject: Re: Spotlight and media
Date: 18 Nov 2004 07:56:08
Message: <419c9be8@news.povray.org>
Carl wrote:

> I'm getting a result I didn't expect and don't understand.  I have a light
> source inside some media and I get this effect.
> 
> http://www.wwwmwww.com/TRON/tanktest3.jpg
> 
> I change the light source to a spot light and I get this.
> 
> http://www.wwwmwww.com/TRON/tanktest2.jpg
> 
> Why is the interaction of the light and the media no longer uniform?  It
> looks like an error similar to a coincident surface.  For that mater even
> when a normal light source is used the media doesn't look that uniform.
> Only at the other edge does it really look right to me.  Can some that
> knows more about spot lights and or media tell me what I'm doing wrong?
> 
> Thanks,
> Carl

A couple questions:

1) Are you sure the light source is not coincident with a surface? This 
can also cause problems.

2) Are you using radiosity?


-- 
~Mike


Post a reply to this message

From: Carl
Subject: Re: Spotlight and media
Date: 18 Nov 2004 09:30:01
Message: <web.419cb1143c6e7b27a54c62600@news.povray.org>
> A couple questions:
>
> 1) Are you sure the light source is not coincident with a surface? This
> can also cause problems.

Yes.  The cannon has 3 boxes cut out of it and the light sources are in the
center of those boxes.  For the spot light test I just turned on the center
light.

> 2) Are you using radiosity?

No.  I'm not up to using radiosity.  I've only played with it a few times
and it not being used here.

Carl


Post a reply to this message

From: Carl
Subject: Re: Spotlight and media
Date: 18 Nov 2004 12:25:00
Message: <web.419cda9e3c6e7b27a54c62600@news.povray.org>
I think I've found something according to:

    3.6.2.2  Sampling Parameters & Methods

For media types which interact with spotlights or cylinder lights, the
intervals which are not illuminated by these light types are weighted
differently than the illuminated intervals when distributing samples.

So it looks like media treats spotlights differently the normal lights.  I'm
now playing with some of the media settings talked about in this section to
see if they fix the problem.  So far I've been using the defaults for these
settings.

Carl


Post a reply to this message

From: Slime
Subject: Re: Spotlight and media
Date: 18 Nov 2004 13:09:39
Message: <419ce563$1@news.povray.org>
> So it looks like media treats spotlights differently the normal lights.

That's true, but the effects of that are different than what you're seeing
here. The graininess should not be appearing.

I would make sure that your media container object doesn't coincide with the
spotlight's cone of light, and also as Mike said, make sure your light
source isn't on the surface of an object.

 - Slime
 [ http://www.slimeland.com/ ]


Post a reply to this message

From: Reactor
Subject: Re: Spotlight and media
Date: 18 Nov 2004 14:59:05
Message: <419cff09$1@news.povray.org>
"Slime" <fak### [at] emailaddress> wrote in message
news:419ce563$1@news.povray.org...
> > So it looks like media treats spotlights differently the normal lights.
>
> That's true, but the effects of that are different than what you're seeing
> here. The graininess should not be appearing.
>
> I would make sure that your media container object doesn't coincide with
the
> spotlight's cone of light, and also as Mike said, make sure your light
> source isn't on the surface of an object.

It really does look like a coincident surface issue, but the coincident
surface need not be with the light source.  You mentioned that the light
source is inside of a CSG cut out, does the shape that forms the cutout
extend beyond the shape you are cutting?

Reactor


Post a reply to this message

From: Carl
Subject: Re: Spotlight and media
Date: 18 Nov 2004 15:05:01
Message: <web.419d00373c6e7b27a54c62600@news.povray.org>
> That's true, but the effects of that are different than what you're seeing
> here. The graininess should not be appearing.

Well that is good to know.  Now I just have to track down what I'm doing
wrong.

> I would make sure that your media container object doesn't coincide with the
> spotlight's cone of light, and also as Mike said, make sure your light
> source isn't on the surface of an object.

Well I just removed the object the spotlights were inside of and I still see
the graininess.

http://www.wwwmwww.com/TRON/tanktest4.jpg

This is 7 spot_lights.  3 sets of 2 pointing in opposite directions and one
by itself pointing forward.  The media container is a scaled sphere
centered on the light source.  Actually it's 4 spheres merged together that
look about like this at the moment:

sphere {<0,0,0>,1 scale <100,35,35> translate
<cannon_width/2,532-54*(Tx5-(Tx3-20))/232,cannon_height/2> hollow pigment
{color rgbf 1}
      interior {
        media {
          aa_level     5
          aa_threshold 0.05
          confidence   0.95
          intervals    1
          method       3
          ratio        0.9
          samples      10, 10
          variance     1/256
          scattering {
            1
            color rgb .5
            extinction 0.001
          }
          density {
            spherical
            color_map {
               [0 color rgb 0]
               [1 color rgb 1]
            }
            scale <100,35,35> translate
<cannon_width/2,532-54*(Tx5-(Tx3-20))/232,cannon_height/2>
          }
        }
      }
    }

I'll strip down my file and see if I can get some simple code to post that
shows the same effect.

Carl


Post a reply to this message

From: Carl
Subject: Re: Spotlight and media
Date: 18 Nov 2004 16:05:00
Message: <web.419d0e333c6e7b27a54c62600@news.povray.org>
Here is a bare bones file which shows the problem:

  #include "colors.inc"

  light_source {<10,10,10> color <252/255,96/255,12/255>
                spotlight point_at <10,20,10> radius 0 falloff 90 tightness
10}

  sphere {<0,0,0>,1 scale <3,10,3> translate <10,10,10> hollow pigment
{color rgbf 1}
      interior {
        media {
          aa_level     5
          aa_threshold 0.05
          confidence   0.95
          intervals    1
          method       3
          ratio        0.9
          samples      10, 10
          variance     1/256
          scattering {
            1
            color rgb .5
            extinction 0.001
          }
          density {
            spherical
            color_map {
               [0 color rgb 0]
               [1 color rgb 1]
            }
            scale <3,10,3> translate <10,10,10>
          }
        }
      }
    }

    camera {location <0,0,100> look_at <10,15,10> angle 10}

It produces this image:
http://www.wwwmwww.com/TRON/error.jpg

I'm using POV-Ray 3.6, no AA, and +FN.  If you use:
light_source {<10,10,10> color <252/255,96/255,12/255>}
instead of the above spotlight things look much better.

Carl


Post a reply to this message

From: Mike Raiford
Subject: Re: Spotlight and media
Date: 18 Nov 2004 16:36:08
Message: <419d15c8$1@news.povray.org>
Carl wrote:

> spotlight point_at <10,20,10> radius 0 falloff 90 tightness



-- 
~Mike


Post a reply to this message

From: Slime
Subject: Re: Spotlight and media
Date: 18 Nov 2004 16:41:07
Message: <419d16f3@news.povray.org>
> falloff 90

That's what's doing it. Use falloff 89.999 and it works right. There's
probably some angle-related calculation going on internally which doesn't
have good results with 90 degree angles.

By the way,

>           confidence   0.95
>           variance     1/256

You can remove those lines. Confidence and variance are only used for
sampling method 1.

 - Slime
 [ http://www.slimeland.com/ ]


Post a reply to this message

Goto Latest 10 Messages Next 3 Messages >>>

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