ray-tracer-comp371/assets/cornell_box.json
2024-01-28 20:14:37 -05:00

354 lines
6.6 KiB
JSON

{
"geometry":[{
"comment":"back_wall",
"type":"rectangle",
"p2":[556, 0, -559],
"p1":[0, 0, -559],
"p4":[0, 548.8, -559],
"p3":[556, 548.8, -559],
"ac":[1,1,1],
"dc":[1,1,1],
"sc":[0,0,0],
"ka":0,
"kd":1,
"ks":0,
"pc":0,
"visible": true
},
{
"comment":"right_wall",
"type":"rectangle",
"p1":[556, 0, -559],
"p2":[556, 0, 0],
"p3":[556, 548.8, 0],
"p4":[556, 548.8, -559],
"ac":[1,0,0],
"dc":[1,0,0],
"sc":[0,0,0],
"ka":0,
"kd":1,
"ks":0,
"pc":0,
"visible": true
},
{
"comment":"left_wall",
"type":"rectangle",
"p2":[0, 0, -559],
"p1":[0, 0, 0],
"p4":[0, 548.8, 0],
"p3":[0, 548.8, -559],
"ac":[0,1,0],
"dc":[0,1,0],
"sc":[0,0,0],
"ka":0,
"kd":1,
"ks":0,
"pc":0,
"visible": true
},
{
"comment":"ceiling",
"type":"rectangle",
"p1":[0, 548.8, 0],
"p2":[0, 548.8, -559],
"p3":[556, 548.8, -559.0],
"p4":[556, 548.8, 0],
"ac":[1,1,1],
"dc":[1,1,1],
"sc":[0,0,0],
"ka":0,
"kd":1,
"ks":0,
"pc":0,
"visible": true
},
{
"comment":"floor",
"type":"rectangle",
"p1":[0, 0, 0],
"p4":[0, 0, -559],
"p3":[556, 0, -559.0],
"p2":[556, 0, 0],
"ac":[1,1,1],
"dc":[1,1,1],
"sc":[0,0,0],
"ka":0,
"kd":1,
"ks":0,
"pc":0,
"visible": true
},
{
"comment":"small block top",
"type":"rectangle",
"p1":[130, 165, -65],
"p4":[82, 165, -225],
"p3":[240, 165, -272.0],
"p2":[290, 165, -114],
"ac":[1,0,1],
"dc":[1,1,1],
"sc":[0,0,0],
"ka":0,
"kd":1,
"ks":0,
"pc":0,
"visible": true
},
{
"comment":"small block right not visible",
"type":"rectangle",
"p1":[290, 0, -114],
"p4":[290, 165, -114],
"p3":[240, 165, -272.0],
"p2":[240, 0, -272],
"ac":[1,1,1],
"dc":[1,1,1],
"sc":[0,0,0],
"ka":0,
"kd":1,
"ks":0,
"pc":0,
"visible": true
},
{
"comment":"small block front",
"type":"rectangle",
"p1":[130, 0, -65],
"p4":[130, 165, -65],
"p3":[290, 165, -114.0],
"p2":[290, 0, -114],
"ac":[1,1,1],
"dc":[0,1,1],
"sc":[0,0,0],
"ka":0,
"kd":1,
"ks":0,
"pc":0,
"visible": true
},
{
"comment":"small block left side",
"type":"rectangle",
"p1":[82, 0, -225],
"p4":[82, 165, -225],
"p3":[130, 165, -65.0],
"p2":[130, 0, -65],
"ac":[1,0,1],
"dc":[1,1,1],
"sc":[0,0,0],
"ka":0,
"kd":1,
"ks":0,
"pc":0,
"visible": true
},
{
"comment":"large block top",
"type":"rectangle",
"p1":[423, 330, -247],
"p4":[265, 330, -296],
"p3":[314, 330, -456.0],
"p2":[472, 330, -406],
"ac":[1,0,0],
"dc":[1,1,1],
"sc":[0,0,0],
"ka":0,
"kd":1,
"ks":0,
"pc":0,
"visible": true
},
{
"comment":"large block right",
"type":"rectangle",
"p1":[423, 0, -247],
"p4":[423, 330, -247],
"p3":[472, 330, -406.0],
"p2":[472, 0, -406],
"ac":[1,0,0],
"dc":[1,1,1],
"sc":[0,0,0],
"ka":0,
"kd":1,
"ks":0,
"pc":0,
"visible": true
},
{
"comment":"large block back",
"type":"rectangle",
"p1":[472, 0, -406],
"p4":[472, 330, -406],
"p3":[314, 330, -456.0],
"p2":[314, 0, -456],
"ac":[1,1,1],
"dc":[1,1,1],
"sc":[0,0,0],
"ka":0,
"kd":1,
"ks":0,
"pc":0,
"visible": true
},
{
"comment":"large block left side",
"type":"rectangle",
"p1":[314, 0, -456],
"p4":[314, 330, -456],
"p3":[265, 330, -296.0],
"p2":[265, 0, -296],
"ac":[0,1,0],
"dc":[1,1,1],
"sc":[0,0,0],
"ka":0,
"kd":1,
"ks":0,
"pc":0,
"visible": true
},
{
"comment":"large block front",
"type":"rectangle",
"p1":[265, 0, -296],
"p4":[265, 330, -296],
"p3":[423, 330, -247.0],
"p2":[423, 0, -247],
"ac":[1,1,0],
"dc":[1,1,0],
"sc":[0,0,0],
"ka":0,
"kd":1,
"ks":0,
"pc":0,
"visible": true
}
],
"light":[
{
"type":"area",
"p1":[343, 540,-227],
"p2":[343, 540,-332],
"p3":[213, 540,-332],
"p4":[213, 540,-227],
"id":[1, 1, 1],
"is":[1, 1, 1],
"n": 5,
"usecenter": true
},
{
"type":"point",
"centre":[278, 273, 800],
"id":[1, 1, 1],
"is":[1, 1, 1],
"use": false
}
],
"output":[{
"filename":"cornell_box.ppm",
"size":[500,500],
"lookat":[0,0,-1],
"up":[0,1,0],
"fov":40,
"centre":[278, 273, 800],
"ai":[1,1,1],
"bkc":[0.5,0.5,0.5],
"globalillum": true,
"raysperpixel": [10, 10],
"maxbounces": 3,
"probterminate": 0.333
}
]
}