Sample scenes
box_cyl_opaque_shadow.ray
box_cyl_reflect.ray
box_cyl_transp_shadow.ray
box_dist_atten.ray
cylinder_refract.ray
cyl_ambient.ray
cyl_diffuse.ray
cyl_diff_spec.ray
cyl_emissive.ray
recurse_depth.ray
sphere_refract.ray
texture_map.ray
Download as a group

recurse_depth.ray

Purpose: Test recursion on a scene with multiple levels of depth

Settings:

Recursive depth10

Image:

Code:

SBT-raytracer 1.0

// purpose: Test recursion on a scene with multiple levels of depth
// depth: 10

// This was rendered with the following attenuation
// settings:
// Distance scale: 0.000        OR   1.87
// Constant term:  0.25         OR   0.25
// Linear term:    0.0033724    OR   0.25
// Quadratic term: 0.00004592   OR   0.25

camera {
  position=( 5.45747,3.76998,-3.59695 );
  viewdir=( -0.764302,-0.392387,0.511737 );
  updir=( -0.331679,0.919753,0.209865 );
  fov=45;
}
point_light {
  position=( 2.47975,3.75486,-4.72242 );
  color=( 0.631513,0.625613,1 );
}
point_light {
  position=( 7.30154,3.91592,-0.313475 );
  color=( 1,0.507951,0.490585 );
}
directional_light {
  direction=( -0.764302,-0.392387,0.511737 );
  color=( 1,1,1 );
}
polymesh {
  name="";
  material={
    diffuse=( 0.7,0.7,0.7);
    ambient=( 0.2,0.2,0.2);
    specular=( 0,0,0);
    emissive=( 0,0,0);
    shininess=0.2;
    transmissive=( 0,0,0 );
  };
   points=( ( -9.22972,0.68411,7.30672 ),( -9.22972,-1.31589,7.30672 ),( -7.22972,-1.31589,7.30672 ),( -9.22972,0.68411,7.30672 ),( -7.22972,-1.31589,7.30672 ),( -7.22972,0.68411,7.30672 ),( -9.22972,0.68411,-7.49376 ),( -7.22972,0.68411,-7.49376 ),( -7.22972,-1.31589,-7.49376 ),( -9.22972,0.68411,-7.49376 ),( -7.22972,-1.31589,-7.49376 ),( -9.22972,-1.31589,-7.49376 ),( -9.22972,0.68411,7.30672 ),( -9.22972,0.68411,-7.49376 ),( -9.22972,-1.31589,-7.49376 ),( -9.22972,0.68411,7.30672 ),( -9.22972,-1.31589,-7.49376 ),( -9.22972,-1.31589,7.30672 ),( -7.22972,0.68411,7.30672 ),( -7.22972,-1.31589,7.30672 ),( -7.22972,-1.31589,-7.49376 ),( -7.22972,0.68411,7.30672 ),( -7.22972,-1.31589,-7.49376 ),( -7.22972,0.68411,-7.49376 ),( -9.22972,0.68411,7.30672 ),( -7.22972,0.68411,7.30672 ),( -7.22972,0.68411,-7.49376 ),( -9.22972,0.68411,7.30672 ),( -7.22972,0.68411,-7.49376 ),( -9.22972,0.68411,-7.49376 ),( -9.22972,-1.31589,7.30672 ),( -9.22972,-1.31589,-7.49376 ),( -7.22972,-1.31589,-7.49376 ),( -9.22972,-1.31589,7.30672 ),( -7.22972,-1.31589,-7.49376 ),( -7.22972,-1.31589,7.30672 )  );
   faces=( ( 0,1,2),( 3,4,5),( 6,7,8),( 9,10,11),( 12,13,14),( 15,16,17),( 18,19,20),( 21,22,23),( 24,25,26),( 27,28,29),( 30,31,32),( 33,34,35)  );
  }
