POV-Ray : Newsgroups : povray.newusers : Can't get photons to show up in media... Server Time
4 Nov 2024 19:16:03 EST (-0500)
  Can't get photons to show up in media... (Message 1 to 8 of 8)  
From: Warp
Subject: Can't get photons to show up in media...
Date: 2 Mar 2003 11:06:33
Message: <3e622c09@news.povray.org>
I have been fighting with this simple scene for some time now. I made
the scene to demonstrate how photons can interact with media so that a
reflected light beam will show up.
  For some reason, no matter what I do, it doesn't work.
  Could someone lighten me up in this issue? How do I get the reflected
photons to show up in the media?


#global_settings { photons { spacing .01 media 100 } }
media { scattering { 1,.5 extinction .1 } }
camera { location <1.8,0,-3> look_at 0 angle 80 }

sphere { -x*1.01, 1 pigment { rgb 1 } }

light_source
{ 0, 1
  spotlight point_at x radius 15 falloff 18
}
cone
{ -x*.1,0, x*.5,.25 open
  pigment { rgb 1 }
  interior_texture { pigment { rgb 1 } finish { ambient 1 } }
}

box
{ <2,-5,-10>, <2.1,5,10>
  pigment { rgb 1 }
  finish { reflection 1 }
  photons { target reflection on }
}
box
{ <-2,-5,-10>, <-2.1,5,10>
  pigment { rgb 1 }
}


-- 
#macro N(D)#if(D>99)cylinder{M()#local D=div(D,104);M().5,2pigment{rgb M()}}
N(D)#end#end#macro M()<mod(D,13)-6mod(div(D,13)8)-3,10>#end blob{
N(11117333955)N(4254934330)N(3900569407)N(7382340)N(3358)N(970)}//  - Warp -


Post a reply to this message

From: Johannes Dahlstrom
Subject: Re: Can't get photons to show up in media...
Date: 2 Mar 2003 12:00:14
Message: <web.3e62374e652088bff7cbce3c0@news.povray.org>
Warp wrote:
>  I have been fighting with this simple scene for some time now. I made
>the scene to demonstrate how photons can interact with media so that a
>reflected light beam will show up.
>  For some reason, no matter what I do, it doesn't work.
>  Could someone lighten me up in this issue? How do I get the reflected
>photons to show up in the media?

Photons only work with contained medias. This doesn't seem to be mentioned
in the docs though... Anyway, it is pretty obvious if you think about it a
bit, in an infinite media a potentially infinite amount of photons would
have to be sampled and stored.


Post a reply to this message

From: Warp
Subject: Re: Can't get photons to show up in media...
Date: 2 Mar 2003 12:07:29
Message: <3e623a51@news.povray.org>
Johannes Dahlstrom <sad### [at] tkukoulufi> wrote:
> Photons only work with contained medias. This doesn't seem to be mentioned
> in the docs though... Anyway, it is pretty obvious if you think about it a
> bit, in an infinite media a potentially infinite amount of photons would
> have to be sampled and stored.

  I tried confining the media inside a box (box { -2.1, 2.1 }, with all
hollow etc stuff) without the image changing in any way. No reflected
photons in the media.

-- 
#macro M(A,N,D,L)plane{-z,-9pigment{mandel L*9translate N color_map{[0rgb x]
[1rgb 9]}scale<D,D*3D>*1e3}rotate y*A*8}#end M(-3<1.206434.28623>70,7)M(
-1<.7438.1795>1,20)M(1<.77595.13699>30,20)M(3<.75923.07145>80,99)// - Warp -


Post a reply to this message

From: Christopher James Huff
Subject: Re: Can't get photons to show up in media...
Date: 2 Mar 2003 12:09:45
Message: <cjameshuff-DC11D9.12051202032003@netplex.aussie.org>
In article <3e622c09@news.povray.org>, Warp <war### [at] tagpovrayorg> 
wrote:

> media { scattering { 1,.5 extinction .1 } }

