Embree: Photo-Realistic Ray Tracing Kernels

Tolerance for triangle intersection

Hi,

I've been meeting problems with rays that hit exactly the boundary between two triangles. It actually happens a lot in my situation and creates big problems in my results. (I'm launching vertical rays and a boundary between two triangles happens to be located on an horizontal axis)

So my question is : is there a simple way to make ray/triangle intersections "tolerant"? I know I could go ahead and modify the intersect functions everywhere I can find them in Embree.
Is this the right way to do it?

Thanks in advance,
Hamza

Using BVH for other task

Hello

A bit side question, sorry if it's misplaced. I need to find all polygons intersections in scene with some "gap", e.g. if an edge is closed enough to a poly - count this case as intersection too. A code to check polygon/polygon intersection is not a problem, but which to which polygons I have to check? Can I use Embree BVH data structures for this? If so how?  

Thx

Integration questions

Hi All

1) I'm passing my data to rays as following (pseudocode)

struct MyRay : public RTCRay {

 MyData * data;

};

It works fine but how to do same with ispc where ray is "varying"?

2) For ispc I've built object files for rtcore_ispc.ispc and myfile.ispc that contains only one export function with rtcInit(). For all others (creating scene, set callbacks, cast rays) I use same C++ code as without ispc. Is it correct?

Thanks

How to properly link libembree.so to ispc program?

Hi,

I'm having difficulties working with Embree on an ispc program. For example, I created the following program:

#include <embree2/rtcore.isph>

export void bar()
{
  rtcInit();
}

And compiled with:

$ ispc -I/usr/local/include -o ispc/bar_ispc.o -h ispc/bar_ispc.h ispc/bar.ispc
$ clang -I./ -L/usr/local/lib -lembree ispc/bar_ispc.o main.cpp -v -o ${EXE}

This results in: ispc/bar.ispc:(.text+0x3): undefined reference to `rtcInit___un_3C_Cunt_3E_'

Many rays missing triangle edges

Dear embree developer(s),

I am having problems with rays that exactly touch triangle edges (from what I can see). My task is to voxelize a mesh then from each voxel center shoot many rays towards the surface and capture the closest hit. 

 

A hit by this definition should always happen but as you can see from this figure where I am visualizing only the misses with green lines:

 

Intersection with Triangles Aligned in the Same Plane

Firstly, thanks for the great library! Really enjoying playing around with it so far.

I have a question related to how Embree handles triangles that are aligned (and overlapping) in the same plane. To illustrate this please refer to the 2D examples below. In case 1, one triangle mesh (b) is enclosed within another (a) and one side is aligned and overlapping. In case 2, the triangle meshes (a and b) are side by side but share a side.

Подписаться на Embree: Photo-Realistic Ray Tracing Kernels