polymesh {
  name="";
  material={
    diffuse=( 0.5,0,0);
    ambient=( 0.2,0.2,0.2);
    specular=( 0,0,0);
    emissive=( 0,0,0);
    shininess=0.2;
    transmissive=( 0,0,0 );
  };
   points=( ( 1.10973,1.59225,1.41654 ),( 0.883627,1.50968,1.46927 ),( 2.01407,-1.0298,2.34018 ),( 1.10973,1.59225,1.41654 ),( 2.01407,-1.0298,2.34018 ),( 2.24017,-0.947233,2.28745 ),( 1.08845,1.50419,1.18738 ),( 2.21889,-1.03529,2.05829 ),( 1.99279,-1.11786,2.11102 ),( 1.08845,1.50419,1.18738 ),( 1.99279,-1.11786,2.11102 ),( 0.862348,1.42162,1.24011 ),( 1.10973,1.59225,1.41654 ),( 1.08845,1.50419,1.18738 ),( 0.862348,1.42162,1.24011 ),( 1.10973,1.59225,1.41654 ),( 0.862348,1.42162,1.24011 ),( 0.883627,1.50968,1.46927 ),( 2.24017,-0.947233,2.28745 ),( 2.01407,-1.0298,2.34018 ),( 1.99279,-1.11786,2.11102 ),( 2.24017,-0.947233,2.28745 ),( 1.99279,-1.11786,2.11102 ),( 2.21889,-1.03529,2.05829 ),( 1.10973,1.59225,1.41654 ),( 2.24017,-0.947233,2.28745 ),( 2.21889,-1.03529,2.05829 ),( 1.10973,1.59225,1.41654 ),( 2.21889,-1.03529,2.05829 ),( 1.08845,1.50419,1.18738 ),( 0.883627,1.50968,1.46927 ),( 0.862348,1.42162,1.24011 ),( 1.99279,-1.11786,2.11102 ),( 0.883627,1.50968,1.46927 ),( 1.99279,-1.11786,2.11102 ),( 2.01407,-1.0298,2.34018 )  );
   faces=( ( 0,1,2),( 3,4,5),( 6,7,8),( 9,10,11),( 12,13,14),( 15,16,17),( 18,19,20),( 21,22,23),( 24,25,26),( 27,28,29),( 30,31,32),( 33,34,35)  );
  }
polymesh {
  name="";
  material={
    diffuse=( 0,0.5,0);
    ambient=( 0.2,0.2,0.2);
    specular=( 0,0,0);
    emissive=( 0,0,0);
    shininess=0.2;
    transmissive=( 0,0,0 );
  };
   points=( ( 1.75036,1.08025,1.19355 ),( 1.56586,1.23536,1.24476 ),( -0.0563729,-0.999873,2.17072 ),( 1.75036,1.08025,1.19355 ),( -0.0563729,-0.999873,2.17072 ),( 0.128124,-1.15498,2.11952 ),( 1.66176,1.05012,0.965601 ),( 0.039529,-1.18512,1.89156 ),( -0.144968,-1.03001,1.94277 ),( 1.66176,1.05012,0.965601 ),( -0.144968,-1.03001,1.94277 ),( 1.47727,1.20523,1.0168 ),( 1.75036,1.08025,1.19355 ),( 1.66176,1.05012,0.965601 ),( 1.47727,1.20523,1.0168 ),( 1.75036,1.08025,1.19355 ),( 1.47727,1.20523,1.0168 ),( 1.56586,1.23536,1.24476 ),( 0.128124,-1.15498,2.11952 ),( -0.0563729,-0.999873,2.17072 ),( -0.144968,-1.03001,1.94277 ),( 0.128124,-1.15498,2.11952 ),( -0.144968,-1.03001,1.94277 ),( 0.039529,-1.18512,1.89156 ),( 1.75036,1.08025,1.19355 ),( 0.128124,-1.15498,2.11952 ),( 0.039529,-1.18512,1.89156 ),( 1.75036,1.08025,1.19355 ),( 0.039529,-1.18512,1.89156 ),( 1.66176,1.05012,0.965601 ),( 1.56586,1.23536,1.24476 ),( 1.47727,1.20523,1.0168 ),( -0.144968,-1.03001,1.94277 ),( 1.56586,1.23536,1.24476 ),( -0.144968,-1.03001,1.94277 ),( -0.0563729,-0.999873,2.17072 )  );
   faces=( ( 0,1,2),( 3,4,5),( 6,7,8),( 9,10,11),( 12,13,14),( 15,16,17),( 18,19,20),( 21,22,23),( 24,25,26),( 27,28,29),( 30,31,32),( 33,34,35)  );
  }
