POV-Ray : Newsgroups : povray.unofficial.patches : Photon bug? Server Time
2 Nov 2024 05:20:19 EDT (-0400)
  Photon bug? (Message 1 to 10 of 14)  
Goto Latest 10 Messages Next 4 Messages >>>
From: Nieminen Juha
Subject: Photon bug?
Date: 16 Mar 2000 03:36:47
Message: <38d09d1f@news.povray.org>
If any of the light sources in the scene has
photons { reflection off refraction off }
no photons are shot, no matter how many other light sources are there in
the scene.

  And a question:
  I'm trying to get a visible reflected light beam. I thought that making
the photons to interact with the scattering media would do it. However it
doesn't work. The light beam starting from the spotlight is visible, but
none of the reflected beams is. Is it supposed to? Perhaps I'm doing something
wrong?

-- 
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: Mark Wagner
Subject: Re: Photon bug?
Date: 17 Mar 2000 00:52:00
Message: <38d1c800@news.povray.org>
Nieminen Juha wrote in message <38d09d1f@news.povray.org>...
>  And a question:
>  I'm trying to get a visible reflected light beam. I thought that making
>the photons to interact with the scattering media would do it. However it
>doesn't work. The light beam starting from the spotlight is visible, but
>none of the reflected beams is. Is it supposed to? Perhaps I'm doing
something
>wrong?


Here is the code I used for the visible laser beam in my "Now Possible..."
animation in p.b.a.  It was written for the UVPov 5.4 photons, so you will
need to change things for using it with MegaPOV.

Mark

#declare phd = 1;
global_settings{
    max_trace_level 20
    photons{
        gather 20, 80
        radius .2*phd, 2, .1*phd
        autostop 0
        jitter .2
        expand_thresholds 0.2, 40
        max_trace_level 20
        max_media_steps 100
        media_spacing_factor 1
    }
}

#declare BasicLens = intersection{
    sphere{ <1,0,0>, 1.75 }
    sphere{ <-1,0,0>, 1.75 }
    texture{ pigment{ rgbt 1 } }
    interior{ior 1.5}
    photons{
        refraction on
        separation 0.03*phd
    }
}

#declare BasicMirror = box{<-2,-1,-.1>,<2,1,0>
    pigment{rgb 1}
    finish{ambient 0 diffuse 0 reflection 1}
    photons{
        separation 0.03*phd
        refraction off
        reflection on
    }
}

sphere{ /*Media to scatter light*/
    0, 20
    pigment{rgbt 1}
    finish{ambient 0 diffuse 0}
    hollow
    interior{
        ior 1
        media{
            scattering{ 1, .25 extinction 0}
            method 3
            intervals 1
            samples 40, 40
        }
    }
    photons{photons_pass_through}
}


Post a reply to this message

From: Eric Freeman
Subject: Re: Photon bug?
Date: 24 Mar 2000 11:28:36
Message: <38db97b4@news.povray.org>
"Nieminen Juha" <war### [at] sarakerttunencstutfi> wrote in message
news:38d09d1f@news.povray.org...
>
>   If any of the light sources in the scene has
> photons { reflection off refraction off } no
> photons are shot, no matter how many other
> light sources are there in the scene.

I've noticed that, too.  Don't know what the problem is.

>   And a question:
>   I'm trying to get a visible reflected light beam.
> I thought that making the photons to interact
> with the scattering media would do it. However
> it doesn't work. The light beam starting from the
> spotlight is visible, but none of the reflected
> beams is. Is it supposed to? Perhaps I'm doing
> something wrong?

