POV-Ray : Newsgroups : povray.general : no_shadow and photon pass_through : Re: no_shadow and photon pass_through Server Time
31 Jul 2024 08:23:17 EDT (-0400)
  Re: no_shadow and photon pass_through  
From: Kenneth
Date: 19 Sep 2007 00:15:01
Message: <web.46f0a0f1b7aeba29ddc78dcc0@news.povray.org>
Alain <ele### [at] netscapenet> wrote:

> In the documentation, it is clearly said that pass_through only affect PRIMARY
> photons: those hiting the object directly, and never secondary photons: those
> that already have been reflected or been refracted by some ther object. The
> problem, is that it's buried, and easily missed, in a long explanation.
> pass_trough object are only ignored between the light_source and a target.
>

My explanation of my scene may not be clear. Here's the code for it. (It
renders quickly---more or less....)

I made up a special normal pattern for the "ground" box--the photon
"target"--to better illustrate the caustic effects. It has two distinctly
different and separate normal patterns, to create different-looking
caustics on each vertical slab, depending on where the light is allowed to
hit the ground.

The green front slab is positioned so that it will BLOCK the light from
reaching the ground behind it...that is, blocking the light on it's way to
the ground "target" there. The blue rear slab is positioned so that it will
pick up any reflected caustics from the ground in-between the slabs, IF any
light reaches there.

Run the scene as-is, to see the nice bump-pattern caustic effect on the
front slab, and to confirm that no light of any kind is getting past it.
Then uncomment pass_through on in the front slab. The results are as
expected--light is allowed to "pass through" it on it's way to the ground
behind it (and creating a "banded" caustic pattern on the rear slab,
reflected from the different normal pattern on the ground there.) Note that
the bumpy caustic pattern on the front slab is NOT passing through, though.

As mentioned, so far so good.

Now, keeping pass_through on, also uncomment no_shadow in the front slab.
The results are that the light (and the bumpy caustics) are going
completely through the first slab. The rear slab now shows caustics from
both normal patterns. Looks cool; but there are no caustics on the front
slab anymore. (Maybe that's to be expected; don't know.)  The *real*
trouble comes when turning pass_through on to OFF; it has no effect, even
though the POV docs say that it should be different.

KW

----[code]----
global_settings{
  ambient_light 4
  photons{spacing .06 jitter 1.0 radius 0,2}
  }

camera {
  perspective
  location  <75, 125, -35>
  look_at   <5,10,25>
  right     x*image_width/image_height  // aspect ratio
  angle 75
}


light_source {
  0*x
  color rgb <1,1,1>
  spotlight
  translate <0, 200, -200>
  point_at <0, 0, -20>
  radius 10
  tightness 1
  falloff 12
}

#declare sine_normal =
 normal{function{-abs(sin (100*z))}};


// floor or base...the photon TARGET
box{<-80,-1,-80>,<80,0,80>
 texture{
  pigment{color rgb <1,.5,.5>*.5} // RED
  finish{reflection .4}
  normal{
   gradient z
   normal_map{
    [0.0 bumps  .015 scale .07 no_bump_scale]
    [0.5 bumps .015 scale .07 no_bump_scale]
    [0.5 sine_normal .01]
    [1.0 sine_normal .01]

    }
    scale 155
    translate -78*z
    }
        }
 photons{
  target
  reflection on
  refraction off
  }
 }

// FRONT box
box{<-60,0,0>,<60,60,2>
 pigment {color rgb <.5,.7,.5>} // GREEN
 // no_shadow
 photons{
 //pass_through on  // OFF doesn't work, when no_shadow is present.
        }
   }

// REAR box
box{<-30,0,0>,<30,70,2>
 pigment {color rgb <.5,.5,.7>} // BLUE
 translate 55*z
   }


Post a reply to this message

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