POV-Ray : Newsgroups : povray.newusers : Just testing reflection in POVRay but cannot make to work : Just testing reflection in POVRay but cannot make to work Server Time
29 Jul 2024 02:27:48 EDT (-0400)
  Just testing reflection in POVRay but cannot make to work  
From: Saimazoom
Date: 19 Nov 2006 12:00:00
Message: <web.45608d5520a99b7cb670dc70@news.povray.org>
Hi

 I'm not really new to POVRAY, but it is a log time since the last time I
used it(1.x) and it seems that I forgot something important, because I
cannot make this simple scene to work.

 In the scene I have a plane, and on top of the plane a pyramid with a
parallel light hitting one of the faces. I've added a translucent plane on
top of everything just to watch the reflection of the light in the side of
the pyramid going trought this second plane. But there is no reflection at
all.

 The code is as follows:

---------------------------------------------
#version 3.6

#include "colors.inc"

#declare Photons=on;

global_settings {
  assumed_gamma 1.0
  //radiosity {brightness 0.3}
  max_trace_level 5
  #if (Photons)          // global photon block
    photons {
      spacing 0.01                 // specify the density of photons
      //count 100000               // alternatively use a total number of
photons
      //gather min, max            // amount of photons gathered during
render [20, 100]
      //media max_steps [,factor]  // media photons
      //jitter 1.0                 // jitter phor photon rays
      //max_trace_level 5          // optional separate max_trace_level
      //adc_bailout 1/255          // see global adc_bailout
      //save_file "filename"       // save photons to file
      //load_file "filename"       // load photons from file
      //autostop 0                 // photon autostop option
      //radius 10                  // manually specified search radius
      // (---Adaptive Search Radius---)
      //steps 1
      //expand_thresholds 0.2, 40
    }

  #end
}

// ------------------------------------------------------------

// ... Parallel source light ...
light_source {
  <5,20,0>       // light's position
  color White      // light's color
  cylinder
  radius 20
  parallel
  point_at <5, 0, 0>      // direction of spotlight
  area_light <1, 0, 0>, <0, 0, 1>, 2, 2
  adaptive 1
  jitter
  tightness 1            // tightness of falloff (1...100) lower is softer,
higher is tighter
  falloff 1               // intensity falloff radius (outer, in degrees)
  photons {           // photon block for a light source
    refraction on
    reflection on
  }
}


// ------------------------------------------------------------

//--------------------------------------------------------- Pyramid_N macro
#macro Pyramid_N (N, Radius1, Radius2, Height)
//-------------------------------------------------------------------------
#local D= 0.00001;

intersection{
 #local Nr = 0;    // start
 #local EndNr = N; // end
 #while (Nr < EndNr)

  // linear prism in z-direction:
  prism { -2.00 ,2.00 , 5 // from z1, to z2 , number of points (first =
last)
         <-2.00, 0.00>, < 1.00,  0.00>,
         < 0.00+Radius2/Radius1,1.00>,
         <-2.00,1.00>, <-2.00, 0.00>
         rotate<-90,0,0> scale<1,1,-1> //turns prism in z direction!
         scale <Radius1+Nr*D,Height+Nr*D,Radius1+Nr*D>
         rotate<0,Nr * 360/EndNr,0>
     } // end of prism ----------------------------------------------------

 #local Nr = Nr + 1;    // next Nr
 #end // ----------------  end of loop
} // end of intersection

#end // ------------------------------------------------------ end of macro


// ------------------------------------------------------------


camera {

  location  <0,50,0>
  look_at   <0,0,0>
}


plane {
  y, 1

 texture {
    pigment { color rgb <1, 1, 1> }
  }
  photons {
  reflection on
  refraction on
  }
}


plane {
  y, 20
 texture {
    pigment { color rgbt <0, 1, 0, 0.8> }
  }
  photons {
  reflection on
  refraction on
  }
}

object {
    #Pyramid_N (4,10,0,5)
    translate <0 1 0>
    texture {
        pigment { color Blue }
    }
    finish {
    reflection { 0.5 }
    }

    photons
    {
    reflection on
    refraction on
    }
}


-----------------------------------------------------------------------


Post a reply to this message

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