polymesh {
  name="";
  material={
    diffuse=( 0,0,0.5);
    ambient=( 0.2,0.2,0.2);
    specular=( 0,0,0);
    emissive=( 0,0,0);
    shininess=0.2;
    transmissive=( 0,0,0 );
  };
   points=( ( 1.44495,1.30329,1.33211 ),( 1.20455,1.3574,1.33299 ),( 0.631632,-1.1662,-0.00437981 ),( 1.44495,1.30329,1.33211 ),( 0.631632,-1.1662,-0.00437981 ),( 0.87203,-1.22031,-0.00525898 ),( 1.46903,1.41383,1.1132 ),( 0.896111,-1.10977,-0.224166 ),( 0.655713,-1.05566,-0.223287 ),( 1.46903,1.41383,1.1132 ),( 0.655713,-1.05566,-0.223287 ),( 1.22863,1.46794,1.11408 ),( 1.44495,1.30329,1.33211 ),( 1.46903,1.41383,1.1132 ),( 1.22863,1.46794,1.11408 ),( 1.44495,1.30329,1.33211 ),( 1.22863,1.46794,1.11408 ),( 1.20455,1.3574,1.33299 ),( 0.87203,-1.22031,-0.00525898 ),( 0.631632,-1.1662,-0.00437981 ),( 0.655713,-1.05566,-0.223287 ),( 0.87203,-1.22031,-0.00525898 ),( 0.655713,-1.05566,-0.223287 ),( 0.896111,-1.10977,-0.224166 ),( 1.44495,1.30329,1.33211 ),( 0.87203,-1.22031,-0.00525898 ),( 0.896111,-1.10977,-0.224166 ),( 1.44495,1.30329,1.33211 ),( 0.896111,-1.10977,-0.224166 ),( 1.46903,1.41383,1.1132 ),( 1.20455,1.3574,1.33299 ),( 1.22863,1.46794,1.11408 ),( 0.655713,-1.05566,-0.223287 ),( 1.20455,1.3574,1.33299 ),( 0.655713,-1.05566,-0.223287 ),( 0.631632,-1.1662,-0.00437981 )  );
   faces=( ( 0,1,2),( 3,4,5),( 6,7,8),( 9,10,11),( 12,13,14),( 15,16,17),( 18,19,20),( 21,22,23),( 24,25,26),( 27,28,29),( 30,31,32),( 33,34,35)  );
  }
polymesh {
  name="";
  material={
    diffuse=( 0.46,0.47,0.09);
    ambient=( 0.2,0.2,0.2);
    specular=( 0,0,0);
    emissive=( 0,0,0);
    shininess=0.2;
    transmissive=( 0.8,0.8,0.8 );
  index = 1.5;
  };
   points=( ( -2.30974,2.25869,0.150629 ),( -2.30974,1.81435,0.150629 ),( -1.8654,1.81435,0.150629 ),( -2.30974,2.25869,0.150629 ),( -1.8654,1.81435,0.150629 ),( -1.8654,2.25869,0.150629 ),( -2.30974,2.25869,-0.293705 ),( -1.8654,2.25869,-0.293705 ),( -1.8654,1.81435,-0.293705 ),( -2.30974,2.25869,-0.293705 ),( -1.8654,1.81435,-0.293705 ),( -2.30974,1.81435,-0.293705 ),( -2.30974,2.25869,0.150629 ),( -2.30974,2.25869,-0.293705 ),( -2.30974,1.81435,-0.293705 ),( -2.30974,2.25869,0.150629 ),( -2.30974,1.81435,-0.293705 ),( -2.30974,1.81435,0.150629 ),( -1.8654,2.25869,0.150629 ),( -1.8654,1.81435,0.150629 ),( -1.8654,1.81435,-0.293705 ),( -1.8654,2.25869,0.150629 ),( -1.8654,1.81435,-0.293705 ),( -1.8654,2.25869,-0.293705 ),( -2.30974,2.25869,0.150629 ),( -1.8654,2.25869,0.150629 ),( -1.8654,2.25869,-0.293705 ),( -2.30974,2.25869,0.150629 ),( -1.8654,2.25869,-0.293705 ),( -2.30974,2.25869,-0.293705 ),( -2.30974,1.81435,0.150629 ),( -2.30974,1.81435,-0.293705 ),( -1.8654,1.81435,-0.293705 ),( -2.30974,1.81435,0.150629 ),( -1.8654,1.81435,-0.293705 ),( -1.8654,1.81435,0.150629 )  );
   faces=( ( 0,1,2),( 3,4,5),( 6,7,8),( 9,10,11),( 12,13,14),( 15,16,17),( 18,19,20),( 21,22,23),( 24,25,26),( 27,28,29),( 30,31,32),( 33,34,35)  );
  }
