POV-Ray : Newsgroups : povray.unofficial.patches : FINAL Cornell box rendering... : Re: FINAL Cornell box rendering... Server Time
2 Sep 2024 04:15:45 EDT (-0400)
  Re: FINAL Cornell box rendering...  
From: Stephane Marty
Date: 2 Jun 2000 15:47:19
Message: <39380E82.5F30@wanadoo.fr>
Glen Berry wrote:
> 
> I have a few comments about your adaptation of the Cornell Box. I
> noticed that in your POV code, you scaled the box dimensions down by a
> factor of 10. If we will be treating this as a standard, why not keep
> the same box size as the original? (Some might say the scaling has no
> effect, but then I want to know even more why it was changed, if it
> makes no difference?)

Yes, it has no effect. I started with the same scale as the original and
then, for some test reasons, I scaled it down by a factor of 10.
But, here's the original :

//	Persistence of Vision Ray Tracer Scene Description File
//      The true Cornell box...
//      PoV transcription by Stephane Marty (05/31/2000)

#version unofficial MegaPov 0.5;

#declare pov_rad=no;

global_settings
{
  ambient_light 0.01
#if(pov_rad)        
  ini_option "+QR"
  radiosity
  { pretrace_start 0.08
    pretrace_end   0.02
    count 100
    nearest_count 5
    error_bound 1
    recursion_limit 4
    low_error_factor .5
    gray_threshold 0.0
    minimum_reuse 0.015
    brightness 1.3
    adc_bailout 0.01/2
  }
#else
  stochastic_global_illumination { samples 400 distribution 2 }
#end
}

camera{
   location  <278, 273,-800>
   direction <0, 0, 1>
   up        <0, 1, 0>
   right     <-1, 0, 0> // width and height must be equals !
   angle 39.5
} 

/*
 * colors converted from spectral space.
 */
#declare white_cornell = texture {
    finish{ diffuse 1 }
    pigment { color rgb<0.740063,0.742313,0.733934> }
}

#declare green_cornell = texture {
    finish{ diffuse 1 }
    pigment { color rgb<0.162928,0.408903,0.0833759> }
}

#declare red_cornell = texture {
    finish{ diffuse 1 }
    pigment { color rgb<0.366046,0.0371827,0.0416385> }
}

#declare light_color = color rgb<0.780131,0.780409,0.775833>

union {
/*
 * floor
 */
  triangle {
    <552.8, 0.0, 0.0>,
    <0.0, 0.0, 0.0>,
    <0.0, 0.0, 559.2>
  }
  triangle {
    <552.8, 0.0, 0.0>,
    <0.0, 0.0, 559.2>,
    <549.6, 0.0, 559.2>
  }
/*
 * ceiling
 */
  triangle {
    <556.0, 548.8, 0.0>,
    <556.0, 548.8, 559.2>,
    <0.0, 548.8, 559.2>
  }
  triangle {
    <556.0, 548.8, 0.0>,
    <0.0, 548.8, 559.2>,
    <0.0, 548.8, 0.0>
  }
/*
 * back wall
 */
  triangle {
    <0.0, 548.8, 559.2>,
    <556.0, 548.8, 559.2>,
    <549.6, 0.0, 559.2>
  }
  triangle {
    <0.0, 548.8, 559.2>,
    <549.6, 0.0, 559.2>,
    <0.0, 0.0, 559.2>
  }
  
  texture { white_cornell }
}

union {
/*
 * right wall
 */
  triangle {
    <0.0, 548.8, 0.0>,
    <0.0, 548.8, 559.2>,
    <0.0, 0.0, 559.2>
  }
  triangle {
    <0.0, 548.8, 0.0>,
    <0.0, 0.0, 559.2>,
    <0.0, 0.0, 0.0>
  }
  
  texture { green_cornell }
}

union {
/*
 * left wall
 */
  triangle {
    <552.8, 0.0, 0.0>,
    <549.6, 0.0, 559.2>,
    <556.0, 548.8, 559.2>
  }
  triangle {
    <552.8, 0.0, 0.0>,
    <556.0, 548.8, 559.2>,
    <556.0, 548.8, 0.0>
  }

  texture { red_cornell }  
}

union {
/*
 * short block
 */
  triangle {
    <130.0, 165.0, 65.0>,
    <82.0, 165.0, 225.0>,
    <240.0, 165.0, 272.0>
  }
  triangle {
    <130.0, 165.0, 65.0>,
    <240.0, 165.0, 272.0>,
    <290.0, 165.0, 114.0>
  }

  triangle {
    <290.0, 0.0, 114.0>,
    <290.0, 165.0, 114.0>,
    <240.0, 165.0, 272.0>
  }
  triangle {
    <290.0, 0.0, 114.0>,
    <240.0, 165.0, 272.0>,
    <240.0, 0.0, 272.0>
  }

  triangle {
    <130.0, 0.0, 65.0>,
    <130.0, 165.0, 65.0>,
    <290.0, 165.0, 114.0>
  }
  triangle {
    <130.0, 0.0, 65.0>,
    <290.0, 165.0, 114.0>,
    <290.0, 0.0, 114.0>
  }

