This commit is contained in:
Shuo Feng 2024-01-28 20:14:37 -05:00
commit de866d23bf
Signed by: sfeng
GPG key ID: 1E83AE6CD1C037B1
28 changed files with 46878 additions and 0 deletions

354
assets/cornell_box.json Normal file
View file

@ -0,0 +1,354 @@
{
"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
}
]
}

53
assets/cornell_box.ppm Normal file

File diff suppressed because one or more lines are too long

354
assets/cornell_box_al.json Normal file
View file

@ -0,0 +1,354 @@
{
"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": false
},
{
"type":"point",
"centre":[278, 273, 800],
"id":[1, 1, 1],
"is":[1, 1, 1],
"use": false
}
],
"output":[{
"filename":"cornell_box_al.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": false,
"raysperpixel": [10, 10],
"maxbounces": 3,
"probterminate": 0.333
}
]
}

14760
assets/cornell_box_al.ppm Normal file

File diff suppressed because one or more lines are too long

View file

@ -0,0 +1,127 @@
{
"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":0.5,
"ks":0,
"pc":0
},
{
"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":0.5,
"ks":0,
"pc":0
},
{
"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":0.5,
"ks":0,
"pc":0
},
{
"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
},
{
"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":0.5,
"ks":0,
"pc":0
}
],
"light":[
{
"type":"point",
"centre":[278, 540,-279.5],
"id":[1, 1, 1],
"is":[1, 1, 1]
}
],
"output":[{
"filename":"cornell_box_empty_pl.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.3333
}
]
}

File diff suppressed because one or more lines are too long

View file

@ -0,0 +1,70 @@
{
"geometry":[{
"type":"rectangle",
"p1":[-20, -1, 0],
"p2":[20, -1, 0],
"p3":[20, -1, -20],
"p4":[-20, -1, -20],
"ac":[1,0,0],
"dc":[1,0,0],
"sc":[1,1,1],
"ka":0.1,
"kd":1,
"ks":1,
"pc":10
},
{
"type":"sphere",
"centre":[0, 0, -4],
"radius":1,
"ac":[1,1,1],
"dc":[0,0,1],
"sc":[1,1,1],
"ka":0,
"kd":1,
"ks":1,
"pc":100
}
],
"light":[
{
"type":"area",
"p1":[-2, 7, -6],
"p2":[0, 7, -6],
"p4":[-2, 7, -4],
"p3":[0, 7, -4],
"id":[1, 1, 1],
"is":[1, 1, 1],
"usecenter":false,
"n":10
},
{
"type":"point",
"centre":[1,0.5,0],
"id":[1, 1, 1],
"is":[1, 1, 1]
}
],
"output":[{
"filename":"test_area_light1.ppm",
"size":[500,500],
"lookat":[0,0,-1],
"up":[0,1,0],
"fov":60,
"centre":[0,0.5,0],
"ai":[1,1,1],
"bkc":[0.5,0.5,0.5],
"globalillum": false,
"raysperpixel": [10, 10]
}
]
}

2279
assets/test_area_light1.ppm Normal file

File diff suppressed because one or more lines are too long

36
assets/test_scene1.json Normal file
View file

@ -0,0 +1,36 @@
{
"geometry":[{
"type":"sphere",
"centre":[0, 0, -4],
"radius":2,
"ac":[0,1,0],
"dc":[1,0,0],
"sc":[1,1,1],
"ka":1,
"kd":1,
"ks":1,
"pc":10
}
],
"light":[{
"type":"point",
"centre":[0, 0, 0],
"id":[1, 1, 1],
"is":[1, 1, 1]
}],
"output":[{
"filename":"test_scene1.ppm",
"size":[500,500],
"lookat":[0,0,-1],
"up":[0,1,0],
"fov":90,
"centre":[0,0,0],
"ai":[1,1,1],
"bkc":[1,1,1]
}
]
}

632
assets/test_scene1.ppm Normal file

File diff suppressed because one or more lines are too long

44
assets/test_scene1B.json Normal file
View file

@ -0,0 +1,44 @@
{
"geometry":[{
"type":"sphere",
"centre":[2, 0, -6],
"radius":2,
"ac":[0,1,0],
"dc":[0,0,1],
"sc":[1,1,1],
"ka":0,
"kd":1,
"ks":1,
"pc":100
}
],
"light":[{
"type":"point",
"centre":[0, 0, 0],
"id":[0.5, 0.5, 0.5],
"is":[1, 1, 1]
},
{
"type":"point",
"centre":[2, 4, 0],
"id":[0.5, 0.5, 0.5],
"is":[1, 1, 1]
}
],
"output":[{
"filename":"test_scene1B.ppm",
"size":[1000,500],
"lookat":[0,0,-1],
"up":[0,1,0],
"fov":60,
"centre":[0,0,0],
"ai":[1,1,1],
"bkc":[0.4,0.4,0.4]
}
]
}

