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

box_dist_atten.ray

Purpose: Test for distance attenuation

Settings:

Image:

Code:

SBT-raytracer 1.0

// box_dist_atten.ray
// purpose: Test for distance attenuation

// 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 = (7, 0, 0);
  viewdir = (-1, 0, 0);
  updir = (0, 0, 1);
}

// Point light just above the center of the box.
point_light
{
  position = (0, 0, 1);
  color = (1, 1, 1);
}

// The box forms a plane, which should be noticably
// brighter in the middle than on the edges
translate( 0, 0, -2,
  scale( 15, 15, 1,
    square {
      material = { diffuse = (0, 1, 0); }
  } ) )