POV-Ray : Newsgroups : povray.beta-test : Photon Problems : Photon Problems Server Time
30 Jul 2024 18:10:26 EDT (-0400)
  Photon Problems  
From: Slime
Date: 10 Oct 2001 18:50:17
Message: <3bc4d0a9$1@news.povray.org>
I tried to render an image that had previously worked OK in beta 4 (never
rendered with beta 5). The media photons are behaving very strangely. Here
are the problems with the scene at the end of this post:

1. trying to load a saved photon map containing media photons gives an error
saying the file can't be opened. This is inconsistent, though, so it might
be due to memory problems.

2. Rendering the file makes the image strangely bright (close to white).
This is strange, since rendering it without photons doesn't make it nearly
that bright.

3. Uncommenting "no_shadow" in the third-to-last object in the scene makes
the scene darker. I can't figure out why.

- Slime
[ http://www.slimeland.com/ ]
[ http://www.slimeland.com/images/ ]

// the scene works like this:
// there's a triangular prism in front of the camera; one of the points is
behind the camera, so every ray out of the camera travels through the
majority of the prism.
// I could have used a plane, but the prism makes photon shooting faster.
The top of this prism has a normal map, and the entire prism is hollow with
an ior of 1.33.
// Inside that prism is an identical one that doesn't extend as far away
from the camera. It is completely transparent everywhere, and hollow with an
ior of 1.33. It contains
// media with "collect on" to interact with photons. If no_shadow is
uncommented inside it, things get very dark.

global_settings {
 photons {
  //spacing .2
  count 200000 // another 0 perhaps
  media 150 // comment out this line and things work fine, except that media
doesn't have photons, of course.
  save_file "photonsofdeath.ph"
  //load_file "photonsofdeath.ph" // doesn't seem to work...
 }
 max_trace_level 100
}

camera {
 location <0,0,0>
 look_at .0000001*y+z*10
}

light_source {
 <.6,.7,.4>*9999
 rgb 1

 photons {
  refraction on
  reflection on
 }
}

#declare waterenddist = 100;
#declare sidefactor = 13/16;
#declare padding = 10;

#declare waterinterior = prism { // big triangle, covers the camera's
visible area as far out as waterenddist
 linear_sweep
 linear_spline
 -10,10.0005,
 4,

<0,-padding>,<-(waterenddist+padding)*sidefactor,waterenddist>,<(waterenddis
t+padding)*sidefactor,waterenddist>,<0,-padding>
 pigment {rgbt 1}
}

#declare watertex = texture {
 pigment {
  rgbt <1,1,1,.7>
 }
 normal {
  wrinkles
  scale 2
  bump_size .5
 }
}
intersection {
 object {waterinterior}
 plane {
  y,10
  texture {
   watertex
  }
 }

 interior {
  ior 1.33
  /*media {
   scattering {1,.05} // .02 - old
   collect on
  }*/
  // media is now specified below, in an object inside this one that's not
quite as big.
  // THE PROBLEM DOES NOT APPEAR if this block is used instead of the
intersection below. But I have reasons for wanting to use the intersection.
 }
 hollow

 photons {
  target
  refraction on
  reflection off
  collect off
 }
}

intersection { // close portion of the water, contains media.
 object {waterinterior}
 plane {z,20}

 translate <0,-.001,-.001>

 pigment {
  rgbt 1
 }

 interior {
  ior 1.33
  media {
   scattering {1,.05} // .02
   collect on
  }
 }
 hollow
 //no_shadow // this makes things *darker* when uncommented. Huh?
}

#declare groundtex = texture {
 pigment {
  rgb <.8,.7,.3>
 }
 normal {
  granite
  bump_size .2
  scale 20
  scale 5
 }
}
plane { // ground
 y,-9.99//7.3
 texture {
  groundtex
 }
}


Post a reply to this message

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