<?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 Re: Issue with RTC_GEOMETRY_TYPE_DISC_POINT intersect in Intel® Embree Ray Tracing Kernels</title>
    <link>https://community.intel.com/t5/Intel-Embree-Ray-Tracing-Kernels/Issue-with-RTC-GEOMETRY-TYPE-DISC-POINT-intersect/m-p/1269532#M909</link>
    <description>&lt;P&gt;Thanks a lot, this solution perfectly works. You saved my day.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Wed, 31 Mar 2021 08:03:14 GMT</pubDate>
    <dc:creator>Sunier__Romain</dc:creator>
    <dc:date>2021-03-31T08:03:14Z</dc:date>
    <item>
      <title>Issue with RTC_GEOMETRY_TYPE_DISC_POINT intersect</title>
      <link>https://community.intel.com/t5/Intel-Embree-Ray-Tracing-Kernels/Issue-with-RTC-GEOMETRY-TYPE-DISC-POINT-intersect/m-p/1269252#M907</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;in order to move our in house renderer to an embree accelerated solution i made some integration tests.&lt;/P&gt;
&lt;P&gt;After several tests with RTC_GEOMETRY_TYPE_DISC_POINT intersect, I found a weird behavior.&lt;/P&gt;
&lt;P&gt;I tried to build a fonction that gather multiple hits but some points were never intersected.&lt;/P&gt;
&lt;P&gt;I simplified the case and i found that if the ray starts inside a box of 2 time the point radius, the hit never occurs.&lt;/P&gt;
&lt;P&gt;You can try the following exemple:&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;
&lt;P&gt;RTCDevice device = rtcNewDevice( NULL );&lt;BR /&gt;RTCScene scn = rtcNewScene( device );&lt;/P&gt;
&lt;P&gt;auto RTCGeom = rtcNewGeometry( device, RTC_GEOMETRY_TYPE_DISC_POINT);&lt;/P&gt;
&lt;P&gt;Parts *point = (Parts*)rtcSetNewGeometryBuffer( RTCGeom,&lt;BR /&gt;RTC_BUFFER_TYPE_VERTEX,&lt;BR /&gt;0, RTC_FORMAT_FLOAT4,&lt;BR /&gt;sizeof(Parts), 1);&lt;/P&gt;
&lt;P&gt;// Parts ( x,y,z,radius )&lt;BR /&gt;point[0] = { 0, 0, 0 ,4 };&lt;/P&gt;
&lt;P&gt;// finally commit rtc geometry changes&lt;BR /&gt;rtcCommitGeometry( RTCGeom );&lt;BR /&gt;rtcAttachGeometry( scn, RTCGeom );&lt;BR /&gt;rtcCommitScene( scn );&lt;/P&gt;
&lt;P&gt;// init ray inside "box" of size radius&lt;BR /&gt;RTCRayHit rayHit;&lt;/P&gt;
&lt;P&gt;rayHit.ray.org_x = 0;&lt;BR /&gt;rayHit.ray.org_y = 0;&lt;BR /&gt;rayHit.ray.org_z = -1; // less than 2 x radius&lt;/P&gt;
&lt;P&gt;rayHit.ray.dir_x = 0;&lt;BR /&gt;rayHit.ray.dir_y = 0;&lt;BR /&gt;rayHit.ray.dir_z = 1;&lt;/P&gt;
&lt;P&gt;rayHit.ray.mask = 1;&lt;BR /&gt;rayHit.ray.time = 0;&lt;/P&gt;
&lt;P&gt;rayHit.ray.tnear = 0;&lt;BR /&gt;rayHit.ray.tfar = 100000000;&lt;/P&gt;
&lt;P&gt;rayHit.hit.geomID = RTC_INVALID_GEOMETRY_ID;&lt;BR /&gt;rayHit.hit.primID = RTC_INVALID_GEOMETRY_ID;&lt;BR /&gt;rayHit.hit.instID[0] = RTC_INVALID_GEOMETRY_ID;&lt;/P&gt;
&lt;P&gt;RTCIntersectContext context;&lt;BR /&gt;rtcIntersect1( scn, &amp;amp;context, &amp;amp;rayHit);&lt;/P&gt;
&lt;P&gt;if( rayHit.hit.geomID != RTC_INVALID_GEOMETRY_ID )&lt;BR /&gt;{&lt;BR /&gt;std::cerr&amp;lt;&amp;lt;"found hit inside "&amp;lt;&amp;lt;std::endl;&lt;BR /&gt;}&lt;BR /&gt;else&lt;BR /&gt;{&lt;BR /&gt;std::cerr&amp;lt;&amp;lt;"no hit inside"&amp;lt;&amp;lt;std::endl;&lt;BR /&gt;}&lt;/P&gt;
&lt;P&gt;// init ray outside "box" of size radius&lt;BR /&gt;RTCRayHit rayHit2;&lt;/P&gt;
&lt;P&gt;rayHit2.ray.org_x = 0;&lt;BR /&gt;rayHit2.ray.org_y = 0;&lt;BR /&gt;rayHit2.ray.org_z = -10; // more than 2 x radius&lt;/P&gt;
&lt;P&gt;rayHit2.ray.dir_x = 0;&lt;BR /&gt;rayHit2.ray.dir_y = 0;&lt;BR /&gt;rayHit2.ray.dir_z = 1;&lt;/P&gt;
&lt;P&gt;rayHit2.ray.mask = 1;&lt;BR /&gt;rayHit2.ray.time = 0;&lt;/P&gt;
&lt;P&gt;rayHit2.ray.tnear = 0;&lt;BR /&gt;rayHit2.ray.tfar = 100000000;&lt;/P&gt;
&lt;P&gt;rayHit2.hit.geomID = RTC_INVALID_GEOMETRY_ID;&lt;BR /&gt;rayHit2.hit.primID = RTC_INVALID_GEOMETRY_ID;&lt;BR /&gt;rayHit2.hit.instID[0] = RTC_INVALID_GEOMETRY_ID;&lt;/P&gt;
&lt;P&gt;RTCIntersectContext context2;&lt;BR /&gt;rtcIntersect1( scn, &amp;amp;context2, &amp;amp;rayHit2);&lt;/P&gt;
&lt;P&gt;if( rayHit2.hit.geomID != RTC_INVALID_GEOMETRY_ID )&lt;BR /&gt;{&lt;BR /&gt;std::cerr&amp;lt;&amp;lt;"found hit outside"&amp;lt;&amp;lt;std::endl;&lt;BR /&gt;}&lt;BR /&gt;else&lt;BR /&gt;{&lt;BR /&gt;std::cerr&amp;lt;&amp;lt;"no hit outside"&amp;lt;&amp;lt;std::endl;&lt;BR /&gt;}&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The result is :&lt;/P&gt;
&lt;P&gt;no hit inside&lt;/P&gt;
&lt;P&gt;found hit outside&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Did i miss something or there is an issue with Point / Curves geometry ( as they both use the same intersector )&lt;/P&gt;</description>
      <pubDate>Tue, 30 Mar 2021 15:56:46 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Embree-Ray-Tracing-Kernels/Issue-with-RTC-GEOMETRY-TYPE-DISC-POINT-intersect/m-p/1269252#M907</guid>
      <dc:creator>Sunier__Romain</dc:creator>
      <dc:date>2021-03-30T15:56:46Z</dc:date>
    </item>
    <item>
      <title>Re: Issue with RTC_GEOMETRY_TYPE_DISC_POINT intersect</title>
      <link>https://community.intel.com/t5/Intel-Embree-Ray-Tracing-Kernels/Issue-with-RTC-GEOMETRY-TYPE-DISC-POINT-intersect/m-p/1269464#M908</link>
      <description>&lt;P&gt;This is a feature to avoid self intersections when shooting secondary rays from the hit point.&lt;/P&gt;