I'm also trying to get a visible reflected light beam with media and have
had no luck.  I've got a hollow box with a small hole in the right side and
a light source 500,000 units to the right of the hole.  Inside the box I've
placed several mirrors which reflect the light and eventually reflect it
onto the left wall of the box.  It works great.  But then I added a second
light source to illuminate the inside of the box but did not want it to
shoot photons at the mirrors.  This resulted in no photons being shot, so I
removed it.  I added a second box the same size as the inside of the box to
contain media so I could see the light as it travels around the box and get
the message: "warning: Could not save photon map - no photons!"  Also, the
media does not show the light beam entering from the right and striking the
first mirror.  As I am clueless when it comes to media, I don't know how to
fix this (altho I am randomly tweaking the media parameters to experiment).
If I find a cure, I'll let you know.

Eric
--------------------
http://www.datasync.com/~ericfree
--------------------
"I don't like it, and I'm sorry I ever had anything to do with it."
- Erwin Schrodinger talking about Quantum Mechanics.


Post a reply to this message

From: Warp
Subject: Re: Photon bug?
Date: 24 Mar 2000 11:51:24
Message: <38db9d0c@news.povray.org>
Nathan (or anyone), can you help us with our problems?

-- 
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: Nathan Kopp
Subject: Re: Photon bug?
Date: 24 Mar 2000 15:26:15
Message: <38dbcf67$1@news.povray.org>
Eric Freeman <eri### [at] datasynccom> wrote ...
> I'm also trying to get a visible reflected light beam with media and have
> had no luck.  I've got a hollow box with a small hole in the right side
and
> a light source 500,000 units to the right of the hole.  Inside the box
I've
> placed several mirrors which reflect the light and eventually reflect it
> onto the left wall of the box.  It works great.  But then I added a second
> light source to illuminate the inside of the box but did not want it to
> shoot photons at the mirrors.  This resulted in no photons being shot, so
I
> removed it.  I added a second box the same size as the inside of the box
to
> contain media so I could see the light as it travels around the box and
get
> the message: "warning: Could not save photon map - no photons!"  Also, the
> media does not show the light beam entering from the right and striking
the
> first mirror.  As I am clueless when it comes to media, I don't know how
to
> fix this (altho I am randomly tweaking the media parameters to
experiment).
> If I find a cure, I'll let you know.

Send me some source code and I'll take a closer look.

-Nathan


Post a reply to this message

From: Eric Freeman
Subject: Re: Photon bug?
Date: 25 Mar 2000 15:27:27
Message: <38dd212f@news.povray.org>
"Nathan Kopp" <Nat### [at] Koppcom> wrote in message
news:38dbcf67$1@news.povray.org...
>
> Eric Freeman <eri### [at] datasynccom> wrote ...
> > I'm also trying to get a visible reflected light beam
> > with media and have had no luck.  [snip]
> >
> > I added a second box the same size as the inside
> > of the box to contain media so I could see the light
> > as it travels around the box and get the message:
> > "warning: Could not save photon map - no
> > photons!"  Also, the media does not show the light
> > beam entering from the right and striking the first
> > mirror.  As I am clueless when it comes to media, I
> > don't know how to fix this (altho I am randomly
> > tweaking the media parameters to experiment).  If I
> > find a cure, I'll let you know.
>
> Send me some source code and I'll take a closer look.
>
> -Nathan

I got the scene working (see "Phun With Photons" in binaries.images) by
extending the media container to the right to enclose the light source.  At
least I think that's what made it work.

As far as the second light source causing no photons to be shot, here's the
scene file.  I'm not sure what part of it would be useful, so I'm posting
the whole thing.  Pardon the sloppy code.  The second light source is just
after the camera declaration.  If "reflection off" is set in this light, no
photons are shot.  The scene requires "kolors.inc" and my "mega_metals.inc"
but colors can be changed if you don't have these.

Eric
--------------------
http://www.datasync.com/~ericfree
--------------------
"I don't like it, and I'm sorry I ever had anything to do with it."
- Erwin Schrodinger talking about Quantum Mechanics.


Post a reply to this message


Attachments:
Download 'reflector.pov.txt' (9 KB)