Try bounded media instead of global media? Maybe the infinite rays are 
screwing it up. I never use global media, it's too unreliable.

-- 
Christopher James Huff <cja### [at] earthlinknet>
http://home.earthlink.net/~cjameshuff/
POV-Ray TAG: chr### [at] tagpovrayorg
http://tag.povray.org/


Post a reply to this message

From: Warp
Subject: Re: Can't get photons to show up in media...
Date: 2 Mar 2003 12:32:03
Message: <3e624013@news.povray.org>
Christopher James Huff <cja### [at] earthlinknet> wrote:
> Try bounded media instead of global media? Maybe the infinite rays are 
> screwing it up. I never use global media, it's too unreliable.

  As I mentioned in the other article, I tried it and it didn't change
the image at all. I don't understand what's going on.

  Could someone modify my code to work and post it here and not just
post guesses about what *might* be the problem, thanks? ;)

-- 
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: hughes, b 
Subject: Re: Can't get photons to show up in media...
Date: 2 Mar 2003 13:31:29
Message: <3e624e01@news.povray.org>
"Warp" <war### [at] tagpovrayorg> wrote in message
news:3e624013@news.povray.org...
> Christopher James Huff <cja### [at] earthlinknet> wrote:
> > Try bounded media instead of global media? Maybe the infinite rays are
> > screwing it up. I never use global media, it's too unreliable.
>
>   As I mentioned in the other article, I tried it and it didn't change
> the image at all. I don't understand what's going on.
>
>   Could someone modify my code to work and post it here and not just
> post guesses about what *might* be the problem, thanks? ;)

It seems to be just because of the cone, it not being hollow. Although I
can't explain why it prevents only the reflection and not the first
lightbeam.

--
Farewell,
Bob


Post a reply to this message

From: hughes, b 
Subject: Re: Can't get photons to show up in media...
Date: 2 Mar 2003 13:46:01
Message: <3e625169@news.povray.org>
Scratch that. Not only because of the cone being nonhollow but it does need
a container for the media. I was too quick to reply. Here it is, working:

#global_settings {
 photons { spacing .01 media 50 } // low sampling, ugly but faster
}

sphere {0,5 // media container
pigment {rgb 0}
interior {
media { method 2 // hasten the render more
 scattering { 1,.5 extinction 0.25}
} }
hollow
}

camera { location <1.8,.1,-3> look_at 0 angle 80 }

sphere { -x*1.01, 1 pigment { rgb 1 } }

light_source
{ 0, 1
  spotlight point_at x radius 15 falloff 18
  photons {reflection on} // added
}

cone
{ -x*.1,0, x*.5,.25 open
  pigment { rgb 1 }
  interior_texture { pigment { rgb 1 } finish { ambient 1 } }
 hollow // wasn't hollow before
}

box
{ <2,-5,-10>, <2.1,5,10>
  pigment { rgb 1 }
  finish { reflection {1,1} }
  photons { target reflection on collect off}
}
box
{ <-2,-5,-10>, <-2.1,5,10>
  pigment { rgb 1 }
}


Post a reply to this message

From: Warp
Subject: Re: Can't get photons to show up in media...
Date: 2 Mar 2003 19:20:29
Message: <3e629fcd@news.povray.org>
hughes, b. <omn### [at] charternet> wrote:
> It seems to be just because of the cone, it not being hollow.

  Oh... Seems like an odd undocumented behaviour. I wouldn't have thought
about that (since the photons were otherwise working ok, ie. reflecting
from the wall an illuminating the objects on the left).

  Anyone has an idea why this occurs and whether it's a bug or not?

-- 
#macro M(A,N,D,L)plane{-z,-9pigment{mandel L*9translate N color_map{[0rgb x]
[1rgb 9]}scale<D,D*3D>*1e3}rotate y*A*8}#end M(-3<1.206434.28623>70,7)M(
-1<.7438.1795>1,20)M(1<.77595.13699>30,20)M(3<.75923.07145>80,99)// - Warp -


Post a reply to this message

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