POV-Ray : Newsgroups : povray.general : Photon - Cornell Box : Photon - Cornell Box Server Time
4 Aug 2024 20:13:18 EDT (-0400)
  Photon - Cornell Box  
From: WhiteZebra
Date: 20 Feb 2003 01:55:08
Message: <web.3e547aa166b09a13fbe3eac40@news.povray.org>
I'm trying to code the cornell box but using Photons Mapping instead of
radiosity. So far, no success. I've got all my photons{} blocs in my
global, light and objects. The scene is very simple but all I get is
essentially the same render as with ray-trace only.

Can anybody suggest something I might have missed?

Thanks.

Here is the scene file:

global_settings {
  assumed_gamma 1.0
  max_trace_level 5
  photons {
    count 100000
    max_trace_level 9
  }
}

#declare Finish=finish{diffuse 0.75 ambient 0}

#declare White=texture{pigment{rgb<1,1,1>} finish{Finish}}
#declare Red=texture{pigment{rgb<0.57,0.025,0.025>} finish{Finish}}
#declare Green=texture{pigment{rgb<0.025,0.236,0.025>} finish{Finish}}

#declare LightColor=<1,0.67,0.21>;


light_source{
  <27.8,54.88,27.95>
  color LightColor
  spotlight radius -90 falloff 90 tightness 1 point_at <27.8,0,27.95> // for
cosine falloff
  photons {
    refraction on
    reflection yes
  }
}


camera{
  location  <27.8, 27.3,-80.0>
  direction <0, 0, 1>
  up        <0, 1, 0>
  right     <-1, 0, 0>
  angle 39.5
}


// ------------------------ OBJECTS ----------------------------

// Light Patch
box{
  <21.3,54.87,33.2><34.3,54.88,22.7> no_shadow
  pigment{rgb<1,1,1>} finish{ambient 0.78 diffuse 1}
  photons {
    target
    refraction off
    reflection yes
    collect off
  }
}

union{
  // Floor
  triangle{<55.28, 0.0, 0.0>,<0.0, 0.0, 0.0>,<0.0, 0.0, 55.92>}
  triangle{<55.28, 0.0, 0.0>,<0.0, 0.0, 55.92>,<54.96, 0.0, 55.92>}
  // Ceiling
  triangle{<55.60, 54.88, 0.0>,<55.60, 54.88, 55.92>,<0.0, 54.88, 55.92>}
  triangle{<55.60, 54.88, 0.0>,<0.0, 54.88, 55.92>,<0.0, 54.88, 0.0>}
  // Back wall
  triangle{<0.0, 54.88, 55.92>,<55.60, 54.88, 55.92>,<54.96, 0.0, 55.92>}
  triangle{<0.0, 54.88, 55.92>,<54.96, 0.0, 55.92>,<0.0, 0.0, 55.92>}
  texture {White}
  split_union off
  photons {
    target 1.0
    refraction off
    reflection yes
    collect off
  }
}

union {
  // Right wall
  triangle{<0.0, 54.88, 0.0>,<0.0, 54.88, 55.92>,<0.0, 0.0, 55.92>}
  triangle{<0.0, 54.88, 0.0>,<0.0, 0.0, 55.92>,<0.0, 0.0, 0.0>}
  texture {Green}
  split_union off
  photons {
    target 1.0
    refraction off
    reflection yes
    collect off
  }
}

union {
  // Left wall
  triangle{<55.28, 0.0, 0.0>,<54.96, 0.0, 55.92>,<55.60, 54.88, 55.92>}
  triangle{<55.28, 0.0, 0.0>,<55.60, 54.88, 55.92>,<55.60, 54.88, 0.0>}
  texture {Red}
  split_union off
  photons {
    target 1.0
    refraction off
    reflection yes
    collect off
  }
}

box {
  // Short bloc
  <-8.35,0,-8.35>,<8.35,16.5,8.35>
  rotate <0,-17,0>
  translate <18.6,0,16.85>
  texture { White }
  photons {
    target 1.0
    refraction off
    reflection yes
    collect off
  }
}


box {
  // Tall bloc
  <-8.35,0,-8.35>,<8.35,33,8.35>
  rotate <0,17,0>
  translate <36.85,0,35.15>
  texture { White }
  photons {
    target 1.0
    refraction off
    reflection yes
    collect off
  }
}

WhiteZebra


Post a reply to this message

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