<?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 But even using intersection in Intel® Embree Ray Tracing Kernels</title>
    <link>https://community.intel.com/t5/Intel-Embree-Ray-Tracing-Kernels/Barycentric-coordinates-u-v/m-p/1016806#M376</link>
    <description>&lt;P&gt;But even using intersection filter functions, I would still have to update the ray after every hit inside the filter function right? In that case should I use u,v coordinates or just update ray.tnear for the new ray? Which is a better way of doing it?&lt;/P&gt;</description>
    <pubDate>Mon, 04 Aug 2014 20:37:23 GMT</pubDate>
    <dc:creator>ritwik_d_</dc:creator>
    <dc:date>2014-08-04T20:37:23Z</dc:date>
    <item>
      <title>Barycentric coordinates u, v</title>
      <link>https://community.intel.com/t5/Intel-Embree-Ray-Tracing-Kernels/Barycentric-coordinates-u-v/m-p/1016800#M370</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;

&lt;P&gt;After intersecting a ray with a scene, what is the proper way to use the u, v &amp;nbsp;coordinates to calculate the world coordinates (x, y, z) of the hit? I believe from the geomID and primID, I can identify the triangle which is hit and its corresponding v0, v1, v2. But now what do I do?&lt;/P&gt;</description>
      <pubDate>Mon, 04 Aug 2014 04:36:23 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Embree-Ray-Tracing-Kernels/Barycentric-coordinates-u-v/m-p/1016800#M370</guid>
      <dc:creator>ritwik_d_</dc:creator>
      <dc:date>2014-08-04T04:36:23Z</dc:date>
    </item>
    <item>
      <title>Just calculate ray.org + ray</title>
      <link>https://community.intel.com/t5/Intel-Embree-Ray-Tracing-Kernels/Barycentric-coordinates-u-v/m-p/1016801#M371</link>
      <description>&lt;P&gt;Just calculate ray.org + ray.tfar * ray.dir to get the hit point in world coordinates.&lt;/P&gt;</description>
      <pubDate>Mon, 04 Aug 2014 06:39:54 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Embree-Ray-Tracing-Kernels/Barycentric-coordinates-u-v/m-p/1016801#M371</guid>
      <dc:creator>SvenW_Intel</dc:creator>
      <dc:date>2014-08-04T06:39:54Z</dc:date>
    </item>
    <item>
      <title>sidenote: calculating it from</title>
      <link>https://community.intel.com/t5/Intel-Embree-Ray-Tracing-Kernels/Barycentric-coordinates-u-v/m-p/1016802#M372</link>
      <description>&lt;P&gt;sidenote: calculating it from uv coordinates is MUCH more precise and will drastically reduce amount of selfintersections from subsequent secondary rays.&lt;/P&gt;</description>
      <pubDate>Mon, 04 Aug 2014 08:58:05 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Embree-Ray-Tracing-Kernels/Barycentric-coordinates-u-v/m-p/1016802#M372</guid>
      <dc:creator>Ondra_K_</dc:creator>
      <dc:date>2014-08-04T08:58:05Z</dc:date>
    </item>
    <item>
      <title>I agree, the accuracy can be</title>
      <link>https://community.intel.com/t5/Intel-Embree-Ray-Tracing-Kernels/Barycentric-coordinates-u-v/m-p/1016803#M373</link>
      <description>&lt;P&gt;I agree, the accuracy can be much higher when you use the u/v coordinates to calculate the hit point.You can do this the following way:&amp;nbsp;&lt;SPAN style="font-size: 1em; line-height: 1.5;"&gt;Ph = (1.0f-ray.u-ray.v)*p0 + ray.u*p1 + ray.v*p2&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 04 Aug 2014 09:16:27 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Embree-Ray-Tracing-Kernels/Barycentric-coordinates-u-v/m-p/1016803#M373</guid>
      <dc:creator>SvenW_Intel</dc:creator>
      <dc:date>2014-08-04T09:16:27Z</dc:date>
    </item>
    <item>
      <title>Hi Sven,</title>
      <link>https://community.intel.com/t5/Intel-Embree-Ray-Tracing-Kernels/Barycentric-coordinates-u-v/m-p/1016804#M374</link>
      <description>&lt;P&gt;Hi Sven,&lt;/P&gt;

&lt;P&gt;In your example p0, p1 and p2 are 3 vertices of the triangle right?&lt;/P&gt;

&lt;P&gt;Another question: I am trying to iteratively shoot a ray until it escapes the triangle mesh. So basically what I am doing is, I will shoot a ray and if it hits a geometry I will shoot another ray from the hit in the same direction and I will keep doing this untill the ray does not hit anything. In this case, I am constructing a ray only once and at every iteration I am just changing the ray.tnear to the previous value of ray.tfar. Is this a good way to do this? or should I calculate the exact coordinates of the hit and then shoot the next ray?&lt;/P&gt;