From: Warp
Subject: Re: Photon bug?
Date: 27 Mar 2000 04:05:25
Message: <38df2455@news.povray.org>
You might consider including the scene source in plain text instead of
uuencoded the next time, since this is not a binary group.
  Thanks.

-- 
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: Warp
Subject: Re: Photon bug?
Date: 27 Mar 2000 07:24:48
Message: <38df5310@news.povray.org>
This is the scene I'm trying to render. Can someone tell me how should
I modify so that the reflected light would be visible in the media?

#version Unofficial MegaPov 0.4;

#include "colors.inc"
#include "textures.inc"

#declare UsePhotons=yes;
global_settings
{
  max_trace_level 6
#if(UsePhotons)
  photons
  { count 20000
    autostop 0
    media 100
  }
#end  
}

media
{ intervals 10
  scattering { 1, rgb .5 extinction .01 }
  method 3
}

sphere
{ 0,70 inverse
  pigment
  { bozo color_map { [0 rgb 0][1 rgb <1,.5,0>] }
    scale <5,10,5>
  }
} 


camera { location -z*20 look_at 0 angle 35 }

light_source
{ <50,2,0> 1
  spotlight point_at y*2 radius .5 falloff .6
}
light_source
{ <100,100,-100>*.3 .8 media_interaction off
#if(UsePhotons)
//  photons { reflection off refraction off }
#end
}

#declare MirrorBox=
union
{ difference
  { box { <-.5,-1.8,-1.8><.1,1.8,1.8> }
    box { <-.1,-1.5,-1.5><.11,1.5,1.5> }
    pigment { DMFWood4 }
  }
  box
  { <-.1,-1.5,-1.5><0,1.5,1.5>
    pigment { rgb 0 }
    finish { reflection 1 diffuse 0 ambient 0 }
#if(UsePhotons)
    photons
    { target
      refraction off
      reflection on
      ignore_photons
    }
#end
  }
}

object
{ MirrorBox
  rotate z*-45
  translate <-3,2,0>
}
object
{ MirrorBox
  rotate z*45
  translate <-3,-2,0>
}

box
{ <-.5,-1.5,-1.5><0,1.5,1.5>
  pigment { Cherry_Wood scale .5  }
  rotate z*180
  translate <4,-2,0>
}

sphere
{ 0,1.3 scale <.3,1,1>
  pigment { rgbf <.7,.9,1,.9> }
  finish { specular .5 reflection .1 }
  interior { ior 1.5 }
  translate <2,-2,0>
#if(UsePhotons)
    photons
    { target
      refraction on
      reflection on
    }
#end
}

-- 
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: Warp
Subject: Re: Photon bug?
Date: 27 Mar 2000 08:27:16
Message: <38df61b3@news.povray.org>
If I substituted the media with a box with media so that the light source
is inside the box, it worked.
  Why it only works this way? Why it doesn't work with the global media? Why
the light source has to be inside the box?

-- 
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: Nathan Kopp
Subject: Re: Photon bug?
Date: 27 Mar 2000 13:53:41
Message: <38dfae35@news.povray.org>
Apparantly I fixed this already.  In my WIP version of 0.5, this will shoot
photons even if both reflection and refraction are turned off for the second
light source.

Neat scene, by the way.  :-)  It's a good example of media photons.  If
you'd like, you could clean up the code (however much you want) and I'll
include it in the MegaPov demos.

-Nathan

Eric Freeman <eri### [at] datasynccom> wrote...
>
> As far as the second light source causing no photons to be shot, here's
the
> scene file.  I'm not sure what part of it would be useful, so I'm posting
> the whole thing.  Pardon the sloppy code.  The second light source is just
> after the camera declaration.  If "reflection off" is set in this light,
no
> photons are shot.  The scene requires "kolors.inc" and my
"mega_metals.inc"
> but colors can be changed if you don't have these.


Post a reply to this message

Goto Latest 10 Messages Next 4 Messages >>>

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