POV-Ray : Newsgroups : povray.binaries.images : Revisiting spotlight/media problems in v3.62 Server Time
1 Nov 2024 16:25:08 EDT (-0400)
  Revisiting spotlight/media problems in v3.62 (Message 1 to 5 of 5)  
From: Kenneth
Subject: Revisiting spotlight/media problems in v3.62
Date: 2 Dec 2012 16:20:01
Message: <web.50bbc3e96fdf8d9c2d977c20@news.povray.org>
Hello all. I've been away from the newsgroups for quite awhile, and am just now
getting back up to speed with using POV-Ray (v3.62.)

There's an odd (and old) problem with spotlights in media that makes it
difficult to use both at the same time (and this combination is *so* useful in a
scene.) The problem has actually been around since v3.6, IIRC. (Maybe even 3.1!)
I was recently rendering a long animation and the effect came back with a bang.

The problem: When using both scattering AND emission media together (whether as
an overall atmosphere or contained inside a large object), a spotlight creates a
very visible 'cone outline' that's difficult/impossible to eliminate--depending
on where the light is pointed in the scene. There are two overlapping outlines,
bright and dark. The really odd thing is, these outlines extend far into the
scene regardless of whether the spotlight is blocked by other objects or not;
it's as if the objects aren't there at all. The effect isn't really
*visible* until the spotlight starts pointing away from the camera (where the
camera is taking in more of the 'length' of the cone.) It's not a situation of
'nudging' the position of the camera or the light to get rid of it,
unfortunately. Nor is it because the camera is inside the media; as soon as a
media-filled object impinges on the light cone anywhere, the flaw becomes fully
visible.

There are more details to this, and I've finally figured out some causes of the
problem; but before commenting further, I'm wondering if it has already been
fixed in one of the 3.7 betas. (I haven't yet studied the many changes that have
accrued in 3.7.) Could someone run the simplified test code below, using the
latest 3.7RC, and see what happens? Thanks!

BTW, the few rgb colors here probably need changing to srgb (?)

[....code....]

global_settings{assumed_gamma 1.0}

#declare atmospheric_media = yes; // Otherwise, OBJECT media inside a giant
// sphere. In either case, camera is inside the media.
#declare media_samples = 150;
#declare spotlight_point_at = <-2,0,.3>; // Try z= -4 instead, then cone
// outlines are not *visible*

camera {
  perspective
  location <2, 4.5, -9.0>
  look_at <.5,.7,-4>
  right  x*image_width/image_height
  angle 82.8  // relatively wide-angle, to show problem
}

// spotlight--
light_source {
  0*x
  color rgb .45 // or srgb
  spotlight
  translate <-.5, 4, -3.5>
  point_at spotlight_point_at
  radius 10
  tightness 5
  falloff 17
}

// background object
plane{z,10
 hollow
 texture{pigment{rgb 1}finish{ambient .15 diffuse 0}}
 }


// ---floor---
plane{y,0
// or...
//box{0,1 translate -.5 scale 20*<1,.01,1>
 texture{
  pigment{checker}
  finish{ambient .1 diffuse 2}
  }
 // rotate -21*y // only for box
 }

// small box on floor
box{0,1 translate <-.5,0,-.5>
 scale 1.3*<3,.5,6>
 texture{
  pigment{gradient x sine_wave frequency 2}
  finish{ambient .1 diffuse 2}
  }
 translate 1.2*z
   }

//-------- media ---------
#declare my_media =
media{
scattering{1, 1.5*<1,.75,1> extinction .1} // With extinction at zero, all
// outlines disappear.
emission .04 // comment this out to eliminate BRIGHT outline
method 3
intervals 1
samples media_samples
}

#if(atmospheric_media)
media{my_media}
#else
// OBJECT media--a large sphere
sphere{0,100
hollow
 pigment {color rgbt 1} // or srgbt 1?
 interior{media{my_media}}
 }
#end


Post a reply to this message


Attachments:
Download 'spotlight_in_media.jpg' (83 KB)

Preview of image 'spotlight_in_media.jpg'
spotlight_in_media.jpg


 

From: Alain
Subject: Re: Revisiting spotlight/media problems in v3.62
Date: 2 Dec 2012 17:49:00
Message: <50bbdadc$1@news.povray.org>

