<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Double intersection at the edge between two triangles in Intel® Embree Ray Tracing Kernels</title>
    <link>https://community.intel.com/t5/Intel-Embree-Ray-Tracing-Kernels/Double-intersection-at-the-edge-between-two-triangles/m-p/1168536#M804</link>
    <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;I am using Embree to compute all the intersection along a ray path with a triangular mesh. I do this using a ray filter function that adds every intersection met to a list of intersection. This works fine for most of the cases and using the Pluecker intersection function, the intersection process is watertight, which is a &lt;STRONG&gt;very &lt;/STRONG&gt;good thing in my application.&lt;/P&gt;&lt;P&gt;However, when a ray hits an edge between two triangles, sometimes, the ray/triangle intersection function finds two hits, one for each triangle T1 and T2.&lt;BR /&gt;My guess is that minUVW &amp;gt;=&amp;nbsp;ulp * (U + V + W) for T1 and maxUVW &amp;lt;= ulp (U + V + W) for T2, which results in both the intersection being valid. In the resulting hits, tfar is around 10²~10³ and u is around 10⁻⁴ for T1 and -10⁻⁴&amp;nbsp; for T2.&lt;/P&gt;&lt;P&gt;In this specific situation, I could simply chose on of the two intersections, but I need to know whether the intersections are indeed on the same&amp;nbsp;edge, in which case I need to select only one. Otherwise, I would need to keep both the intersections.&lt;/P&gt;&lt;P&gt;My current idea is, for both hits, to select which of the three barycentric coordinates has the lowest absolute value, x and y. Then I would check if x and y are of differents signs, which would make it very likely that the intersections happened to be on the same edge.&lt;BR /&gt;However, I'm not sure of the robustness of such a solution. I'm guessing it would not be very efficient around vertices, but I could live with that.&lt;/P&gt;&lt;P&gt;What are your thoughts about this problem?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Sat, 01 Dec 2018 16:37:21 GMT</pubDate>
    <dc:creator>Chouh__Hamza1</dc:creator>
    <dc:date>2018-12-01T16:37:21Z</dc:date>
    <item>
      <title>Double intersection at the edge between two triangles</title>
      <link>https://community.intel.com/t5/Intel-Embree-Ray-Tracing-Kernels/Double-intersection-at-the-edge-between-two-triangles/m-p/1168536#M804</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;I am using Embree to compute all the intersection along a ray path with a triangular mesh. I do this using a ray filter function that adds every intersection met to a list of intersection. This works fine for most of the cases and using the Pluecker intersection function, the intersection process is watertight, which is a &lt;STRONG&gt;very &lt;/STRONG&gt;good thing in my application.&lt;/P&gt;&lt;P&gt;However, when a ray hits an edge between two triangles, sometimes, the ray/triangle intersection function finds two hits, one for each triangle T1 and T2.&lt;BR /&gt;My guess is that minUVW &amp;gt;=&amp;nbsp;ulp * (U + V + W) for T1 and maxUVW &amp;lt;= ulp (U + V + W) for T2, which results in both the intersection being valid. In the resulting hits, tfar is around 10²~10³ and u is around 10⁻⁴ for T1 and -10⁻⁴&amp;nbsp; for T2.&lt;/P&gt;&lt;P&gt;In this specific situation, I could simply chose on of the two intersections, but I need to know whether the intersections are indeed on the same&amp;nbsp;edge, in which case I need to select only one. Otherwise, I would need to keep both the intersections.&lt;/P&gt;&lt;P&gt;My current idea is, for both hits, to select which of the three barycentric coordinates has the lowest absolute value, x and y. Then I would check if x and y are of differents signs, which would make it very likely that the intersections happened to be on the same edge.&lt;BR /&gt;However, I'm not sure of the robustness of such a solution. I'm guessing it would not be very efficient around vertices, but I could live with that.&lt;/P&gt;&lt;P&gt;What are your thoughts about this problem?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sat, 01 Dec 2018 16:37:21 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Embree-Ray-Tracing-Kernels/Double-intersection-at-the-edge-between-two-triangles/m-p/1168536#M804</guid>
      <dc:creator>Chouh__Hamza1</dc:creator>
      <dc:date>2018-12-01T16:37:21Z</dc:date>
    </item>
  </channel>
</rss>