  triangle {
    <82.0, 0.0, 225.0>,
    <82.0, 165.0, 225.0>,
    <130.0, 165.0, 65.0>
  }
  triangle {
    <82.0, 0.0, 225.0>,
    <130.0, 165.0, 65.0>,
    <130.0, 0.0, 65.0>
  }

  triangle {
    <240.0, 0.0, 272.0>,
    <240.0, 165.0, 272.0>,
    <82.0, 165.0, 225.0>
  }
  triangle {
    <240.0, 0.0, 272.0>,
    <82.0, 165.0, 225.0>,
    <82.0, 0.0, 225.0>
  }

  texture { white_cornell }
}

union {
/*
 * tall block
 */
  triangle {
    <423.0, 330.0, 247.0>,
    <265.0, 330.0, 296.0>,
    <314.0, 330.0, 456.0>
  }
  triangle {
    <423.0, 330.0, 247.0>,
    <314.0, 330.0, 456.0>,
    <472.0 330.0 406.0>
  }

  triangle {
    <423.0, 0.0, 247.0>,
    <423.0, 330.0, 247.0>,
    <472.0, 330.0, 406.0>
  }
  triangle {
    <423.0, 0.0, 247.0>,
    <472.0, 330.0, 406.0>,
    <472.0, 0.0, 406.0>
  }

  triangle {
    <472.0, 0.0, 406.0>,
    <472.0, 330.0, 406.0>,
    <314.0, 330.0, 456.0>
  }
  triangle {
    <472.0, 0.0, 406.0>,
    <314.0, 330.0, 456.0>,
    <314.0, 0.0 456.0>
  }

  triangle {
    <314.0, 0.0, 456.0>,
    <314.0, 330.0, 456.0>,
    <265.0, 330.0, 296.0>
  }
  triangle {
    <314.0, 0.0, 456.0>,
    <265.0, 330.0, 296.0>,
    <265.0, 0.0, 296.0>
  }

  triangle {
    <265.0, 0.0, 296.0>,
    <265.0, 330.0, 296.0>,
    <423.0, 330.0, 247.0>
  }
  triangle {
    <265.0, 0.0, 296.0>,
    <423.0, 330.0, 247.0>,
    <423.0, 0.0, 247.0>
  }
  
  texture { white_cornell }
}

union {
/*
 * light patch
 */
  light_source {
    <278,548.8,279.5>
    light_color
    area_light <130, 0, 0>, <0, 0, 105>, 5, 5
    adaptive 1
    jitter
  }
  box { <213,548.7,332><343,548.8,227> no_shadow pigment { light_color }
finish { ambient light_color*1000 } }
}

---
> I noticed that you are using Cornell's synthetic rendering as your
> standard. It would be better to use the actual photo of the physical
> Cornell Box for comparisons. (The goal is to reproduce reality with
> POV-Ray, not to emulate another rendering.) It's unfortunate that
> Cornell didn't provide a nice RGB image of the original box. The only
> one I found was in a 7-channel IPLab format, instead of a typical RGB
> image. They offer a Matlab function to work with the IPLab format, but
> I have no idea how to use it. 

I don't know either, that's why I used their synthetic rendering because
it is so close to the reality.

> What sort of procedure did you use to convert their spectral data into
> RGB values? I think it needs a bit of revision. Your "white" is a bit
> too pure. The original looked a bit yellowish in comparison. Your
> "red" looks too pure. The original is closer to red-orange than a
> simple red. The green is also different, but I'm not sure the best way
> to describe it. 

Well, I'm pretty sure the values are correct. I used my spectral space
ray-tracer. And you know, there's only very few ways to do it, it's just
that there's a HUGE difference between spectral and RGB accuracy.
In addition, there's another reason to the fact that the white walls are
not white. The light patch they used has a slight yellow tendancy in the
colour spectrum. A true radiosity preprocessor is able to compute the
global ambient light with a high level of precision. That's the case
here. And in spectral space, this accuracy is maintained all during the
entire process because the RGB conversion is only done at the end of the
process.
An image rendered in a spectral space is incredibly different than the
same ome rendered in a RGB space.

> Don't misunderstand, I do appreciate the effort you have put into this
> so far. It would just be nice to improve things a bit. For a long
> time, people have been judging the rendering quality of POV-Ray, as if
> they lived in a total vacuum. I think it's time we started comparing
> POV to actual samples of the real world, when we want to judge its
> rendering quality. What looks more interesting is not always more
> accurate. Reality and people's recollection of it, are almost always
> significantly different.

> As for the rendering comparison, I like your illumination model the
> best. It's a shame it takes so long. Perhaps a way will be found to
> increase the speed? 

Thank you, I hope so. But maybe I won't be the guy who find it...

Stephane Marty
- - - - - - - -
Computer Graphics Software
http://perso.wanadoo.fr/albedo


Post a reply to this message

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