&lt;P&gt;Thanks&lt;/P&gt;</description>
      <pubDate>Mon, 04 Aug 2014 16:24:42 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Embree-Ray-Tracing-Kernels/Barycentric-coordinates-u-v/m-p/1016804#M374</guid>
      <dc:creator>ritwik_d_</dc:creator>
      <dc:date>2014-08-04T16:24:42Z</dc:date>
    </item>
    <item>
      <title>Yes, these are the triangle</title>
      <link>https://community.intel.com/t5/Intel-Embree-Ray-Tracing-Kernels/Barycentric-coordinates-u-v/m-p/1016805#M375</link>
      <description>&lt;P&gt;Yes, these are the triangle vertices.&lt;/P&gt;

&lt;P&gt;What you describe is one way of finding all hits along the ray. However, depending on your application, a more efficient way of doing this is to use the intersection filter feature of the newer Embree versions.&lt;/P&gt;</description>
      <pubDate>Mon, 04 Aug 2014 18:10:44 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Embree-Ray-Tracing-Kernels/Barycentric-coordinates-u-v/m-p/1016805#M375</guid>
      <dc:creator>SvenW_Intel</dc:creator>
      <dc:date>2014-08-04T18:10:44Z</dc:date>
    </item>
    <item>
      <title>But even using intersection</title>
      <link>https://community.intel.com/t5/Intel-Embree-Ray-Tracing-Kernels/Barycentric-coordinates-u-v/m-p/1016806#M376</link>
      <description>&lt;P&gt;But even using intersection filter functions, I would still have to update the ray after every hit inside the filter function right? In that case should I use u,v coordinates or just update ray.tnear for the new ray? Which is a better way of doing it?&lt;/P&gt;</description>
      <pubDate>Mon, 04 Aug 2014 20:37:23 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Embree-Ray-Tracing-Kernels/Barycentric-coordinates-u-v/m-p/1016806#M376</guid>
      <dc:creator>ritwik_d_</dc:creator>
      <dc:date>2014-08-04T20:37:23Z</dc:date>
    </item>
    <item>
      <title>Inside the filter function</title>
      <link>https://community.intel.com/t5/Intel-Embree-Ray-Tracing-Kernels/Barycentric-coordinates-u-v/m-p/1016807#M377</link>
      <description>&lt;P&gt;Inside the filter function you would only reject the hit by setting ray.geomID to -1. You would further put the hit into some list. However, you will gather the hits in some unspecified order.&lt;/P&gt;</description>
      <pubDate>Tue, 05 Aug 2014 05:45:57 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Embree-Ray-Tracing-Kernels/Barycentric-coordinates-u-v/m-p/1016807#M377</guid>
      <dc:creator>SvenW_Intel</dc:creator>
      <dc:date>2014-08-05T05:45:57Z</dc:date>
    </item>
    <item>
      <title>So that means I call</title>
      <link>https://community.intel.com/t5/Intel-Embree-Ray-Tracing-Kernels/Barycentric-coordinates-u-v/m-p/1016808#M378</link>
      <description>&lt;P&gt;So that means I call rtcIntersect() only once and as long as I keep rejecting the hit, the ray keeps going through?&lt;/P&gt;

&lt;P&gt;Also, once I call&amp;nbsp;rtcSetIntersectionFilterFunction(), the filter function is set, after that how do I revert back to normal behaviour, i.e. how to I detach the callback filter function?&lt;/P&gt;</description>
      <pubDate>Tue, 05 Aug 2014 07:04:35 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Embree-Ray-Tracing-Kernels/Barycentric-coordinates-u-v/m-p/1016808#M378</guid>
      <dc:creator>ritwik_d_</dc:creator>
      <dc:date>2014-08-05T07:04:35Z</dc:date>
    </item>
    <item>
      <title>Yes, you call rtcIntersect</title>
      <link>https://community.intel.com/t5/Intel-Embree-Ray-Tracing-Kernels/Barycentric-coordinates-u-v/m-p/1016809#M379</link>
      <description>&lt;P&gt;Yes, you call rtcIntersect only once and get all hits reported.&lt;/P&gt;

&lt;P&gt;Setting back the filter function can be done in two ways:&lt;/P&gt;

&lt;P&gt;1) reset the filter function by using the rtcSetIntersectionFilterFunction call with NULL as filter function&lt;/P&gt;

&lt;P&gt;2) or register one global wrapper filter function, which reads a function pointer out of the ray (you can extend the ray at the end with your own data) and call this function pointer if it is not NULL. This way the feature can essentially be enabled per ray.&lt;/P&gt;</description>
      <pubDate>Tue, 05 Aug 2014 07:23:18 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Embree-Ray-Tracing-Kernels/Barycentric-coordinates-u-v/m-p/1016809#M379</guid>
      <dc:creator>SvenW_Intel</dc:creator>
      <dc:date>2014-08-05T07:23:18Z</dc:date>
    </item>
  </channel>
</rss>

