- Als neu kennzeichnen
- Lesezeichen
- Abonnieren
- Stummschalten
- RSS-Feed abonnieren
- Kennzeichnen
- Anstößigen Inhalt melden
I'm trying to update Embree library from version 3 to 4 to make it working with LuxCore.
The strange thing is that method rtcIntersect1() never hits a geometry.
I have done some tests with: https://github.com/embree/embree/blob/master/tests/integration/test_embree_release/test.cpp
When executing code I've got "Object reference not set to the instance of object" exception.
So I've tried to pass RTCIntersectArguments.
RTCRayQueryContext context;
rtcInitRayQueryContext(&context);
RTCIntersectArguments intersectArgs;
rtcInitIntersectArguments(&intersectArgs);
intersectArgs.context = &context;
rtcIntersect1(scene, &rayhit, &intersectArgs);
In that case there is no error anymore, but I've got the same result as with LuxCore. For both test cases I've got:
"Did not find any intersection"
Currently I'm using following version of Embree:
https://github.com/embree/embree/releases/download/v4.2.0/embree-4.2.0.x86_64.linux.tar.gz
My machine does not have GPU.
The original code of LuxCore code can be found here:
https://github.com/LuxCoreRender/LuxCore/blob/master/src/luxrays/accelerators/embreeaccel.cpp
The only modifications that I've done to luxcore code are:
- convert RTCIntersectContext to RTCRayQueryContex
- pass intersect args to rtcIntersect1 method:
RTCIntersectArguments intersectArgs;
rtcInitIntersectArguments(&intersectArgs);
intersectArgs.context = &context;
rtcIntersect1(embreeScene, &embreeRayHit, &intersectArgs);
Link kopiert
- Als neu kennzeichnen
- Lesezeichen
- Abonnieren
- Stummschalten
- RSS-Feed abonnieren
- Kennzeichnen
- Anstößigen Inhalt melden
Hi,
I've skimmed over your code and can't find any obvious issue with it. Can you test the embree_minimal tutorial application and check whether this reports a hit? Output should be
./build/embree_minimal
0.330000, 0.330000, -1.000000: Found intersection on geometry 0, primitive 0 at tfar=1.000000
1.000000, 1.000000, -1.000000: Did not find any intersection.
Can you maybe modify the minimal tutorial (in embree_root/tutorial/minimal.cpp) and create a reproducer for this problem?
Can you please also run one of the other tutorials in verbose mode and cut/paste the ISA and BVH information here, i.e.
./build/embree_triangle_geometry --verbose 2
Cheers,
Florian
- Als neu kennzeichnen
- Lesezeichen
- Abonnieren
- Stummschalten
- RSS-Feed abonnieren
- Kennzeichnen
- Anstößigen Inhalt melden
Tomorrow I will try to run the test directly from Embree build.
At this moment I simply copy the code of minimal.cpp into luxcore embreaccel.cpp, and the output is twice "Did not find any intersection"
- Als neu kennzeichnen
- Lesezeichen
- Abonnieren
- Stummschalten
- RSS-Feed abonnieren
- Kennzeichnen
- Anstößigen Inhalt melden
Hi,
when I run embree_minimal from command line the output is correct.
0.330000, 0.330000, -1.000000: Found intersection on geometry 0, primitive 0 at tfar=1.000000
1.000000, 1.000000, -1.000000: Did not find any intersection.
The same code pasted into LuxCore code, returns "Dind not find any intersection" twice. I have to analyze the LuxCore code. Maybe somewhere else there is a call to embree library that has to be modified. Maybe there is some filter function attached. Unfortunately I'm not a LuxCore developer, and I'm not familiar with LuxCore code.
Bartek
- Als neu kennzeichnen
- Lesezeichen
- Abonnieren
- Stummschalten
- RSS-Feed abonnieren
- Kennzeichnen
- Anstößigen Inhalt melden
one more question. Do you have any idea why calling
rtcIntersect1(scene, &rayhit)
so without intersectArgs makes luxcore application crash?
So when I call rtcIntersect1(scene, &rayhit) application immediately crash, when I add intersectArgs it does not crash.
- Als neu kennzeichnen
- Lesezeichen
- Abonnieren
- Stummschalten
- RSS-Feed abonnieren
- Kennzeichnen
- Anstößigen Inhalt melden
Hi. I have found the reason. Another library was linking embree3. So at runtime the old version of embree was loaded. Now it works.
- Als neu kennzeichnen
- Lesezeichen
- Abonnieren
- Stummschalten
- RSS-Feed abonnieren
- Kennzeichnen
- Anstößigen Inhalt melden
I have encountered the same issue, however, I had different problem, since I have never installed/linked an older version of embree.
My two cents for beginners like me: set the mask of the ray. I had no intersections without setting the mask.
rayhit.ray.mask = -1;

- RSS-Feed abonnieren
- Thema als neu kennzeichnen
- Thema als gelesen kennzeichnen
- Diesen Thema für aktuellen Benutzer floaten
- Lesezeichen
- Abonnieren
- Drucker-Anzeigeseite