POV-Ray : Newsgroups : povray.general : No photons generated for mesh2 objects? : Re: No photons generated for mesh2 objects? Server Time
31 Jul 2024 14:28:01 EDT (-0400)
  Re: No photons generated for mesh2 objects?  
From: Tim Attwood
Date: 6 Jan 2007 20:08:16
Message: <45a04800@news.povray.org>
> Can anybody help?

Without seeing your code it's dificult, because it should
work fine. Here is a sample that works fine with mesh2.

#version 3.6;

#declare Photons=on;

global_settings {
  assumed_gamma 1.0
  max_trace_level 20
  #if (Photons)
    photons { // global photon block
      spacing 0.02
    }
  #end
}
// ----------------------------------------
camera {
  right x*image_width/image_height
  location  <0,1.6,-5>
  look_at   <0,0.75,0>
}
light_source {
  <500,500,150>
  color rgb 1.3
  photons { // photon block for a light
    refraction on
    reflection on
  }
}
sky_sphere {
  pigment {
    gradient y
    color_map {
      [0.0 rgb <0.6,0.7,1.0>]
      [0.7 rgb <0.0,0.1,0.8>]
    }
  }
}
// ----------------------------------------
#declare M_Glass=    // Glass material
material {
  texture {
    pigment {rgbt 1}
    finish {
      ambient 0.0
      diffuse 0.05
      specular 0.6
      roughness 0.005
      reflection {
        0.1, 1.0
        fresnel on
      }
      conserve_energy
    }
  }
  interior {
    ior 1.5
    fade_power 1001
    fade_distance 0.9
    fade_color <0.5,0.8,0.6>
  }
};
#declare tetra = mesh2{
vertex_vectors{
4,
<0,2,0>,
<1.632994,-0.666666,-0.94281>,
<0,-0.66666,1.885618>,
<-1.632994,-0.666666,-0.94281>
}
normal_vectors{
4,
<0,1,-9.392993E-7>,
<0.8164975,-0.3333328,-0.4714033>,
<0,-0.3333322,0.9428094>,
<-0.8164975,-0.3333328,-0.4714033>
}
face_indices{
4,
<0,1,2>,
<0,3,1>,
<2,3,0>,
<1,3,2>
}
normal_indices{
4,
<0,1,2>,
<0,3,1>,
<2,3,0>,
<1,3,2>
}
};
// ----------------------------------------
plane {
  y, 0
  texture {
    pigment { color rgb <1.0, 0.8, 0.6> }
  }
}
object {
   tetra
   rotate <0,180,0>
   translate <1,1,0>
   material { M_Glass }
   photons {  // photon block for an object
    target 1.0
    refraction on
    reflection on
  }
}


Post a reply to this message

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