POV-Ray : Newsgroups : povray.binaries.images : More questions about photons Server Time
7 Nov 2024 02:24:06 EST (-0500)
  More questions about photons (Message 1 to 6 of 6)  
From: dan B hentschel
Subject: More questions about photons
Date: 29 Sep 2004 13:20:01
Message: <web.415aed15eb34e074a3fcf12a0@news.povray.org>
I'm still having difficulties figuring out how photons should work (if at
all) in my scene. I have posted an image with one of my blocks using six
different settings. The block contains a concave mirror inside it, and the
mirror is surrounded by clear plastic walls. The mirror inside the block
has the following photons {} block:

    photons {
        target
        reflection on
        collect off
    }

The six different images were created by using six different photons {}
blocks for the plastic walls surrounding the mirror. Here they are in
order, from left-to-right and top-to-bottom:

1) No photons {} block

2)
    photons {
        pass_through
    }

3)
    photons {
        pass_through
        collect off
    }

4)
    photons {
        target
        refraction on
        reflection on
        collect off
    }

5)
    photons {
        target
        refraction on
        collect off
    }

6)
    photons {
        target
        pass_through
        reflection on
        collect off
    }


It seems to me that possibly the "pass_through" option only allows the
photons to go one-way through the plastic walls? In image (2), you can see
that with pass_through turned on, there are photons being collected on the
inside of the plastic walls. I would have expected that if I turn off
collect, then those photons would be collected on the wood floor instead.
This doesn't happen, though. It seems like they just disappear, as can be
seen in image (3).

Image (4) looks pretty cool. I think that the very focused, bright spot is
due to internal reflections of photons bouncing back and forthe between the
plastic walls and the mirror. When I turn off reflection on the walls (5),
then the highlight is much less intense.

Here is my dilemma. I would use the settings from image (4), or even (5),
since they produce pretty good results for this particular block. However,
if I change the inside of the block to something else, for example balloons
instead of a mirror, then the interior of the block tends to be very dark
when I turn on refraction on the glass walls. I suppose I could use
different settings for the walls depending on the contents of the block,
but I'd prefer not to need to do that. Any suggestions?

 - dan B hentschel


Post a reply to this message


Attachments:
Download 'photon_tests.jpg' (47 KB)

Preview of image 'photon_tests.jpg'
photon_tests.jpg


 

From: dan B hentschel
Subject: Re: More questions about photons
Date: 29 Sep 2004 13:30:00
Message: <web.415af0631838f502a3fcf12a0@news.povray.org>
BTW... Here is the balloon block I was talking about. The image on the left
uses:

    photons {
        pass_through
        collect off
    }

And the one on the right uses:

    photons {
        target
        refraction on
        reflection on
        collect off
    }

I like the photon effects in the right side image, but I don't like the
shadowy interior of the block. Again, any suggestions would be appreciated.

 - dan B hentschel


Post a reply to this message


Attachments:
Download 'photon_tests2.jpg' (68 KB)

Preview of image 'photon_tests2.jpg'
photon_tests2.jpg


 

From: Jellby
Subject: Re: More questions about photons
Date: 29 Sep 2004 14:58:18
Message: <415b05c9@news.povray.org>
Among other things, dan B hentschel wrote:


> I like the photon effects in the right side image, but I don't like the
> shadowy interior of the block. Again, any suggestions would be
> appreciated.

Not that I have any useful idea, but are the plastic walls solid? Do they 
have outer surface, inner surface and an interior or are they just the 
outer surface of a clipped/hollow box?

-- 
light_source{9+9*x,1}camera{orthographic look_at(1-y)/4angle 30location
9/4-z*4}light_source{-9*z,1}union{box{.9-z.1+x clipped_by{plane{2+y-4*x
0}}}box{z-y-.1.1+z}box{-.1.1+x}box{.1z-.1}pigment{rgb<.8.2,1>}}//Jellby


Post a reply to this message

From: dan B hentschel
Subject: Re: More questions about photons
Date: 29 Sep 2004 16:40:00
Message: <web.415b1c841838f502a3fcf12a0@news.povray.org>
Jellby <jel### [at] M-yahoocom> wrote:
> Among other things, dan B hentschel wrote:
>
>
> > I like the photon effects in the right side image, but I don't like the
> > shadowy interior of the block. Again, any suggestions would be
> > appreciated.
>
> Not that I have any useful idea, but are the plastic walls solid? Do they
> have outer surface, inner surface and an interior or are they just the
> outer surface of a clipped/hollow box?
>
> --
> light_source{9+9*x,1}camera{orthographic look_at(1-y)/4angle 30location
> 9/4-z*4}light_source{-9*z,1}union{box{.9-z.1+x clipped_by{plane{2+y-4*x
> 0}}}box{z-y-.1.1+z}box{-.1.1+x}box{.1z-.1}pigment{rgb<.8.2,1>}}//Jellby

They are completely CSG objects. Here is the code:


