Community Packages

Please read this before reporting a bug:
https://wiki.archlinux.org/title/Bug_reporting_guidelines

Do NOT report bugs when a package is just outdated, or it is in the AUR. Use the 'flag out of date' link on the package page, or the Mailing List.

REPEAT: Do NOT report bugs for outdated packages!
Tasklist

FS#76802 - [embree] Wrong ray intersection test but correct with official version

Attached to Project: Community Packages
Opened by kikitte (kikitte) - Sunday, 11 December 2022, 15:35 GMT
Last edited by Toolybird (Toolybird) - Friday, 20 January 2023, 02:09 GMT
Task Type Bug Report
Category Packages
Status Closed
Assigned To Sven-Hendrik Haase (Svenstaro)
Bruno Pagani (ArchangeGabriel)
Architecture x86_64
Severity Low
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 0
Private No

Details

Description:
There is a small program provided by the embree official(https://www.embree.org/api.html#), which performs a ray-triangle intersection using the Embree API. However it reports "No Intersection" with the embree package installed from pacman which is incorrect. And it is ok if we use the official release of embree(https://github.com/embree/embree/releases/download/v3.13.5/embree-3.13.5.x86_64.linux.tar.gz). They are both the same version: 3.13.5.

Additional info:
* embree 2.13.5

Steps to reproduce:
1. download two files in an empty folder: https://www.embree.org/api_examples/hello_embree/hello_embree.cpp & https://www.embree.org/api_examples/hello_embree/CMakeLists.txt
2. cmake -B build && cmake --build build
3. ./build/hello_embree # 'No Intersection'
4. LD_LIBRARY_PATH=/home/kikitte/Downloads/embree-3.13.5.x86_64.linux/lib/ ./build/hello_embree # Intersection at t = 1
Here LD_LIBRARY_PATH specific the local directory contains the libembree3.so.3 library, which is downloaded from https://github.com/embree/embree/releases/download/v3.13.5/embree-3.13.5.x86_64.linux.tar.gz
This task depends upon

Closed by  Toolybird (Toolybird)
Friday, 20 January 2023, 02:09 GMT
Reason for closing:  Fixed
Additional comments about closing:  embree 3.13.5-2
Comment by Sven-Hendrik Haase (Svenstaro) - Monday, 26 December 2022, 02:46 GMT
This is weird. I suspect some kind of compiler flags problem which is probably still an upstream problem. Could you report this upstream and link this report?
Comment by kikitte (kikitte) - Wednesday, 18 January 2023, 14:42 GMT
Thank you! I'am sorry for my late reply. After some testing, it turns out that EMBREE_RAY_MASK=ON (https://github.com/archlinux/svntogit-community/blob/packages/embree/trunk/PKGBUILD#L24) makes this problem. The embree document says: 1. Ray masks are disabled in Embree by default at compile time, and can be enabled through the EMBREE_RAY_MASK parameter in CMake. 2. This geometry mask is used together with the ray mask stored inside the mask field of the ray. The primitives of the geometry are hit by the ray only if the bitwise and operation of the geometry mask with the ray mask is not 0. Because EMBREE_RAY_MASK is set to ON in the embree PKGBUILD file and the bitwise and operation of the geometry mask with the ray mask is 0 in the above example, so the intersection result is 'No Intersection'. More details about ray mask can be find in https://github.com/embree/embree#description-description-41.

Finally, Should we disable EMBREE_RAY_MASK by default? I don't know why it is set to ON in the PKGBUILD file.
Comment by Sven-Hendrik Haase (Svenstaro) - Thursday, 19 January 2023, 13:13 GMT
Thanks, that a good find. I have no idea why it was on to begin with. Can you check the new version?
Comment by kikitte (kikitte) - Friday, 20 January 2023, 01:31 GMT
The problem is solved in the new version.

Loading...