Parcourir la source

add rubix scene; update scene sampler params

Jérôme BUISINE il y a 3 ans
Parent
commit
ad0b7d66c8

+ 3 - 0
.gitignore

@@ -1,2 +1,5 @@
 *~
 *~
 .DS_Store
 .DS_Store
+
+sponge/a.out
+sponge/*.ply

+ 1 - 0
README.md

@@ -87,6 +87,7 @@ All synthesis images generated are of size `1920 x 1080` and saved into `.rawls`
 | `low_table`             | `p3d_low_table_coridor_view0.pbrt`       | path       | random  | 1 to 10000 |  ❌        |
 | `low_table`             | `p3d_low_table_coridor_view0.pbrt`       | path       | random  | 1 to 10000 |  ❌        |
 | `low_table`             | `p3d_low_table_upper_view0.pbrt`         | path       | random  | 1 to 10000 |  ❌        |
 | `low_table`             | `p3d_low_table_upper_view0.pbrt`         | path       | random  | 1 to 10000 |  ❌        |
 | `low_table`             | `p3d_low_table_window-view0.pbrt`        | path       | random  | 1 to 10000 |  ❌        |
 | `low_table`             | `p3d_low_table_window-view0.pbrt`        | path       | random  | 1 to 10000 |  ❌        |
+| `rubix-cube`            | `p3d_rubix-view0.pbrt`                   | path       | random  | 1 to 10000 |  ❌        |
 | `sanmiguel`             | `p3d_sanmiguel-view0.pbrt`               | path       | random  | 1 to 10000 |  ✅       |
 | `sanmiguel`             | `p3d_sanmiguel-view0.pbrt`               | path       | random  | 1 to 10000 |  ✅       |
 | `sanmiguel`             | `p3d_sanmiguel-view1.pbrt`               | path       | random  | 1 to 10000 |  ✅       |
 | `sanmiguel`             | `p3d_sanmiguel-view1.pbrt`               | path       | random  | 1 to 10000 |  ✅       |
 | `sanmiguel`             | `p3d_sanmiguel-view2.pbrt`               | path       | random  | 1 to 10000 |  ✅       |
 | `sanmiguel`             | `p3d_sanmiguel-view2.pbrt`               | path       | random  | 1 to 10000 |  ✅       |

+ 5 - 6
cornel-box/p3d_cornel-box-view0.pbrt

@@ -1,13 +1,12 @@
 Film "image" "integer xresolution" [800] "integer yresolution" [800] "string filename" "p3d_cornel-box-view0.rawls"
 Film "image" "integer xresolution" [800] "integer yresolution" [800] "string filename" "p3d_cornel-box-view0.rawls"
 PixelFilter "box" "float xwidth" [0.5] "float ywidth" [0.5] 
 PixelFilter "box" "float xwidth" [0.5] "float ywidth" [0.5] 
-Accelerator "bvh" 
-"string splitmethod" "sah"
-"integer maxnodeprims" [4]
-Sampler "halton"
+#Accelerator "bvh" 
+# "string splitmethod" "sah"
+# "integer maxnodeprims" [4]
+Sampler "random"
 "integer pixelsamples" [5]
 "integer pixelsamples" [5]
-"bool samplepixelcenter" "false"
 Integrator "path"
 Integrator "path"
-"integer maxdepth" [10]
+"integer maxdepth" [64]
 Scale -1 1 1 #avoid the 'flipped image' bug..
 Scale -1 1 1 #avoid the 'flipped image' bug..
 LookAt	2.9522032737731934 0.0 0.0
 LookAt	2.9522032737731934 0.0 0.0
 	1.9522032737731934 -4.371138828673793e-08 4.371138828673793e-08
 	1.9522032737731934 -4.371138828673793e-08 4.371138828673793e-08

+ 5 - 6
echecs/p3d_echecs-view0.pbrt

@@ -1,13 +1,12 @@
 Film "image" "integer xresolution" [1920] "integer yresolution" [1080] "string filename" "p3d_echecs-view0.rawls"
 Film "image" "integer xresolution" [1920] "integer yresolution" [1080] "string filename" "p3d_echecs-view0.rawls"
 PixelFilter "box" "float xwidth" [0.5] "float ywidth" [0.5] 
 PixelFilter "box" "float xwidth" [0.5] "float ywidth" [0.5] 
-Accelerator "bvh" 
-"string splitmethod" "sah"
-"integer maxnodeprims" [4]
-Sampler "halton"
+#Accelerator "bvh" 
+# "string splitmethod" "sah"
+# "integer maxnodeprims" [4]
+Sampler "random"
 "integer pixelsamples" [100]
 "integer pixelsamples" [100]
-"bool samplepixelcenter" "false"
 Integrator "path"
 Integrator "path"
-"integer maxdepth" [10]
+"integer maxdepth" [64]
 Scale -1 1 1 #avoid the 'flipped image' bug..
 Scale -1 1 1 #avoid the 'flipped image' bug..
 LookAt	32.57721710205078 -11.5177001953125 5.282332897186279
 LookAt	32.57721710205078 -11.5177001953125 5.282332897186279
 	32.183799743652344 -10.671516418457031 4.9228925704956055
 	32.183799743652344 -10.671516418457031 4.9228925704956055

+ 6 - 7
echecs/p3d_echecs-view1.pbrt

@@ -1,13 +1,12 @@
 Film "image" "integer xresolution" [1920] "integer yresolution" [1080] "string filename" "p3d_echecs-view1.rawls"
 Film "image" "integer xresolution" [1920] "integer yresolution" [1080] "string filename" "p3d_echecs-view1.rawls"
 PixelFilter "box" "float xwidth" [0.5] "float ywidth" [0.5] 
 PixelFilter "box" "float xwidth" [0.5] "float ywidth" [0.5] 
-Accelerator "bvh" 
-"string splitmethod" "sah"
-"integer maxnodeprims" [4]
-Sampler "halton"
-"integer pixelsamples" [100]
-"bool samplepixelcenter" "false"
+#Accelerator "bvh" 
+# "string splitmethod" "sah"
+# "integer maxnodeprims" [4]
+Sampler "random"
+"integer pixelsamples" [200]
 Integrator "path"
 Integrator "path"
-"integer maxdepth" [10]
+"integer maxdepth" [64]
 Scale -1 1 1 #avoid the 'flipped image' bug..
 Scale -1 1 1 #avoid the 'flipped image' bug..
 
 
 LookAt  12.8005 1.84876 6.57721  13.6879 1.85408 6.12645  0 0 1
 LookAt  12.8005 1.84876 6.57721  13.6879 1.85408 6.12645  0 0 1

+ 5 - 6
echecs/p3d_echecs-view2.pbrt

@@ -1,13 +1,12 @@
 Film "image" "integer xresolution" [1920] "integer yresolution" [1080] "string filename" "p3d_echecs-view2.rawls"
 Film "image" "integer xresolution" [1920] "integer yresolution" [1080] "string filename" "p3d_echecs-view2.rawls"
 PixelFilter "box" "float xwidth" [0.5] "float ywidth" [0.5] 
 PixelFilter "box" "float xwidth" [0.5] "float ywidth" [0.5] 
-Accelerator "bvh" 
-"string splitmethod" "sah"
-"integer maxnodeprims" [4]
-Sampler "halton"
+#Accelerator "bvh" 
+# "string splitmethod" "sah"
+# "integer maxnodeprims" [4]
+Sampler "random"
 "integer pixelsamples" [100]
 "integer pixelsamples" [100]
-"bool samplepixelcenter" "false"
 Integrator "path"
 Integrator "path"
-"integer maxdepth" [10]
+"integer maxdepth" [64]
 Scale -1 1 1 #avoid the 'flipped image' bug..
 Scale -1 1 1 #avoid the 'flipped image' bug..
 
 
 LookAt  17.9474 -4.12361 3.63216  18.6069 -3.43643 3.34916  0 0 1
 LookAt  17.9474 -4.12361 3.63216  18.6069 -3.43643 3.34916  0 0 1

+ 6 - 7
glasses/p3d_glasses-view0.pbrt

@@ -1,13 +1,12 @@
 Film "image" "integer xresolution" [1920] "integer yresolution" [1080] "string filename" "p3d_glasses-view0.rawls"
 Film "image" "integer xresolution" [1920] "integer yresolution" [1080] "string filename" "p3d_glasses-view0.rawls"
 PixelFilter "box" "float xwidth" [0.5] "float ywidth" [0.5] 
 PixelFilter "box" "float xwidth" [0.5] "float ywidth" [0.5] 
-Accelerator "bvh" 
-"string splitmethod" "sah"
-"integer maxnodeprims" [4]
-Sampler "halton"
-"integer pixelsamples" [500]
-"bool samplepixelcenter" "false"
+#Accelerator "bvh" 
+# "string splitmethod" "sah"
+# "integer maxnodeprims" [4]
+Sampler "random"
+"integer pixelsamples" [20]
 Integrator "path"
 Integrator "path"
-"integer maxdepth" [10]
+"integer maxdepth" [64]
 Scale -1 1 1 #avoid the 'flipped image' bug..
 Scale -1 1 1 #avoid the 'flipped image' bug..
 LookAt	5.789026737213135 0.11676639318466187 4.0745849609375
 LookAt	5.789026737213135 0.11676639318466187 4.0745849609375
 	4.865853786468506 0.19126193225383759 3.6974880695343018
 	4.865853786468506 0.19126193225383759 3.6974880695343018

+ 6 - 7
indirect/p3d_indirect-view0.pbrt

@@ -1,13 +1,12 @@
 Film "image" "integer xresolution" [1920] "integer yresolution" [1080] "string filename" "p3d_indirect-view0.rawls"
 Film "image" "integer xresolution" [1920] "integer yresolution" [1080] "string filename" "p3d_indirect-view0.rawls"
 PixelFilter "box" "float xwidth" [0.5] "float ywidth" [0.5] 
 PixelFilter "box" "float xwidth" [0.5] "float ywidth" [0.5] 
-Accelerator "bvh" 
-"string splitmethod" "sah"
-"integer maxnodeprims" [4]
-Sampler "halton"
-"integer pixelsamples" [5]
-"bool samplepixelcenter" "false"
+#Accelerator "bvh" 
+# "string splitmethod" "sah"
+# "integer maxnodeprims" [4]
+Sampler "random"
+"integer pixelsamples" [20]
 Integrator "path"
 Integrator "path"
-"integer maxdepth" [10]
+"integer maxdepth" [64]
 Scale -1 1 1 #avoid the 'flipped image' bug..
 Scale -1 1 1 #avoid the 'flipped image' bug..
 LookAt	5.0 0.06999993324279785 4.779985427856445
 LookAt	5.0 0.06999993324279785 4.779985427856445
 	5.0 0.6204806566238403 3.9451375007629395
 	5.0 0.6204806566238403 3.9451375007629395

+ 4 - 5
low_table/p3d_low_table_2spheric_view0.pbrt

@@ -1,11 +1,10 @@
 Film "image" "integer xresolution" [1920] "integer yresolution" [1080] "string filename" "p3d_low_table_2spheric_view0.rawls"
 Film "image" "integer xresolution" [1920] "integer yresolution" [1080] "string filename" "p3d_low_table_2spheric_view0.rawls"
 PixelFilter "box" "float xwidth" [0.5] "float ywidth" [0.5] 
 PixelFilter "box" "float xwidth" [0.5] "float ywidth" [0.5] 
-Accelerator "bvh" 
-"string splitmethod" "sah"
-"integer maxnodeprims" [4]
-Sampler "halton"
+#Accelerator "bvh" 
+# "string splitmethod" "sah"
+# "integer maxnodeprims" [4]
+Sampler "random"
 "integer pixelsamples" [20]
 "integer pixelsamples" [20]
-"bool samplepixelcenter" "false"
 Integrator "path"
 Integrator "path"
 "integer maxdepth" [64]
 "integer maxdepth" [64]
 Scale -1 1 1 #avoid the 'flipped image' bug..
 Scale -1 1 1 #avoid the 'flipped image' bug..

+ 4 - 5
low_table/p3d_low_table_coridor_view0.pbrt

@@ -1,11 +1,10 @@
 Film "image" "integer xresolution" [1920] "integer yresolution" [1080] "string filename" "p3d_low_table_coridor_view0.rawls"
 Film "image" "integer xresolution" [1920] "integer yresolution" [1080] "string filename" "p3d_low_table_coridor_view0.rawls"
 PixelFilter "box" "float xwidth" [0.5] "float ywidth" [0.5] 
 PixelFilter "box" "float xwidth" [0.5] "float ywidth" [0.5] 
-Accelerator "bvh" 
-"string splitmethod" "sah"
-"integer maxnodeprims" [4]
-Sampler "halton"
+#Accelerator "bvh" 
+# "string splitmethod" "sah"
+# "integer maxnodeprims" [4]
+Sampler "random"
 "integer pixelsamples" [20]
 "integer pixelsamples" [20]
-"bool samplepixelcenter" "false"
 Integrator "path"
 Integrator "path"
 "integer maxdepth" [64]
 "integer maxdepth" [64]
 Scale -1 1 1 #avoid the 'flipped image' bug..
 Scale -1 1 1 #avoid the 'flipped image' bug..

+ 4 - 5
low_table/p3d_low_table_upper_view0.pbrt

@@ -1,11 +1,10 @@
 Film "image" "integer xresolution" [1920] "integer yresolution" [1080] "string filename" "p3d_low_table_upper_view0.rawls"
 Film "image" "integer xresolution" [1920] "integer yresolution" [1080] "string filename" "p3d_low_table_upper_view0.rawls"
 PixelFilter "box" "float xwidth" [0.5] "float ywidth" [0.5] 
 PixelFilter "box" "float xwidth" [0.5] "float ywidth" [0.5] 
-Accelerator "bvh" 
-"string splitmethod" "sah"
-"integer maxnodeprims" [4]
-Sampler "halton"
+#Accelerator "bvh" 
+# "string splitmethod" "sah"
+# "integer maxnodeprims" [4]
+Sampler "random"
 "integer pixelsamples" [20]
 "integer pixelsamples" [20]
-"bool samplepixelcenter" "false"
 Integrator "path"
 Integrator "path"
 "integer maxdepth" [64]
 "integer maxdepth" [64]
 Scale -1 1 1 #avoid the 'flipped image' bug..
 Scale -1 1 1 #avoid the 'flipped image' bug..

+ 1 - 2
low_table/p3d_low_table_window-view0.pbrt

@@ -3,9 +3,8 @@ PixelFilter "box" "float xwidth" [0.5] "float ywidth" [0.5]
 Accelerator "bvh" 
 Accelerator "bvh" 
 "string splitmethod" "sah"
 "string splitmethod" "sah"
 "integer maxnodeprims" [4]
 "integer maxnodeprims" [4]
-Sampler "halton"
+Sampler "random"
 "integer pixelsamples" [20]
 "integer pixelsamples" [20]
-"bool samplepixelcenter" "false"
 Integrator "path"
 Integrator "path"
 "integer maxdepth" [64]
 "integer maxdepth" [64]
 Scale -1 1 1 #avoid the 'flipped image' bug..
 Scale -1 1 1 #avoid the 'flipped image' bug..

Fichier diff supprimé car celui-ci est trop grand
+ 152052 - 0
rubix-cube/p3d_rubix-view0.pbrt


BIN
rubix-cube/textures/rubix.png


BIN
rubix-cube/textures/rubix_n.png


+ 3 - 1
sponge/p3d_eponge-fractal-5-view0.pbrt

@@ -11,8 +11,10 @@ Film "image"
         "integer xresolution" [ 800 ] 
         "integer xresolution" [ 800 ] 
         "integer yresolution" [ 800 ] 
         "integer yresolution" [ 800 ] 
         "string filename" [ "p3d_eponge-fractal-5-view0.rawls" ] 
         "string filename" [ "p3d_eponge-fractal-5-view0.rawls" ] 
-Sampler "sobol" 
+Sampler "random" 
         "integer pixelsamples" [ 8 ] 
         "integer pixelsamples" [ 8 ] 
+Integrator "path"
+		"integer maxdepth" [64]
 
 
 #############################################
 #############################################
 
 

+ 3 - 1
sponge/p3d_eponge-fractal-5-view1.pbrt

@@ -11,8 +11,10 @@ Film "image"
         "integer xresolution" [ 800 ] 
         "integer xresolution" [ 800 ] 
         "integer yresolution" [ 800 ] 
         "integer yresolution" [ 800 ] 
         "string filename" [ "p3d_eponge-fractal-5-view1.rawls" ] 
         "string filename" [ "p3d_eponge-fractal-5-view1.rawls" ] 
-Sampler "sobol" 
+Sampler "random" 
         "integer pixelsamples" [ 8 ] 
         "integer pixelsamples" [ 8 ] 
+Integrator "path"
+		"integer maxdepth" [64]
 
 
 #############################################
 #############################################
 
 

+ 3 - 1
sponge/p3d_eponge-fractal-6-view0.pbrt

@@ -11,8 +11,10 @@ Film "image"
         "integer xresolution" [ 800 ] 
         "integer xresolution" [ 800 ] 
         "integer yresolution" [ 800 ] 
         "integer yresolution" [ 800 ] 
         "string filename" [ "p3d_eponge-fractal-6-view0.rawls" ] 
         "string filename" [ "p3d_eponge-fractal-6-view0.rawls" ] 
-Sampler "sobol" 
+Sampler "random" 
         "integer pixelsamples" [ 8 ] 
         "integer pixelsamples" [ 8 ] 
+Integrator "path"
+"integer maxdepth" [64]
 
 
 #############################################
 #############################################
 
 

+ 3 - 2
sponge/p3d_eponge-fractal-6-view1.pbrt

@@ -11,9 +11,10 @@ Film "image"
         "integer xresolution" [ 800 ] 
         "integer xresolution" [ 800 ] 
         "integer yresolution" [ 800 ] 
         "integer yresolution" [ 800 ] 
         "string filename" [ "p3d_eponge-fractal-6-view1.rawls" ] 
         "string filename" [ "p3d_eponge-fractal-6-view1.rawls" ] 
-Sampler "sobol" 
+Sampler "random" 
         "integer pixelsamples" [ 8 ] 
         "integer pixelsamples" [ 8 ] 
-
+Integrator "path"
+		"integer maxdepth" [64]
 #############################################
 #############################################
 
 
 WorldBegin
 WorldBegin

+ 42 - 0
utils/check_renderer.py

@@ -0,0 +1,42 @@
+import os
+import argparse 
+
+from rawls.rawls import Rawls
+from rawls.stats import RawlsStats
+
+def main():
+
+    parser = argparse.ArgumentParser(description="concat and mean data and compare with 1 image only")
+
+    parser.add_argument('--folder', type=str, help="folder which contains rawls files")
+    parser.add_argument('--n', type=int, help="number of images to concat and mean")
+    parser.add_argument('--output', type=str, help="output data folder")
+
+    args = parser.parse_args()
+
+    p_folder = args.folder
+    p_n      = args.n
+    p_output = args.output
+
+
+    files = os.listdir(p_folder)
+
+    paths = [ os.path.join(p_folder, f)  for f in files ]
+
+    if not os.path.exists(p_output):
+        os.makedirs(p_output)
+
+    print('Loading 1 rawls file')
+    rawls_one = Rawls.load(paths[0])
+    print('Saving 1 rawls file into png')
+    rawls_one.save(os.path.join(p_output, 'rawls_one.png' ))
+
+
+    print('Loading {0} rawls files'.format(p_n))
+    rawls_n = RawlsStats.load(paths[0:p_n])
+    print('Saving {0} rawls files into png'.format(p_n))
+    rawls_n.mean().save(os.path.join(p_output, 'rawls_{0}.png'.format(p_n)))
+
+
+if __name__ == "__main__":
+    main()