#declare clear_round_corner_box =
intersection {
    merge {
        // Front left corner
        cylinder {
          <-box_size + corner_width, -2*box_size, -box_size + corner_width>
          <-box_size + corner_width, 2*box_size, -box_size + corner_width>
          corner_width
        }
        // Front right corner
        cylinder {
          <box_size - corner_width, -2*box_size, -box_size + corner_width>
          <box_size - corner_width, 2*box_size, -box_size + corner_width>
          corner_width
        }
        // Back left corner
        cylinder {
          <-box_size + corner_width, -2*box_size, box_size - corner_width>
          <-box_size + corner_width, 2*box_size, box_size - corner_width>
          corner_width
        }
        // Back right corner
        cylinder {
          <box_size - corner_width, -2*box_size, box_size - corner_width>
          <box_size - corner_width, 2*box_size, box_size - corner_width>
          corner_width
        }
        box {
          <-box_size + corner_width, -2*box_size, -box_size>
          <box_size - corner_width, 2*box_size,  box_size>
        }
        box {
          <-box_size, -2*box_size, -box_size + corner_width>
          <box_size, 2*box_size,  box_size - corner_width>
        }
    }
    box {
        <-box_size-0.001, -box_size, -box_size-0.001>
        <box_size+0.001, box_size, box_size+0.001>
    }
}

#declare glass_walls =
difference {
    object {
        clear_round_corner_box
        scale <1, glass_height*0.9999/box_size, 1>
    }
    object {
        clear_round_corner_box
        scale <(box_size-wall_thickness)/box_size, 2,
(box_size-wall_thickness)/box_size>
    }
    texture {
        finish {
            specular 1
            roughness 0.02
            ambient 0
            diffuse 0.1
            reflection {
                0.06, 0.45
                fresnel on
            }
            conserve_energy
        }
        pigment { Clear }
    }
    interior {
        ior 1.7
        fade_distance 1.0
        fade_power 2
    }
    photons {
        target
        refraction on
        //pass_through
        reflection on
        collect off
    }
}

 - dan B hentschel


Post a reply to this message

From: Nathan Kopp
Subject: Re: More questions about photons
Date: 30 Sep 2004 00:39:00
Message: <415b8de4$1@news.povray.org>
"dan B hentschel" <dan### [at] alumritedu> wrote...
> I'm still having difficulties figuring out how photons should work (if at
> all) in my scene. I have posted an image with one of my blocks using six
> different settings. The block contains a concave mirror inside it, and the
> mirror is surrounded by clear plastic walls.
[clip]

try this block for the plastic walls:

photons {
  pass_through
  refraction on
  reflection on
}

> It seems to me that possibly the "pass_through" option only allows the
> photons to go one-way through the plastic walls? In image (2), you can see
> that with pass_through turned on, there are photons being collected on the
> inside of the plastic walls. I would have expected that if I turn off
> collect, then those photons would be collected on the wood floor instead.
> This doesn't happen, though. It seems like they just disappear, as can be
> seen in image (3).

Yes.  I realize that this is somewhat confusing, but pass_through only
affects photons that haven't yet hit their target.  Once they've hit their
target, then they are affected by the refraction and reflection settings.
With pass_through, they actually pass right through the object as if it
wasn't there (no reflection, no refraction).  After they hit their target,
pass_through doesn't affect them anymore.  This is actually done by design,
because of the strangeness of the "target" concept.

> Here is my dilemma. I would use the settings from image (4), or even (5),
> since they produce pretty good results for this particular block. However,
> if I change the inside of the block to something else, for example
balloons
> instead of a mirror, then the interior of the block tends to be very dark
> when I turn on refraction on the glass walls. I suppose I could use
> different settings for the walls depending on the contents of the block,
> but I'd prefer not to need to do that. Any suggestions?

Using more photons would probably improve the photon brightness estimate and
increase the brightness.

-Nathan


Post a reply to this message

From: dan B hentschel
Subject: Re: More questions about photons
Date: 30 Sep 2004 08:20:00
Message: <web.415bf9ba1838f502b31e6d870@news.povray.org>
"Nathan Kopp" <pov### [at] nkoppmailshellcom> wrote:
> Using more photons would probably improve the photon brightness estimate and
> increase the brightness.


You are absolutely right. Decreasing the spacing from 0.1 to 0.01 definitely
halped dramatically. The images are below. Unfortunately, in my full scene,
decreasing the spacing by the same amount yeilds a photon map that is well
over 900 MB in size! This won't fly on a computer with 512 MB RAM. I will
need to experiment more with the spacing to find a happy medium. I will
also play a bit with Shurakai's suggestion of changing scene elements
between saving and loading the photon map. I have a lot of objects in the
distance of my scene, and I don't care about caustics on these elements too
much. I can probably create the photon map with all these objects commented
out, and then put them back for the final render.

Thank you very much for your help and patience. I think I am finally
starting to see the light. ;-)

 - dan B hentschel


Post a reply to this message


Attachments:
Download 'photon_tests3.jpg' (67 KB)

Preview of image 'photon_tests3.jpg'
photon_tests3.jpg


 

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