Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[debug] pbrt-v3-scenes/villa scene #111

Closed
wahn opened this issue Aug 27, 2019 · 3 comments
Closed

[debug] pbrt-v3-scenes/villa scene #111

wahn opened this issue Aug 27, 2019 · 3 comments

Comments

@wahn
Copy link
Owner

wahn commented Aug 27, 2019

Currently (commit 09e476c) the villa test scene renders differently for C++ ...

f16-20a

... and Rust

pbrt

Assumption: Something might go wrong with the glass material and letting light trough ...

@wahn
Copy link
Owner Author

wahn commented Aug 27, 2019

Let's focus on this area:

Film "image"
...
  "float cropwindow" [ 0 0.25 0.75 1 ]

@wahn
Copy link
Owner Author

wahn commented Aug 27, 2019

Most likely the problem is that we do not deal with shadowalpha yet (see https://www.pbrt.org/fileformat-v3.html#shapes):

> rg shadowalpha
geometry.pbrt
136:    Shape "plymesh" "string filename" "geometry/mesh_00032.ply" "float shadowalpha" [0]
144:    Shape "plymesh" "string filename" "geometry/mesh_00034.ply"  "float shadowalpha" [0]
150:    Shape "plymesh" "string filename" "geometry/mesh_00035.ply"  "float shadowalpha" [0]
162:    Shape "plymesh" "string filename" "geometry/mesh_00037.ply"  "float shadowalpha" [0]
180:    Shape "plymesh" "string filename" "geometry/mesh_00040.ply"  "float shadowalpha" [0]
186:    Shape "plymesh" "string filename" "geometry/mesh_00041.ply"  "float shadowalpha" [0]
740:    Shape "plymesh" "string filename" "geometry/mesh_00068.ply"  "float shadowalpha" [0]
1323:    Shape "plymesh" "string filename" "geometry/mesh_00137.ply"  "float shadowalpha" [0]
1463:    Shape "plymesh" "string filename" "geometry/mesh_00146.ply"  "float shadowalpha" [0]
1559:    Shape "plymesh" "string filename" "geometry/mesh_00162.ply"  "float shadowalpha" [0]
1627:    Shape "plymesh" "string filename" "geometry/mesh_00174.ply"  "float shadowalpha" [0]
2127:    Shape "plymesh" "string filename" "geometry/mesh_00258.ply"  "float shadowalpha" [0]
2147:    Shape "plymesh" "string filename" "geometry/mesh_00262.ply"  "float shadowalpha" [0]
2173:    Shape "plymesh" "string filename" "geometry/mesh_00267.ply"  "float shadowalpha" [0]
2181:    Shape "plymesh" "string filename" "geometry/mesh_00269.ply"  "float shadowalpha" [0]

@wahn
Copy link
Owner Author

wahn commented Aug 27, 2019

Now both (C++ and Rust) versions render approx. the same image:

pbrt

> imf_diff -d -f pbrt.png pbrt_cpp.png diff.jpg
differing pixels:	  1.509% (2075 of 137514)
average difference:	  2.359%
maximum difference:	 42.055%
Summary: Some pixels differ strongly.
== "pbrt.png" and "pbrt_cpp.png" are different

diff

@wahn wahn closed this as completed Aug 27, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant