POV-Ray : Newsgroups : povray.newusers : Area lights & lighting in general Server Time
28 Mar 2024 13:35:53 EDT (-0400)
  Area lights & lighting in general (Message 1 to 1 of 1)  
From: Crippso
Subject: Area lights & lighting in general
Date: 8 Jan 2015 14:35:01
Message: <web.54aedae4dc2fb297389d25e10@news.povray.org>
Hi there

I have a fairly simple scene which has a specular flat mirror surface with a
transparent, partially reflecting slab just above this. In between these I have
a square of diffuse reflecting material. The orthographic camera points at this
and the field of view is matched to the size of this square. Then, slightly to
the side of this flat diffuse reflector there is an area light source. The area
of this source is the same as the diffuse reflector. The light sources in the
area are spotlights and I've tried to set them up to emit over an angle of
around 40 degrees.

What I am trying to do is check how much of the emitted light is incident on the
flat diffuse reflecting square. In my first setup of this I used an emitter
instead of an area light and got results consistent with what I expected.
However, I'm interested in results with an area light. When I generate scene
using version 3.7 (code below) with area light I find that the pattern on the
greyscale isn't symmetric. It should be because the area light is offset from
the diffuse reflector along one axis only. So I guess I am doing something
wrong. I tried it with a single spotlight (not area light) too and still got a
non-symmetric pattern so something still not right there.

Any thoughts on what I might be doing wrong?
Thanks

#local p_start  = 0.1;
#local p_end_final = 0.05;


#local final_eb  = 0.2;
#local final_count = 50000;

#macro PhotonTarget(Reflect, Refract, IgnorePhotons)
 photons {
  target
  reflection Reflect
  refraction Refract
  #if(IgnorePhotons) collect off #end
 }
#end

global_settings{

assumed_gamma 1.0

photons{count 900000 max_trace_level 15 adc_bailout 0}


radiosity
{
    pretrace_start p_start
    pretrace_end   p_end_final


    count final_count
    low_error_factor .05

    nearest_count 1

    error_bound final_eb


    recursion_limit 10

    minimum_reuse 0.001
    gray_threshold 1
    normal on

    adc_bailout 0.00001

   }
}


#include "colors.inc"
#include "textures.inc"




#declare a=0.01; //height of diffuse reflector


#declare ahor=1.3; // width of diffuse reflector
#declare aver=ahor;// height of """"

#declare bhor=1.3; // width of area light
#declare bver=bhor;// height of """"

#declare chor=1000; // width of perfect mirror surface
#declare cver=chor;//  height of """"


#declare axp=2.4; //x position, centre of area light
#declare bxp=0;   //y position, centre of area light

#declare ayp=0;   //x position, centre of diffuse reflector
#declare byp=0;   //y position, centre of diffuse reflector

#declare zv1=0.95; // position of first face of partially
transmissing/reflecting slab
#declare zv2=0.95; // thickness of partially transmissing/reflecting slab

#declare p=a+.01; // position of camera in front of diffuse reflecting square
#declare FoVortho =  degrees(2*atan(bhor/(2*(p-a))));       // FoV of
orthographic cam used to view diffuse square



camera {orthographic location <0,0,p> look_at <0,0,a> up <0,1,0> right <1,0,0>
angle FoVortho}


  // TheLight

 light_source {
    <axp, ayp, a+.1>
    rgb<1000,1000,1000>
    spotlight
    radius 38
    falloff 41
    tightness 100
    //area_illumination on
    area_light <ahor, 0, 0>, <0, aver, 0>, 20, 20
    adaptive 5
    jitter
    point_at <axp, ayp, a+zv1>
  }



//TheDiffuseReflector
box {<-bhor/2+bxp,-bver/2+byp,0>,<bhor/2+bxp,bver/2+byp,a>
    texture {
      finish { emission 0 ambient 0 diffuse 1.0 specular 0 conserve_energy}
pigment {color rgbt<1,1,1,0>}
    }
    scale 1.0 rotate <0,0,0> no_radiosity
    PhotonTarget(yes, no, no)

}

// TheFlatIdealMirror
box {<-chor/2+0,-cver/2+0,-0.1>,<chor/2+0,cver/2+0,-0.01>
    texture {
      finish { emission 0 ambient 0 diffuse 0 reflection{1.0} conserve_energy}
pigment {color rgbt<1,1,1,0>}
    }
    scale 1.0 rotate <0,0,0>
    PhotonTarget(yes, no, no)

}

// ThePartialReflectTransmitLayer
box {<-chor/2+0,-cver/2+0,a+zv1>,<chor/2+0,cver/2+0,a+zv1+zv2>
    texture {
      finish { emission 0 ambient 0 diffuse 0 reflection{0.02} conserve_energy}
pigment {color rgbt<1,1,1,0.98>}
    }
    scale 1.0 rotate <0,0,0>
    interior { ior 2.4 }
    PhotonTarget(yes, yes, no)

}


Post a reply to this message

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