polymesh {
  name="";
  material={
    diffuse=( 0.09,0.44,0.45);
    ambient=( 0.2,0.2,0.2);
    specular=( 0,0,0);
    emissive=( 0,0,0);
    shininess=0.2;
    transmissive=( 0.6,0.6,0.6 );
  index = 1.5;
  };
   points=( ( -2.58748,1.79018,0.435478 ),( -2.58748,0.919224,0.435478 ),( -1.71652,0.919224,0.435478 ),( -2.58748,1.79018,0.435478 ),( -1.71652,0.919224,0.435478 ),( -1.71652,1.79018,0.435478 ),( -2.58748,1.79018,-0.435474 ),( -1.71652,1.79018,-0.435474 ),( -1.71652,0.919224,-0.435474 ),( -2.58748,1.79018,-0.435474 ),( -1.71652,0.919224,-0.435474 ),( -2.58748,0.919224,-0.435474 ),( -2.58748,1.79018,0.435478 ),( -2.58748,1.79018,-0.435474 ),( -2.58748,0.919224,-0.435474 ),( -2.58748,1.79018,0.435478 ),( -2.58748,0.919224,-0.435474 ),( -2.58748,0.919224,0.435478 ),( -1.71652,1.79018,0.435478 ),( -1.71652,0.919224,0.435478 ),( -1.71652,0.919224,-0.435474 ),( -1.71652,1.79018,0.435478 ),( -1.71652,0.919224,-0.435474 ),( -1.71652,1.79018,-0.435474 ),( -2.58748,1.79018,0.435478 ),( -1.71652,1.79018,0.435478 ),( -1.71652,1.79018,-0.435474 ),( -2.58748,1.79018,0.435478 ),( -1.71652,1.79018,-0.435474 ),( -2.58748,1.79018,-0.435474 ),( -2.58748,0.919224,0.435478 ),( -2.58748,0.919224,-0.435474 ),( -1.71652,0.919224,-0.435474 ),( -2.58748,0.919224,0.435478 ),( -1.71652,0.919224,-0.435474 ),( -1.71652,0.919224,0.435478 )  );
   faces=( ( 0,1,2),( 3,4,5),( 6,7,8),( 9,10,11),( 12,13,14),( 15,16,17),( 18,19,20),( 21,22,23),( 24,25,26),( 27,28,29),( 30,31,32),( 33,34,35)  );
  }