> Hello all. I've been away from the newsgroups for quite awhile, and am just now
> getting back up to speed with using POV-Ray (v3.62.)
>
> There's an odd (and old) problem with spotlights in media that makes it
> difficult to use both at the same time (and this combination is *so* useful in a
> scene.) The problem has actually been around since v3.6, IIRC. (Maybe even 3.1!)
> I was recently rendering a long animation and the effect came back with a bang.
>
> The problem: When using both scattering AND emission media together (whether as
> an overall atmosphere or contained inside a large object), a spotlight creates a
> very visible 'cone outline' that's difficult/impossible to eliminate--depending
> on where the light is pointed in the scene. There are two overlapping outlines,
> bright and dark. The really odd thing is, these outlines extend far into the
> scene regardless of whether the spotlight is blocked by other objects or not;
> it's as if the objects aren't there at all. The effect isn't really
> *visible* until the spotlight starts pointing away from the camera (where the
> camera is taking in more of the 'length' of the cone.) It's not a situation of
> 'nudging' the position of the camera or the light to get rid of it,
> unfortunately. Nor is it because the camera is inside the media; as soon as a
> media-filled object impinges on the light cone anywhere, the flaw becomes fully
> visible.
>
> There are more details to this, and I've finally figured out some causes of the
> problem; but before commenting further, I'm wondering if it has already been
> fixed in one of the 3.7 betas. (I haven't yet studied the many changes that have
> accrued in 3.7.) Could someone run the simplified test code below, using the
> latest 3.7RC, and see what happens? Thanks!
>
> BTW, the few rgb colors here probably need changing to srgb (?)
>
> [....code....]
>
> global_settings{assumed_gamma 1.0}
>
> #declare atmospheric_media = yes; // Otherwise, OBJECT media inside a giant
> // sphere. In either case, camera is inside the media.
> #declare media_samples = 150;
> #declare spotlight_point_at = <-2,0,.3>; // Try z= -4 instead, then cone
> // outlines are not *visible*
>
> camera {
>    perspective
>    location <2, 4.5, -9.0>
>    look_at <.5,.7,-4>
>    right  x*image_width/image_height
>    angle 82.8  // relatively wide-angle, to show problem
> }
>
> // spotlight--
> light_source {
>    0*x
>    color rgb .45 // or srgb
>    spotlight
>    translate <-.5, 4, -3.5>
>    point_at spotlight_point_at
>    radius 10
>    tightness 5
>    falloff 17
> }
>
> // background object
> plane{z,10
>   hollow
>   texture{pigment{rgb 1}finish{ambient .15 diffuse 0}}
>   }
>
>
> // ---floor---
> plane{y,0
> // or...
> //box{0,1 translate -.5 scale 20*<1,.01,1>
>   texture{
>    pigment{checker}
>    finish{ambient .1 diffuse 2}
>    }
>   // rotate -21*y // only for box
>   }
>
> // small box on floor
> box{0,1 translate <-.5,0,-.5>
>   scale 1.3*<3,.5,6>
>   texture{
>    pigment{gradient x sine_wave frequency 2}
>    finish{ambient .1 diffuse 2}
>    }
>   translate 1.2*z
>     }
>
> //-------- media ---------
> #declare my_media =
> media{
> scattering{1, 1.5*<1,.75,1> extinction .1} // With extinction at zero, all
> // outlines disappear.
> emission .04 // comment this out to eliminate BRIGHT outline
> method 3
> intervals 1
> samples media_samples
> }
>
> #if(atmospheric_media)
> media{my_media}
> #else
> // OBJECT media--a large sphere
> sphere{0,100
> hollow
>   pigment {color rgbt 1} // or srgbt 1?
>   interior{media{my_media}}
>   }
> #end
>

As you use global_settings{assumed_gamma 1.0}, all your colours will 
treated the same in version 3.7.

Just rendered in 3.7RC6 and the problem seems to have been corrected.
Time to definitively abandon version 3.6.x and update to 3.7.


Alain


Post a reply to this message

From: Kenneth
Subject: Re: Revisiting spotlight/media problems in v3.62
Date: 2 Dec 2012 22:40:01
Message: <web.50bc1e9b704ea790c2d977c20@news.povray.org>
Alain <kua### [at] videotronca> wrote:

> Just rendered in 3.7RC6 and the problem seems to have been corrected.
> Time to definitively abandon version 3.6.x and update to 3.7.
>

Thanks!  Yes, I guess it's time to do so!


Post a reply to this message

From: Thomas de Groot
Subject: Re: Revisiting spotlight/media problems in v3.62
Date: 3 Dec 2012 02:47:06
Message: <50bc58fa$1@news.povray.org>
On 3-12-2012 4:38, Kenneth wrote:
> Thanks!  Yes, I guess it's time to do so!

Welcome back, by the way. We missed your images. :-)

Thomas


Post a reply to this message

From: Kenneth
Subject: Re: Revisiting spotlight/media problems in v3.62
Date: 3 Dec 2012 03:20:04
Message: <web.50bc5f6e704ea790c2d977c20@news.povray.org>
Thomas de Groot <tho### [at] degrootorg> wrote:
> On 3-12-2012 4:38, Kenneth wrote:
> > Thanks!  Yes, I guess it's time to do so!
>
> Welcome back, by the way. We missed your images. :-)
>
> Thomas

Thanks, Thomas! Good to *be* back. I'm still catching up on looking at the
newsgroup posts and renderings of the past...year!

I'm rendering an image right now, in fact. Will post it as soon as it's done.

Ken


Post a reply to this message

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