POV-Ray : Newsgroups : povray.general : Problem with photon mapping : Problem with photon mapping Server Time
2 Aug 2024 10:23:04 EDT (-0400)
  Problem with photon mapping  
From: Yeager
Date: 21 Nov 2004 07:35:00
Message: <web.41a08aa1ee452319510445a30@news.povray.org>
Hi!!

I'm a new user of POV. I looked your FAQ but I didn't find answers to my
problem.

I need to model a cornell box with photon mapping. I used different scenes
gave with pov to do it.

However, my photons in the scene are not always shot and when they are shot,
they don't give good results of global illumination. I don't see any
difference between basic ray tracing and photon mapping?

Following my pov file.

Thank you for your help

Arnaud Lapeyrade

// Persistence Of Vision Ray Tracer Scene Description File
// File: cornell.pov
// Vers: 3.5
// Desc: Radiosity demo scene. See also
http://www.Graphics.Cornell.EDU/online/box/
// Date: August 2001
// Auth: Kari Kivisalo

// +w300 +h300

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

global_settings {
  assumed_gamma 1
  max_trace_level 25

  photons {
    spacing 0.1 // study the photon spacing impact
    count 1000000
    autostop off
    //save_file "D:BOULOT3D_Computer_GraphicsAssignment2map.ph"
  }

}

#declare Finish=finish{diffuse 0.75 ambient 0}

#declare White=texture{pigment{rgb<1,1,1>} finish{Finish}}
#declare Red=texture{pigment{rgb<0.5,0.3,0.01>} finish{Finish}}
#declare Green=texture{pigment{rgb<0.025,0.236,0.1>} finish{Finish}}
#declare Radius = 10;

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

//#declare N=3;       // Divisions per side
//#declare DX=13/N;   // Dimensions of sub patches
//#declare DZ=10.5/N;

/*
light_source {
  <27.8, 54.88, 27.95>
  color rgb <1.0, 1.0, 1.0>
  shadowless

  photons {
    reflection on
    refraction on
  }
}*/



light_source{
    <27.8,54.88,27.95>
    color LightColor
 // area_light <5, 0, 0>, <0, 0, 5>, 5, 5
    adaptive 2

    photons {
    reflection on
    refraction on
    area_light
  }
}


camera{
  location  <27.8, 27.3,-56.0>
  direction <0, 0, 1>
  look_at <27.8, 27.3, 1>
}


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

// Light Patch

sphere {
    <16,10.0,35.0>,Radius

    material {
      texture {
        pigment { color Col_Glass_Clear }
        finish { F_Glass9 }
      }
      interior {
        I_Glass_Exp(4)
      //  fade_color Col_Red_03
      }
    }

    photons {
    reflection on
    refraction on
    collect off
  }
}

union{
  sphere {
    <40.0,10.0,10.0>,Radius

    material {
      texture {
        pigment { color Col_Glass_Clear }
        finish { F_Glass6 }
      }

    }

    photons {
    reflection on
    refraction on
    collect off
  }
  hollow off
  }
}


union{
  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 0}
  }
}

union{
  // Floor
  triangle{<55.28, 0.0, 0.0>,<0.0, 0.0, 0.0>,<0.0, 0.0, 55.92>
          photons {
            target
            reflection off
            refraction off
            collect on
          }
  }

  triangle{<55.28, 0.0, 0.0>,<0.0, 0.0, 55.92>,<54.96, 0.0, 55.92>
          photons {
            target
            reflection off
            refraction off
            collect on
          }
  }

  // Ceiling
  triangle{<55.60, 54.88, 0.0>,<55.60, 54.88, 55.92>,<0.0, 54.88, 55.92>
            photons {
            target
            reflection off
            refraction off
            collect on
          }
  }

  triangle{<55.60, 54.88, 0.0>,<0.0, 54.88, 55.92>,<0.0, 54.88, 0.0>
          photons {
            target
            reflection off
            refraction off
            collect on
          }
  }

  // Back wall
  triangle{<0.0, 54.88, 55.92>,<55.60, 54.88, 55.92>,<54.96, 0.0, 55.92>
          photons {
            target
            reflection off
            refraction off
            collect on
          }
  }

  triangle{<0.0, 54.88, 55.92>,<54.96, 0.0, 55.92>,<0.0, 0.0, 55.92>
          photons {
            target
            reflection off
            refraction off
            collect on
          }
  }

  texture {White}

}

union {
  // Right wall
  triangle{<0.0, 54.88, 0.0>,<0.0, 54.88, 55.92>,<0.0, 0.0, 55.92>
          photons {
            target
            reflection off
            refraction off
            collect on
          }
  }

  triangle{<0.0, 54.88, 0.0>,<0.0, 0.0, 55.92>,<0.0, 0.0, 0.0>
          photons {
            target
            reflection off
            refraction off
            collect on
          }
  }

  texture {Green}
}

union {
  // Left wall
  triangle{<55.28, 0.0, 0.0>,<54.96, 0.0, 55.92>,<55.60, 54.88, 55.92>
          photons {
            target
            reflection off
            refraction off
            collect on
          }
  }

  triangle{<55.28, 0.0, 0.0>,<55.60, 54.88, 55.92>,<55.60, 54.88, 0.0>
          photons {
            target
            reflection off
            refraction off
            collect on
          }
  }

  texture {Red}


}


Post a reply to this message

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