polymesh {
  name="";
  material={
    diffuse=( 0.46,0.14,0.44);
    ambient=( 0.2,0.2,0.2);
    specular=( 0,0,0);
    emissive=( 0,0,0);
    shininess=0.2;
    transmissive=( 0.4,0.4,0.4 );
  index = 1.5;
  };
   points=( ( -3.07588,0.929986,0.993422 ),( -3.08923,-1.06993,1.00537 ),( -1.08927,-1.08328,1.00654 ),( -3.07588,0.929986,0.993422 ),( -1.08927,-1.08328,1.00654 ),( -1.07592,0.916642,0.994592 ),( -3.07479,0.918028,-1.00654 ),( -1.07483,0.904684,-1.00537 ),( -1.08818,-1.09524,-0.993422 ),( -3.07479,0.918028,-1.00654 ),( -1.08818,-1.09524,-0.993422 ),( -3.08814,-1.08189,-0.994592 ),( -3.07588,0.929986,0.993422 ),( -3.07479,0.918028,-1.00654 ),( -3.08814,-1.08189,-0.994592 ),( -3.07588,0.929986,0.993422 ),( -3.08814,-1.08189,-0.994592 ),( -3.08923,-1.06993,1.00537 ),( -1.07592,0.916642,0.994592 ),( -1.08927,-1.08328,1.00654 ),( -1.08818,-1.09524,-0.993422 ),( -1.07592,0.916642,0.994592 ),( -1.08818,-1.09524,-0.993422 ),( -1.07483,0.904684,-1.00537 ),( -3.07588,0.929986,0.993422 ),( -1.07592,0.916642,0.994592 ),( -1.07483,0.904684,-1.00537 ),( -3.07588,0.929986,0.993422 ),( -1.07483,0.904684,-1.00537 ),( -3.07479,0.918028,-1.00654 ),( -3.08923,-1.06993,1.00537 ),( -3.08814,-1.08189,-0.994592 ),( -1.08818,-1.09524,-0.993422 ),( -3.08923,-1.06993,1.00537 ),( -1.08818,-1.09524,-0.993422 ),( -1.08927,-1.08328,1.00654 )  );
   faces=( ( 0,1,2),( 3,4,5),( 6,7,8),( 9,10,11),( 12,13,14),( 15,16,17),( 18,19,20),( 21,22,23),( 24,25,26),( 27,28,29),( 30,31,32),( 33,34,35)  );
  }
polymesh {
  name="";
  material={
    diffuse=( 0.3,0.3,0.3);
    ambient=( 0.2,0.2,0.2);
    specular=( 0.6,0.6,0.6);
    emissive=( 0,0,0);
    shininess=1;
    transmissive=( 0,0,0 );
  };
   points=( ( -7.68088,-1.19552,7.61871 ),( -7.68088,-1.48112,7.61871 ),( 7.55654,-1.48112,7.61871 ),( -7.68088,-1.19552,7.61871 ),( 7.55654,-1.48112,7.61871 ),( 7.55654,-1.19552,7.61871 ),( -7.68088,-1.19552,-7.61871 ),( 7.55654,-1.19552,-7.61871 ),( 7.55654,-1.48112,-7.61871 ),( -7.68088,-1.19552,-7.61871 ),( 7.55654,-1.48112,-7.61871 ),( -7.68088,-1.48112,-7.61871 ),( -7.68088,-1.19552,7.61871 ),( -7.68088,-1.19552,-7.61871 ),( -7.68088,-1.48112,-7.61871 ),( -7.68088,-1.19552,7.61871 ),( -7.68088,-1.48112,-7.61871 ),( -7.68088,-1.48112,7.61871 ),( 7.55654,-1.19552,7.61871 ),( 7.55654,-1.48112,7.61871 ),( 7.55654,-1.48112,-7.61871 ),( 7.55654,-1.19552,7.61871 ),( 7.55654,-1.48112,-7.61871 ),( 7.55654,-1.19552,-7.61871 ),( -7.68088,-1.19552,7.61871 ),( 7.55654,-1.19552,7.61871 ),( 7.55654,-1.19552,-7.61871 ),( -7.68088,-1.19552,7.61871 ),( 7.55654,-1.19552,-7.61871 ),( -7.68088,-1.19552,-7.61871 ),( -7.68088,-1.48112,7.61871 ),( -7.68088,-1.48112,-7.61871 ),( 7.55654,-1.48112,-7.61871 ),( -7.68088,-1.48112,7.61871 ),( 7.55654,-1.48112,-7.61871 ),( 7.55654,-1.48112,7.61871 )  );
   faces=( ( 0,1,2),( 3,4,5),( 6,7,8),( 9,10,11),( 12,13,14),( 15,16,17),( 18,19,20),( 21,22,23),( 24,25,26),( 27,28,29),( 30,31,32),( 33,34,35)  );
  }