POV-Ray : Newsgroups : povray.general : Photon scattering from global medium after object Server Time
24 Apr 2024 19:17:15 EDT (-0400)
  Photon scattering from global medium after object (Message 1 to 3 of 3)  
From: jhennesy
Subject: Photon scattering from global medium after object
Date: 29 Apr 2018 08:15:01
Message: <web.5ae5b6c02d1ee56fc3fb37760@news.povray.org>
I've been trying to produce a scene with a laser illuminating a solid sample
from above. The laser is focused with a lens onto the sample surface. The laser
itself is implemented as a cylindrical light source with refraction and
reflection on, and scattering turned on in global medium to enable me to see the
laser.

I can see the scattering of the laser up to the lens, but cannot see the laser
afterward - see https://i.imgur.com/bpgSD0t.png. However, I can see the focused
laser spot on the substrate surface, so the photons must be getting through,
they're just not visible. I can solve this by defining a cylinder between the
substrate and the lens which also scatters light, but I'd like not to have to.

If anyone has any suggestions on how to solve this, please let me know! The
scene file is as follows:

#version 3.7;
#include "colors.inc"
#include "glass.inc"

global_settings {
    ambient_light rgb<1, 1, 1>
    assumed_gamma 1.0
    photons {
        spacing 0.005
        autostop 1
        media 200
        max_trace_level 200
        radius 0.0025
    }
}

background{rgbf<1, 1, 1,1>}

camera {
   right x*image_width/image_height
   location <-5,3.,-5>*1.3
   look_at <0, 0, 0>
}

// illuminate scene
light_source{
   <-5,3,-5>*1.4
   color rgb <1, 1, 1>*2
   adaptive 1
   jitter
   shadowless
}

// enable photon scattering in global medium
media {
    scattering {
        1,
        rgb <0.1, 0.1, 0.1>
        extinction 0.0000001
    }
    samples 100,200
}

// laser
light_source {
    <0, 10, 0>
    color Green*4
    cylinder
    point_at <0, 0, 0>
    radius .1
    falloff .5
    tightness .5
    photons {
        reflection on
        refraction on
    }
}

// material properties for solid
#declare F_substrate = finish {
    phong 0.01
    phong_size 1000
    specular 0.5
    diffuse .4
}

#declare N_substrate = normal {
    bumps 0
    turbulence 0
    scale 1
}

#declare I_substrate = interior {
    ior 2.42
    caustics 2
    dispersion 1.041
    dispersion_samples 50
}

#declare M_substrate = material {
    texture {
        pigment {rgb<0,0.4,0.7> transmit 0.55}
        finish {F_substrate}
        normal {N_substrate}
    }
    interior {I_substrate}
}

// bi-convex lens
#declare R = 3;
#declare Over= 0.2;
intersection {
    sphere {
        <0,0,0>,
        R
        translate <0,-R+Over,0>
    }
    sphere {
        <0,0,0>,
        R
        translate <0,R-Over,0>
    }
    cylinder {
        <0,-R,0>
        <0,R,0>
        0.5
    }
    texture {
        pigment { color rgbf <0.98, 1.0, 0.99, 0.75> }
        finish { F_Glass3 }
    }
    interior { I_Glass3 }
    translate <0,3,0>
    photons {
        target
        reflection on
        refraction on
    }
    rotate<0,200,0>
}

// substrate
box {
    <-2,-0.2,-4>, <2,0,4>
    material { M_substrate }
    photons {
        target
        reflection on
        refraction on
    }
}


Post a reply to this message

From: William F Pokorny
Subject: Re: Photon scattering from global medium after object
Date: 29 Apr 2018 17:21:56
Message: <5ae63774$1@news.povray.org>
On 04/29/2018 08:12 AM, jhennesy wrote:
> I've been trying to produce a scene with a laser illuminating a solid sample
> from above. The laser is focused with a lens onto the sample surface. The laser
> itself is implemented as a cylindrical light source with refraction and
> reflection on, and scattering turned on in global medium to enable me to see the
> laser.
...
> 

I'm short on time at seeing this post so unable to run your scene, but 
the normal set up with photons is for the media to be inside a clear, 
hollow container with an interior defining media. The container would 
specify 'photons {target}' to get the photons shot into the media.

You've got global media and what you see is I believe the normal media 
to light scatterings - not the forward photon interaction type.

There is an 'optics.pov' scene shipped with POV-Ray. It has a few minor 
issues - mostly from trying to be fast I suspect - but it adequately 
demonstrates a photons and media set up.

Bill P.


Post a reply to this message

From: jhennesy
Subject: Re: Photon scattering from global medium after object
Date: 29 Apr 2018 18:50:01
Message: <web.5ae64bf955ee5e9ac3fb37760@news.povray.org>
William F Pokorny <ano### [at] anonymousorg> wrote:
> On 04/29/2018 08:12 AM, jhennesy wrote:
> > I've been trying to produce a scene with a laser illuminating a solid sample
> > from above. The laser is focused with a lens onto the sample surface. The laser
> > itself is implemented as a cylindrical light source with refraction and
> > reflection on, and scattering turned on in global medium to enable me to see the
> > laser.
> ...
> >
>
> I'm short on time at seeing this post so unable to run your scene, but
> the normal set up with photons is for the media to be inside a clear,
> hollow container with an interior defining media. The container would
> specify 'photons {target}' to get the photons shot into the media.
>
> You've got global media and what you see is I believe the normal media
> to light scatterings - not the forward photon interaction type.
>
> There is an 'optics.pov' scene shipped with POV-Ray. It has a few minor
> issues - mostly from trying to be fast I suspect - but it adequately
> demonstrates a photons and media set up.
>
> Bill P.


Hi Bill,

Thanks for your fast reply - adding a hollow box around the entire scene does
exactly as you suggest it would.

Thanks for the help!

J


Post a reply to this message

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