&lt;P&gt;You can disable this feature by setting the CMake config EMBREE_CURVE_SELF_INTERSECTION_AVOIDANCE_FACTOR to 0. But then you have to take care of self intersections of ray oriented points and flat curve types yourself by starting secondary rays the curve/point radius away of the curve/point.&lt;/P&gt;</description>
      <pubDate>Wed, 31 Mar 2021 05:12:14 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Embree-Ray-Tracing-Kernels/Issue-with-RTC-GEOMETRY-TYPE-DISC-POINT-intersect/m-p/1269464#M908</guid>
      <dc:creator>SvenW_Intel</dc:creator>
      <dc:date>2021-03-31T05:12:14Z</dc:date>
    </item>
    <item>
      <title>Re: Issue with RTC_GEOMETRY_TYPE_DISC_POINT intersect</title>
      <link>https://community.intel.com/t5/Intel-Embree-Ray-Tracing-Kernels/Issue-with-RTC-GEOMETRY-TYPE-DISC-POINT-intersect/m-p/1269532#M909</link>
      <description>&lt;P&gt;Thanks a lot, this solution perfectly works. You saved my day.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 31 Mar 2021 08:03:14 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Embree-Ray-Tracing-Kernels/Issue-with-RTC-GEOMETRY-TYPE-DISC-POINT-intersect/m-p/1269532#M909</guid>
      <dc:creator>Sunier__Romain</dc:creator>
      <dc:date>2021-03-31T08:03:14Z</dc:date>
    </item>
  </channel>
</rss>

