|
![](/i/fill.gif) |
Oliver nous apporta ses lumieres en ce 2007/08/17 12:21:
> Hi everyone,
> I'm new to povray and have recently been playing around with media and
> photons. Below is a little test scene I put together to help me understand
> how these things work, but I haven't been able to get it to work as I would
> expect.
>
> What is supposed to happen, is a narrow beam of light from a spotlight
> enters some scattering media so it shows up, enters a glass block at an
> angle, where it is refracted, and then exits at the other side, where it
> shows up in the media again.
>
> What actually happens is it shows up before it strikes the block, but then
> does not show up again at the other side. I have been looking at the
> source code of other scenes that do something similar (particularly the
> advanced/optics.pov scene that comes with povray) but I can't really tell
> what I am doing wrong.
>
> Here is what I have so far:
> #include "colors.inc"
>
> global_settings {
> assumed_gamma 1
> photons {
> count 10000
> jitter 0.2
> media 100, 2
> }
> }
>
> // Fog
> box { <-2,-2,-2>, <2,2,2>
> hollow
> texture {
> pigment { colour rgbf 1 }
> }
> interior {
> media {
> scattering { 1, colour Gray50 extinction 1 }
> method 2
> intervals 10 samples 20
> }
> }
> }
>
> // Glass block
> box {<-0.5,-0.5,-2>, <0.5,0.5,2>
> material {
> texture {
> pigment { colour rgbf 1 }
> finish { ambient 0 diffuse 0 reflection 0 }
> }
> interior {
> ior 1.5
> }
> }
> rotate -30*z
> photons {
> target
> refraction on
> reflection off
> }
>
> }
>
>
> // Spotlight
> light_source { <152, 0, 0>, colour 20*White
> spotlight
> radius 0.01
> falloff 0.02
> point_at <0,0,0>
> photons {
> refraction on
> reflection off
> }
> }
>
> camera {
> location <0,0,-8>
> look_at <0,0,0>
> angle 50
> }
>
> // End
>
>
Found the problem!
You need to add: photons{pass_through} to the media container.
When shooting photons, if there is anything in the way, the photon is not sent.
Even if that something is perfectly transparent. With pass_through, that object
is ignored.
Look at it as a no_shadow for photons. In fact, any object with pass_through
will automaticaly be made no_shadow.
--
Alain
-------------------------------------------------
Just remember - if the world didn't suck, we would all fall off.
Post a reply to this message
|
![](/i/fill.gif) |