POV-Ray : Newsgroups : povray.newusers : Translate problem (photons) Server Time
31 Oct 2024 22:24:03 EDT (-0400)
  Translate problem (photons) (Message 1 to 3 of 3)  
From: Crippso
Subject: Translate problem (photons)
Date: 12 Apr 2012 16:40:00
Message: <web.4f873cc7cdf0452a130037650@news.povray.org>
Hi there, I have found something strange when using 'translate' to move an
object and viewing it using photons. My code is below. Near the end I draw the
'monolayer' shape and translate it by <5,0,0>. However povray returns a black
image. With translate <0,0,0> I get the expected result.

Am I doing something wrong?
Thanks,
Stu

#declare extent = 200;
#default {finish {ambient 0 diffuse 0}}

global_settings
{
   assumed_gamma 1

   photons{count 200000000 max_trace_level 20 adc_bailout 1e-6 jitter 0 gather
5000,8000}
}

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

light_source{<0,0,2>, 1 cylinder radius 50 falloff 50 tightness 0 point_at
<0,0,8>}

camera
{
   orthographic
   location <0,0,1>
   up <0,120,0>
   right <160,0,0>
   //angle 30
   look_at  <0,0,0.5>

}


#declare monolayer =

object{

box
{
   <-extent,-extent,8> <extent,extent,10>
   pigment{rgbt 1}
   finish
   {
     reflection{0,1 fresnel}
     conserve_energy
   }
   interior{ior 3.2}
   PhotonTarget(yes, yes, no)
}

}

object{monolayer translate <5,0,0>}

disc
{
   <0,0,-10> <0,0,1> 100
   pigment{rgb 1}
   finish{diffuse 1.0}
}


Post a reply to this message

From: Alain
Subject: Re: Translate problem (photons)
Date: 13 Apr 2012 18:32:34
Message: <4f88a982@news.povray.org>

> Hi there, I have found something strange when using 'translate' to move an
> object and viewing it using photons. My code is below. Near the end I draw the
> 'monolayer' shape and translate it by<5,0,0>. However povray returns a black
> image. With translate<0,0,0>  I get the expected result.
>
> Am I doing something wrong?
> Thanks,
> Stu
>
> #declare extent = 200;
> #default {finish {ambient 0 diffuse 0}}
>
> global_settings
> {
>     assumed_gamma 1
>
>     photons{count 200000000 max_trace_level 20 adc_bailout 1e-6 jitter 0 gather
> 5000,8000}
> }
>
> #macro PhotonTarget(Reflect, Refract, IgnorePhotons)
>   photons {
>    target
>    reflection Reflect
>    refraction Refract
>    #if(IgnorePhotons) collect off #end
>   }
> #end
>
> light_source{<0,0,2>, 1 cylinder radius 50 falloff 50 tightness 0 point_at
> <0,0,8>}
>
> camera
> {
>     orthographic
>     location<0,0,1>
>     up<0,120,0>
>     right<160,0,0>
>     //angle 30
>     look_at<0,0,0.5>
>
> }
>
>
> #declare monolayer =
>
> object{
>
> box
> {
>     <-extent,-extent,8>  <extent,extent,10>
>     pigment{rgbt 1}
>     finish
>     {
>       reflection{0,1 fresnel}
>       conserve_energy
>     }
>     interior{ior 3.2}
>     PhotonTarget(yes, yes, no)
> }
>
> }
>
> object{monolayer translate<5,0,0>}
>
> disc
> {
>     <0,0,-10>  <0,0,1>  100
>     pigment{rgb 1}
>     finish{diffuse 1.0}
> }
>
>

Your light is located at z=2 and shine toward z=8, or +Z
Your camera is located at z=1 and looks toward z=0.5, or -Z
So, the light shine away from the camera.
The object moniolayer is situated at z=8, so far, so good.
The light hit it perpendicularly, meaning that the relfection is zero: 
reflection{0, ...}.
There is nothing at all to illuminate the disc, so, you only see black. 
The translate of 5 units along the x axis been smaller than the extent 
of 200 of monolayer is negligeable and should have no effect at all.

In fact, you should NOT see anything but black with or without the 
translate... At least, that's what I expect after looking at your scene.

Also, if you use version 3.7 RC5, photons reflection have been 
accidently disabled/broken when fixing iridencence.



Alain


Post a reply to this message

From: Crippso
Subject: Re: Translate problem (photons)
Date: 14 Apr 2012 05:05:01
Message: <web.4f893cfc78947b38130037650@news.povray.org>
Thanks Alain,

but with translate <0,0,0> I do get the correct fresnel reflection (I am using
3.7 RC3).  For normal incidence the reflection shouldnt be zero, it should
actually be quite high because of going from ior 1 to ior 3.2.

that was why i was suprised that changing translate had any effect, maybe its a
bug?


Post a reply to this message

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