############################################################################## ## ## ## This scene defines a modified Cornell Box, where both walls use the ## ## Ashikhmin-Shirley BRDF instead of a standard Lambertian BRDF. ## ## ## ## Because I put this example together quickly, the BRDF assumes that the ## ## "u" vector is (0,0,1) and the "v" vector is (0,1,0). If your code ## ## uses different vectors, you may have to change the BRDF's n_u and ## ## n_v coefficients. ## ## ## ## Chris Wyman (3/30/2007) ## ############################################################################## epsilon 0.001 # Setup a camera to view the scene camera pinhole eye 278 273 -800 up 0 1 0 at 278 273 -799 fovy 38.5 res 512 512 end light area primitive parallelogram pt0 213.0 548.7 227.0 edge1 130.0 0.0 0.0 edge2 0.0 0.0 105.0 material simpleEmitter color 18.4 15.6 8.0 end end # The following two lines describe (for my code) how to # handle this light in ray-tracing mode (where I use # only point light sources). pos 278 548.7 279.5 color 18.4 15.6 8.0 end # Defines a Lambertian White BRDF material for the floor, ceiling and # the blocks in the Cornell Box. Note the 'explicit' means I used # explicit direct lighting (though you need not). material brdf white lambertian color 0.76 0.75 0.5 end explicit end # Defines a red BRDF using the Ashikhmin-Shirley model. I also used # explicit direct lighting for this material. material brdf red ashikhmin Rd 0.2 0.0 0.0 Rs 0.8 0.2 0.2 nu 10 nv 1000 end explicit end # Defines a green BRDF using the Ashikhmin-Shirley model. I also used # explicit direct lighting for this material. material brdf green ashikhmin Rd 0.0 0.2 0.0 Rs 0.1 0.5 0.1 nu 10 nv 1000 end explicit end # The floor (2 triangles) object tri floor1 v0 556 0 0 v1 0 0 0 v2 0 0 559.2 material white end object tri floor2 v0 556 0 0 v1 0 0 559.2 v2 556 0 559.2 material white end # The ceiling (2 triangles) object tri ceiling1 v0 556 548.8 0 v1 556 548.8 559.2 v2 0 548.8 559.2 material white end object tri ceiling2 v0 556 548.8 0 v1 0 548.8 559.2 v2 0 548.8 0 material white end # The back wall (2 triangles) object tri backWall1 v0 556 0 559.2 v1 0 0 559.2 v2 0 548.8 559.2 material white end object tri backWall2 v0 556 0 559.2 v1 0 548.8 559.2 v2 556 548.8 559.2 material white end # The left wall (2 triangles) object tri leftWall1 v0 556 0 0 v1 556 0 559.2 v2 556 548.8 559.2 material red end object tri leftWall2 v0 556 0 0 v1 556 548.8 559.2 v2 556 548.8 0 material red end # The right wall (2 triangles) object tri rightWall1 v0 0 0 559.2 v1 0 0 0 v2 0 548.8 0 material green end object tri rightWall2 v0 0 0 559.2 v1 0 548.8 0 v2 0 548.8 559.2 material green end # The small block (10 triangles) object tri smallBlock1 v0 130 165 65 v1 82 165 225 v2 240 165 272 material white end object tri smallBlock2 v0 130 165 65 v1 240 165 272 v2 290 165 114 material white end object tri smallBlock3 v0 290 0 114 v1 290 165 114 v2 240 165 272 material white end object tri smallBlock4 v0 290 0 114 v1 240 165 272 v2 240 0 272 material white end object tri smallBlock5 v0 130 0 65 v1 130 165 65 v2 290 165 114 material white end object tri smallBlock6 v0 130 0 65 v1 290 165 114 v2 290 0 114 material white end object tri smallBlock7 v0 82 0 225 v1 82 165 225 v2 130 165 65 material white end object tri smallBlock8 v0 82 0 225 v1 130 165 65 v2 130 0 65 material white end object tri smallBlock9 v0 240 0 272 v1 240 165 272 v2 82 165 225 material white end object tri smallBlock10 v0 240 0 272 v1 82 165 225 v2 82 0 225 material white end # The large block (10 triangles) object tri largeBlock1 v0 423 330 247 v1 265 330 296 v2 314 330 456 material white end object tri largeBlock2 v0 423 330 247 v1 314 330 456 v2 472 330 406 material white end object tri largeBlock3 v0 423 0 247 v1 423 330 247 v2 472 330 406 material white end object tri largeBlock4 v0 423 0 247 v1 472 330 406 v2 472 0 406 material white end object tri largeBlock5 v0 472 0 406 v1 472 330 406 v2 314 330 456 material white end object tri largeBlock6 v0 472 0 406 v1 314 330 456 v2 314 0 456 material white end object tri largeBlock7 v0 314 0 456 v1 314 330 456 v2 265 330 296 material white end object tri largeBlock8 v0 314 0 456 v1 265 330 296 v2 265 0 296 material white end object tri largeBlock9 v0 265 0 296 v1 265 330 296 v2 423 330 247 material white end object tri largeBlock10 v0 265 0 296 v1 423 330 247 v2 423 0 247 material white end