POV-Ray : Newsgroups : povray.text.scene-files : Cornell box Server Time
23 Dec 2024 15:15:35 EST (-0500)
  Cornell box (Message 1 to 1 of 1)  
From: MikeH
Subject: Cornell box
Date: 3 Sep 2000 23:30:52
Message: <39B31749.9012C8D0@aol.com>
Same scene as in p.b.i minus the inverse square light fading.  The image
needs to be flipped horizontally to match the images I posted.  Output
should be square.

#version unofficial MegaPOV 0.5;

/* the cornell.rib file that comes with BMRT
* converted to pov format by Michael Hough
*/

#include "colors.inc"

camera {
location <278, 273, -800>
up 1*y
right 1*x
look_at <278, 273, 0>
angle 37
}

/*
* Set up a single area light source in the center of the ceiling.
*/


global_settings {
ini_option "+QR"

radiosity {
   pretrace_start 0.16
   pretrace_end 0.01 //0.08
    count 400
    nearest_count 4      // number of samples to average
    error_bound .3      // something about the distance to sample.  .3
to 1 or more, lower slower but more detailed
    recursion_limit 5

    low_error_factor .3
    gray_threshold 0.1
    minimum_reuse 0.015
    brightness 1
    normal on
    //max_sample 1
    //always_sample no

    adc_bailout 0.01/1  // CHANGE - use adc_bailout = 0.01 /
brightest_ambient_object
  }

}


union {

//area_light
light_source {<0, -.01, 0> color rgb 1*<1, .8, .7>
spotlight
falloff 90
radius 90
tightness 1
point_at -1*y
area_light <65*2, 0, 0>, <0, 0, 52.5*2>, 8, 8
//orient
jitter
adaptive 1
}


//radiant patch
polygon {
5,
<65, 0, -52.5>, <65, 0, 52.5>, <-65, 0, 52.5>, <-65, 0, -52.5>,
<65, 0, -52.5>
pigment {color rgb <1, .8, .7>}
finish {ambient 1}
//no_shadow
}

translate <278, 548.8, 279.5>
translate <0, -.1, 0>
}


/**************************************************************************

* Wall Definitions
***************************************************************************/

//Cornell Box Walls

/*
# All surfaces are 1 sided (so we can see through the closest wall)
#Sides 1
Attribute "render" "casts_shadows" "none"
*/

union {

//floor
polygon {
5,
<550, 0, 0>, <0, 0, 0>, <0, 0, 560>, <550, 0, 560>,
<550, 0, 0>
}

//cieling
polygon {
5,
<560, 550, 0>, <560, 550, 560>, <0, 550, 560>, <0, 550, 0.0>,
<560, 550, 0>
}

//back_wall
polygon {
5,
<550, 0, 560>, <0, 0, 560>, <0, 550, 560>, <560, 550, 560>,
<550, 0, 560>
}

//right_wall
polygon {
5,
<0.0, 0, 560>, <0, 0, 0>, <0.0, 550, 0>, <0.0, 550, 560>,
<0, 0, 560>
pigment {color rgb <.15, .5, .15>}
}

//left_wall
polygon {
5,
<550, 0, 0>, <550, 0, 560>, <560, 550, 560>, <560, 550, 0.0>,
<550, 0, 0>
pigment {color rgb <.64, .15, .1>}
}

pigment {color White}
finish {ambient 0 diffuse .75}
no_shadow
}

/**************************************************************************

* Short Box Definition
***************************************************************************/

union {

polygon {
5,
<130.0, 165.0, 65.0>, <82.0 165.0 225.0>, <240.0 165.0 272.0>,
<290.0 165.0 114.0>, <130.0, 165.0, 65.0>
}
polygon {
5,
<290.0, 0, 114.0>, <290.0, 165.0, 114.0>,  <240.0, 165.0, 272.0>,
<240.0, 0, 272.0>, <290.0, 0, 114.0>
}
polygon {
5,
<130.0, 0, 65.0>, <130.0, 165.0, 65.0>,
<290.0, 165.0, 114.0>, <290.0, 0, 114.0>, <130.0, 0, 65.0>
}
polygon {
5,
<82.0, 0, 225.0>, <82.0, 165.0, 225.0>,
<130.0, 165.0, 65.0>, <130.0, 0, 65.0>, <82.0, 0, 225.0>
}
polygon {
5,
<240.0, 0, 272.0>, <240.0, 165.0, 272.0>,
<82.0, 165.0, 225.0>, <82.0, 0, 225.0>, <240.0, 0, 272.0>
}

pigment {color White}
finish {ambient 0 diffuse .75}
}

/**************************************************************************

* Tall Box Definition
***************************************************************************/

union {
polygon {
5,
<423.0, 330.0, 247.0>, <265.0, 330.0, 296.0>, <314.0, 330.0, 456.0>,
<472.0, 330.0, 406.0>, <423.0, 330.0, 247.0>
}
polygon {
5,
<423.0, 0, 247.0>, <423.0, 330.0, 247.0>, <472.0, 330.0, 406.0>,
<472.0, 0, 406.0>, <423, 0, 247>
}
polygon {
5,
<472.0, 0, 406.0>, <472.0, 330.0, 406.0>, <314.0, 330.0, 456.0>,
<314.0, 0, 456.0>, <472, 0, 406>
}
polygon {
5,
<314.0, 0, 456.0>, <314.0, 330.0, 456.0>, <265.0, 330.0, 296.0>,
<265.0, 0, 296.0>, <314, 0, 456>
}
polygon {
5,
<265.0, 0, 296.0>, <265.0, 330.0, 296.0>, <423.0, 330.0, 247.0>,
<423.0, 0, 247.0>, <265, 0, 296>
}
pigment {color White}
finish {ambient 0 diffuse .75}
}


Post a reply to this message

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