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

[sppm] arena branch panics with test scene #128

Closed
wahn opened this issue Sep 28, 2020 · 3 comments
Closed

[sppm] arena branch panics with test scene #128

wahn opened this issue Sep 28, 2020 · 3 comments
Labels

Comments

@wahn
Copy link
Owner

wahn commented Sep 28, 2020

$ git branch
* arena
...
$ git describe --tags
v0.8.2-74-g4314204
$ cd /home/jan/Graphics/Rendering/PBRT/pbrt-v3-scenes/caustic-glass
$ ~/git/github/rs_pbrt/target/release/rs_pbrt f16-9a.pbrt
...
thread '<unnamed>' panicked at 'index out of bounds: the len is 2 but the index is 242', src/integrators/sppm.rs:872:19
@wahn wahn added the bug label Sep 28, 2020
@wahn
Copy link
Owner Author

wahn commented Sep 28, 2020

The master branch renders fine, but still shows some differences to the C++ version:

diff

$ git checkout master
$ git describe --tags
v0.8.2-62-gf2cd4ae
$ make
$ cd /home/jan/Graphics/Rendering/PBRT/pbrt-v3-scenes/caustic-glass
$ ~/git/github/rs_pbrt/target/release/rs_pbrt f16-9a.pbrt
Copyright (c) 2016-2020 Jan Douglas Bert Walter.
Rust code based on C++ code by Matt Pharr, Greg Humphreys, and Wenzel Jakob.
Film "image"
  "string filename" ["f16-9a.exr"]
  "integer xresolution" [700]
  "integer yresolution" [1000]
  "float scale" [1.5]
Integrator "sppm"
  "integer numiterations" [2]
  "float radius" [0.025]
Rendering with 28 thread(s) ...
2 / 2 [===============================================================================] 100.00 % 1.45/s 
Writing image "pbrt.png" with bounds Bounds2i { p_min: Point2i { x: 0, y: 0 }, p_max: Point2i { x: 700, y: 1000 } }
$ imf_diff pbrt_cpp.png pbrt.png 
differing pixels:	 10.314% (72201 of 700000)
average difference:	 24.644%
maximum difference:	 86.603%
Summary: Many pixels differ strongly.
== "pbrt_cpp.png" and "pbrt.png" are different

@wahn
Copy link
Owner Author

wahn commented Sep 28, 2020

After commit e2ad633 we match the C++ code (in the master branch):

$ imf_diff pbrt_cpp.png pbrt.png 
pbrt_cpp.png pbrt.png: no differences.
== "pbrt_cpp.png" and "pbrt.png" are identical

The arena branch still panics.

@wahn
Copy link
Owner Author

wahn commented Sep 30, 2020

Commit e53708a ( and 421460a) fix the issue. C++ and the arena branch render the same:

$ imf_diff pbrt.png pbrt_cpp.png
pbrt.png pbrt_cpp.png: no differences.
== "pbrt.png" and "pbrt_cpp.png" are identical

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

No branches or pull requests

1 participant