POV-Ray : Newsgroups : povray.general : photons & reflection Server Time
5 Aug 2024 02:15:16 EDT (-0400)
  photons & reflection (Message 6 to 15 of 15)  
<<< Previous 5 Messages Goto Initial 10 Messages
From: Warp
Subject: Re: photons & reflection
Date: 23 Jan 2003 03:17:56
Message: <3e2fa533@news.povray.org>
stelzenegger <ste### [at] gmxde> wrote:
> Yes I'm using photons and for the first part of the way everything seems
> right. I also have included the "photon"-block in the object. Do I have to
> take special care about the surface finish/pigment or whatever to get
> enough reflected photons to make them visible or does this not matter?

  You have tell that photons should be taken into account in media (they
are not by default). IIRC this is done in the photons block inside
global_settings. See the documentation for details.

-- 
plane{-x+y,-1pigment{bozo color_map{[0rgb x][1rgb x+y]}turbulence 1}}
sphere{0,2pigment{rgbt 1}interior{media{emission 1density{spherical
density_map{[0rgb 0][.5rgb<1,.5>][1rgb 1]}turbulence.9}}}scale
<1,1,3>hollow}text{ttf"timrom""Warp".1,0translate<-1,-.1,2>}//  - Warp -


Post a reply to this message

From: stelzenegger
Subject: Re: photons & reflection
Date: 23 Jan 2003 03:30:09
Message: <web.3e2fa78caa5a7cdc2278e9910@news.povray.org>
>
>  You have tell that photons should be taken into account in media (they
>are not by default). IIRC this is done in the photons block inside
>global_settings. See the documentation for details.

Yes, I've don this. otherwise I couldn't see the first part of the ray. Only
after the ray hits the reflecting surface, I can't see it anymore.

stelzenegger


Post a reply to this message

From: hughes, b 
Subject: Re: photons & reflection
Date: 23 Jan 2003 04:07:30
Message: <3e2fb0d2@news.povray.org>
Dang, I had to cancel that first reply  :-X

"stelzenegger" <ste### [at] gmxde> wrote in message
news:web.3e2fa78caa5a7cdc2278e9910@news.povray.org...
>
> after the ray hits the reflecting surface, I can't see it anymore.

What might be happening, if you have indeed set up everything else as
needed, is that the photon count or spacing is insufficient. Try raising the
count or decreasing the spacing in global_settings {photons {}}. For
example, spacing 0.02 or less is usually okay but you might need it to be
lower (also try higher if it works, speed issue). I don't use count much so
I'd be guessing that number. Only one of
those are needed.


Post a reply to this message

From: Tom Melly
Subject: Re: photons & reflection
Date: 23 Jan 2003 04:37:43
Message: <3e2fb7e7$1@news.povray.org>
"stelzenegger" <ste### [at] gmxde> wrote in message
news:web.3e2fa78caa5a7cdc2278e9910@news.povray.org...
>
> >
> >  You have tell that photons should be taken into account in media (they
> >are not by default). IIRC this is done in the photons block inside
> >global_settings. See the documentation for details.
>
> Yes, I've don this. otherwise I couldn't see the first part of the ray. Only
> after the ray hits the reflecting surface, I can't see it anymore.
>
> stelzenegger


Can you post a *minimal* scene that demonstrates your problem? (you can either
include the scene code in a post, or, if attaching a scene, post to
binaries.scene-files)


Post a reply to this message

From: stelzenegger
Subject: Re: photons & reflection
Date: 23 Jan 2003 06:05:02
Message: <web.3e2fcba7aa5a7cdc25152d880@news.povray.org>
OK, here's the code

#include "colors.inc"
#include "metals.inc"

global_settings {
   assumed_gamma 1
   photons {
      //  spacing 0.02
      count 150000
      media 100, 2
      }
   }

media {
    scattering {1, color White extinction 0}
    method 3
    intervals 1 samples 4
    }

light_source {
   <22.36,25,10>
   color 2*Red
   spotlight
   radius 0.1
   falloff 1.5
   tightness 5
   point_at <38,7,10>
   photons {
     reflection on
     refraction off
     }
   }

camera {
   location <20,25,-10>
   look_at <45,0,15>
   }


plane { y,0
   pigment {color CornflowerBlue}
   photons {
     reflection off
     refraction off
     }
   }

#declare cantilever=
   box {
      <0,0.25,3>,
      <25,0.26,-3>
      texture { T_Gold_5E }
      photons{
         target
         reflection on
         refraction on
         //collect off
         }
      }


object {cantilever
   finish {reflection }
   rotate <0,0,-10>
   translate <22.36,7.759-0.5,10>
   }

box {
   <-0.5,-7.5,-7.5>
   <0.5,7.5,7.5>
   pigment {color Gray90}
   rotate <0,0,25>
   translate <58,15,10>
   photons{
      target
      reflection on
      refraction off
      collect on
      }
   }

I tried count up to 15M and spacing down to 0.0002 (wow that takes time)
with no effect.

stelzenegger


Post a reply to this message

From: Tom Melly
Subject: Re: photons & reflection
Date: 23 Jan 2003 08:55:09
Message: <3e2ff43d@news.povray.org>
"stelzenegger" <ste### [at] gmxde> wrote in message
news:web.3e2fcba7aa5a7cdc25152d880@news.povray.org...

<snip>

Well, I'm not getting perfect results, but the problem seems to be that you need
to specify target for the media - however, you can't specify target for global
media, so you will need to place your media in a container. e.g.:

box{
  0,10
  pigment{rgbf 1}
  hollow
  interior{media{scattering{1,0.2} method 3}}
  photons{target}
}

... you might want someone who actually knows what they are doing to comment.


Post a reply to this message

From: stelzenegger
Subject: Re: photons & reflection
Date: 23 Jan 2003 10:10:10
Message: <web.3e3004d5aa5a7cdc2278e9910@news.povray.org>
I thought media was developed to do without those containers. Actually it's
quite hard to get them right especially in animations.

stelzenegger


Post a reply to this message

From: Johannes Dahlstrom
Subject: Re: photons & reflection
Date: 23 Jan 2003 10:15:43
Message: <3e30071e@news.povray.org>
Tom Melly wrote:

> Well, I'm not getting perfect results, but the problem seems to be that
> you need to specify target for the media - however, you can't specify
> target for global media, so you will need to place your media in a
> container. e.g.:
> <snip>

If media photons are turned on in global media settings, they're also 
turned on by default in all object medias in the scene.  The reason that 
photons work only with contained medias is probably that in an infinite 
media, a potentially infinite number of photons would have to be calculated 
and stored. The docs don't seem to mention this anywhere, though.


Post a reply to this message

From: Tom Melly
Subject: Re: photons & reflection
Date: 23 Jan 2003 12:08:04
Message: <3e302174@news.povray.org>
"Johannes Dahlstrom" <sad### [at] tkukoulufi> wrote in message
news:3e30071e@news.povray.org...
>
> If media photons are turned on in global media settings, they're also
> turned on by default in all object medias in the scene.  The reason that
> photons work only with contained medias is probably that in an infinite
> media, a potentially infinite number of photons would have to be calculated
> and stored. The docs don't seem to mention this anywhere, though.


Makes sense - so stelz., the critical thing is to put the media in a container
(you don't need to make the container a target - that was a red-herring*)

* I wrapped the media in a container *so* that I could add target, and assumed,
when the beam showed up, that the target attrib. was wot did it, rather than the
fact of the container.


Post a reply to this message

From: Slime
Subject: Re: photons & reflection
Date: 23 Jan 2003 18:13:00
Message: <3e3076fc$1@news.povray.org>
> Makes sense - so stelz., the critical thing is to put the media in a
container
> (you don't need to make the container a target - that was a red-herring*)


FYI, the reason that the spotlight works but the photons don't is that
spotlights change the way media is sampled, by forcing the media to take
some samples in the spotlight.

In general, infinite media is a bad idea, in my experience. It never really
works like you expect it to.

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


Post a reply to this message

<<< Previous 5 Messages Goto Initial 10 Messages

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