469
assets/test_scene1B.ppm Normal file

File diff suppressed because one or more lines are too long

38
assets/test_scene2.json Normal file
View file

@ -0,0 +1,38 @@
{
"geometry":[{
"type":"rectangle",
"p1":[-2, 2, -4],
"p2":[-2, -2, -4],
"p3":[2, -2, -4],
"p4":[2, 2, -4],
"ac":[0,1,0],
"dc":[1,0,0],
"sc":[1,1,1],
"ka":0.1,
"kd":1,
"ks":1,
"pc":10
}],
"light":[{
"type":"point",
"centre":[0, 0, 0],
"id":[1, 1, 1],
"is":[1, 1, 1]
}],
"output":[{
"filename":"test_scene2.ppm",
"size":[500,500],
"lookat":[0,0,-1],
"up":[0,1,0],
"fov":90,
"centre":[0,0,0],
"ai":[1,1,1],
"bkc":[1,1,1]
}
]
}

4
assets/test_scene2.ppm Normal file

File diff suppressed because one or more lines are too long

62
assets/test_scene3.json Normal file
View file

@ -0,0 +1,62 @@
{
"geometry":[{
"type":"rectangle",
"p1":[-20, -1, 0],
"p2":[20, -1, 0],
"p3":[20, -1, -20],
"p4":[-20, -1, -20],
"ac":[0,1,0],
"dc":[1,0,0],
"sc":[1,1,1],
"ka":1,
"kd":1,
"ks":1,
"pc":10
},
{
"type":"sphere",
"centre":[0, 0, -4],
"radius":1,
"ac":[1,0,0],
"dc":[0,0,1],
"sc":[1,1,1],
"ka":0.2,
"kd":1,
"ks":1,
"pc":10
}
],
"light":[
{
"type":"point",
"centre":[0, 7, -5],
"id":[1, 1, 1],
"is":[1, 1, 1]
},
{
"type":"point",
"centre":[0,0.5,0],
"id":[1, 1, 1],
"is":[1, 1, 1]
}
],
"output":[{
"filename":"test_scene3.ppm",
"size":[500,500],
"lookat":[0,0,-1],
"up":[0,1,0],
"fov":60,
"centre":[0,0.5,0],
"ai":[1,1,1],
"bkc":[1,1,1]
}
]
}

1160
assets/test_scene3.ppm Normal file

File diff suppressed because one or more lines are too long

79
assets/test_scene3B.json Normal file
View file

@ -0,0 +1,79 @@
{
"geometry":[{
"type":"rectangle",
"p1":[-20, -1, 0],
"p2":[20, -1, 0],
"p3":[20, -1, -20],
"p4":[-20, -1, -20],
"ac":[1,0,0],
"dc":[1,0,0],
"sc":[1,1,1],
"ka":0.1,
"kd":1,
"ks":1,
"pc":10
},
{
"type":"sphere",
"centre":[0, 0, -4],
"radius":1,
"ac":[1,1,1],
"dc":[0,0,1],
"sc":[1,1,1],
"ka":0,
"kd":1,
"ks":1,
"pc":100
}
],
"light":[
{
"type":"point",
"centre":[-1, 7, -5],
"id":[1, 1, 1],
"is":[1, 1, 1]
},
{
"type":"point",
"centre":[1,0.5,0],
"id":[1, 1, 1],
"is":[1, 1, 1]
}
],
"output":[{
"filename":"test_scene3B.ppm",
"size":[500,500],
"lookat":[0,0,-1],
"up":[0,1,0],
"fov":60,
"centre":[0,0.5,0],
"ai":[1,1,1],
"bkc":[0.5,0.5,0.5],
"globalillum": false,
"raysperpixel": [10, 10]
},
{
"filename":"test_scene3B_aa.ppm",
"size":[500,500],
"lookat":[0,0,-1],
"up":[0,1,0],
"fov":60,
"centre":[0,0.5,0],
"ai":[1,1,1],
"bkc":[0.5,0.5,0.5],
"globalillum": false,
"antialiasing":true,
"raysperpixel": [10, 10]
}
]
}

1865
assets/test_scene3B.ppm Normal file

File diff suppressed because one or more lines are too long

1905
assets/test_scene3B_aa.ppm Normal file

File diff suppressed because one or more lines are too long