<?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 Wow! thank you very much, I in Intel® Embree Ray Tracing Kernels</title>
    <link>https://community.intel.com/t5/Intel-Embree-Ray-Tracing-Kernels/rtcSetTransform/m-p/1052218#M495</link>
    <description>&lt;P&gt;WOW! thank you very much! I didn't expect such an elaborate and detailed answer. Much appreciated.&lt;/P&gt;

&lt;P&gt;My best to you and the team.&lt;/P&gt;

&lt;P&gt;-Al&lt;/P&gt;</description>
    <pubDate>Thu, 03 Jul 2014 22:26:37 GMT</pubDate>
    <dc:creator>Al_N_</dc:creator>
    <dc:date>2014-07-03T22:26:37Z</dc:date>
    <item>
      <title>rtcSetTransform</title>
      <link>https://community.intel.com/t5/Intel-Embree-Ray-Tracing-Kernels/rtcSetTransform/m-p/1052214#M491</link>
      <description>&lt;P&gt;Hi, first let me say thank you for such a state-of-the-art kernel for CPU, it is by far the best ever developed.&lt;/P&gt;

&lt;P&gt;I'm trying to rotate an instance by setting the RTCMatrix parameter of rtcSetTransform but I can't seen to figure it out. I know it is an affine transformation matrix, but no matter what I do, it never rotate properly.&lt;/P&gt;

&lt;P&gt;My question, is there an example available showing the members of the matrix used for rotation? I know you have a tutorial but it only set the matrix to the identity matrix and use the last members&amp;nbsp;as a&amp;nbsp;position change only, no rotation.&lt;/P&gt;

&lt;P&gt;Thanks and I appreciate any info on this.&lt;BR /&gt;
	-Al&lt;/P&gt;</description>
      <pubDate>Mon, 30 Jun 2014 17:40:41 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Embree-Ray-Tracing-Kernels/rtcSetTransform/m-p/1052214#M491</guid>
      <dc:creator>Al_N_</dc:creator>
      <dc:date>2014-06-30T17:40:41Z</dc:date>
    </item>
    <item>
      <title>Hi AI,</title>
      <link>https://community.intel.com/t5/Intel-Embree-Ray-Tracing-Kernels/rtcSetTransform/m-p/1052215#M492</link>
      <description>&lt;P&gt;Could you give some more details about the kind of rotation you want to have, or even better post your code around rtcSetTransform? Maybe the matrix layout (ROW_MAJOR vs. COLUMN_MAJOR) is wrong?&lt;/P&gt;

&lt;P&gt;&amp;nbsp;&lt;/P&gt;

&lt;P&gt;Thanks,&lt;/P&gt;

&lt;P&gt;Carsten&lt;/P&gt;</description>
      <pubDate>Wed, 02 Jul 2014 12:27:00 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Embree-Ray-Tracing-Kernels/rtcSetTransform/m-p/1052215#M492</guid>
      <dc:creator>BenthinC_Intel</dc:creator>
      <dc:date>2014-07-02T12:27:00Z</dc:date>
    </item>
    <item>
      <title>Thanks for your reply.</title>
      <link>https://community.intel.com/t5/Intel-Embree-Ray-Tracing-Kernels/rtcSetTransform/m-p/1052216#M493</link>
      <description>&lt;P&gt;Thanks for your reply.&lt;BR /&gt;
	&lt;BR /&gt;
	I use the following...&lt;BR /&gt;
	&lt;A href="http://upload.wikimedia.org/math/f/4/a/f4ad490993bbaa220e41f727f07a5bd0.png"&gt;http://upload.wikimedia.org/math/f/4/a/f4ad490993bbaa220e41f727f07a5bd0.png&lt;/A&gt;&lt;BR /&gt;
	&lt;BR /&gt;
	and it doesn't matter if I use row or col major, it's not rotating on the correct axis and it's also sheering. I&amp;nbsp;move the members of the matrix in different position and still can't get it to work. Trying a simple 45 degree rotate along the X axis using every combinations I can think off still does not result a proper rotation. If I play with the order of the matrix, I get scaling, sheering, rotation, or any combination of them, but I still can't find the proper way to do it.&lt;BR /&gt;
	&lt;BR /&gt;
	Say for example, if&amp;nbsp;I want to rotate it on the up/dn axis by 10 degrees and&amp;nbsp;also scale it twice as large on all axis, how would the matrix be setup?&lt;BR /&gt;
	&lt;BR /&gt;
	Also, the rotation seems to also happen not at the center of the BBox but at the position defined by the last 4 members of the matrix. Is that how it's suppose to do it? Move the instance to that position and then rotate it around it's original position?&lt;BR /&gt;
	&lt;BR /&gt;
	I have no problem to use the rotation matrix in OpenGL, even use it for scaling, but in Embree I'm at a complete stop and lost.&lt;BR /&gt;
	&lt;BR /&gt;
	Thanks for helping...&lt;BR /&gt;
	-Al&lt;/P&gt;

&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 02 Jul 2014 20:11:49 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Embree-Ray-Tracing-Kernels/rtcSetTransform/m-p/1052216#M493</guid>
      <dc:creator>Al_N_</dc:creator>
      <dc:date>2014-07-02T20:11:49Z</dc:date>
    </item>
    <item>
      <title>Hi AI,</title>
      <link>https://community.intel.com/t5/Intel-Embree-Ray-Tracing-Kernels/rtcSetTransform/m-p/1052217#M494</link>
      <description>&lt;P&gt;Hi AI,&lt;/P&gt;

&lt;P&gt;I've modified the 'device_render' function in tutorial04_device.cpp so that the spheres rotate around themselves and scale their size. The modified code looks like:&lt;/P&gt;

&lt;P&gt;/* called by the C++ code to render */&lt;BR /&gt;
	extern "C" void device_render (int* pixels,&lt;BR /&gt;
	&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;const int width,&lt;BR /&gt;
	&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;const int height,&amp;nbsp;&lt;BR /&gt;
	&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;const float time,&lt;BR /&gt;
	&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;const Vec3fa&amp;amp; vx,&amp;nbsp;&lt;BR /&gt;
	&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;const Vec3fa&amp;amp; vy,&amp;nbsp;&lt;BR /&gt;
	&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;const Vec3fa&amp;amp; vz,&amp;nbsp;&lt;BR /&gt;
	&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;const Vec3fa&amp;amp; p)&lt;BR /&gt;
	{&lt;BR /&gt;
	&amp;nbsp; /* create identity matrix */&lt;BR /&gt;
	&amp;nbsp; AffineSpace3f xfm;&lt;BR /&gt;
	&amp;nbsp; xfm.l.vx = Vec3fa(1,0,0);&lt;BR /&gt;
	&amp;nbsp; xfm.l.vy = Vec3fa(0,1,0);&lt;BR /&gt;
	&amp;nbsp; xfm.l.vz = Vec3fa(0,0,1);&lt;BR /&gt;
	&amp;nbsp; xfm.p &amp;nbsp; &amp;nbsp;= Vec3fa(0,0,0);&lt;BR /&gt;
	&amp;nbsp; float t = 0.7f*time;&lt;BR /&gt;
	&amp;nbsp; float t_rot = 0.9f*time;&lt;BR /&gt;
	&amp;nbsp;&amp;nbsp;&lt;BR /&gt;
	&amp;nbsp; // rotate each sphere around the y-axis&lt;BR /&gt;
	&amp;nbsp; xfm.l.vx = Vec3fa(cos(t_rot),0,-sin(t_rot));&lt;BR /&gt;
	&amp;nbsp; xfm.l.vy = Vec3fa(0,1,0);&lt;BR /&gt;
	&amp;nbsp; xfm.l.vz = Vec3fa(sin(t_rot),0, cos(t_rot));&lt;/P&gt;

&lt;P&gt;&amp;nbsp; // apply some scaling to each sphere&lt;BR /&gt;
	&amp;nbsp; float s = 1.0f + sin(t) * 0.5f;&lt;BR /&gt;
	&amp;nbsp; AffineSpace3f scale;&lt;BR /&gt;
	&amp;nbsp; scale.l.vx = Vec3fa(s,0,0);&lt;BR /&gt;
	&amp;nbsp; scale.l.vy = Vec3fa(0,s,0);&lt;BR /&gt;
	&amp;nbsp; scale.l.vz = Vec3fa(0,0,s);&lt;BR /&gt;
	&amp;nbsp; scale.p &amp;nbsp; &amp;nbsp;= Vec3fa(0,0,0);&lt;/P&gt;

&lt;P&gt;&amp;nbsp; xfm *= scale;&lt;/P&gt;

&lt;P&gt;&amp;nbsp; /* move instances */&lt;BR /&gt;
	&amp;nbsp; xfm.p = 2.0f*Vec3fa(+cos(t),0.0f,+sin(t));&lt;BR /&gt;
	&amp;nbsp; rtcSetTransform(g_scene,g_instance0,RTC_MATRIX_COLUMN_MAJOR,(float*)&amp;amp;xfm);&lt;BR /&gt;
	&amp;nbsp; xfm.p = 2.0f*Vec3fa(-cos(t),0.0f,-sin(t));&lt;BR /&gt;
	&amp;nbsp; rtcSetTransform(g_scene,g_instance1,RTC_MATRIX_COLUMN_MAJOR,(float*)&amp;amp;xfm);&lt;BR /&gt;
	&amp;nbsp; xfm.p = 2.0f*Vec3fa(-sin(t),0.0f,+cos(t));&lt;BR /&gt;
	&amp;nbsp; rtcSetTransform(g_scene,g_instance2,RTC_MATRIX_COLUMN_MAJOR,(float*)&amp;amp;xfm);&lt;BR /&gt;
	&amp;nbsp; xfm.p = 2.0f*Vec3fa(+sin(t),0.0f,-cos(t));&lt;BR /&gt;
	&amp;nbsp; rtcSetTransform(g_scene,g_instance3,RTC_MATRIX_COLUMN_MAJOR,(float*)&amp;amp;xfm);&lt;/P&gt;

&lt;P&gt;&amp;nbsp; /* update scene */&lt;BR /&gt;
	&amp;nbsp; rtcUpdate(g_scene,g_instance0);&lt;BR /&gt;
	&amp;nbsp; rtcUpdate(g_scene,g_instance1);&lt;BR /&gt;
	&amp;nbsp; rtcUpdate(g_scene,g_instance2);&lt;BR /&gt;
	&amp;nbsp; rtcUpdate(g_scene,g_instance3);&lt;BR /&gt;
	&amp;nbsp; rtcCommit (g_scene);&lt;/P&gt;

&lt;P&gt;&amp;nbsp; /* render all pixels */&lt;BR /&gt;
	&amp;nbsp; const int numTilesX = (width +TILE_SIZE_X-1)/TILE_SIZE_X;&lt;BR /&gt;
	&amp;nbsp; const int numTilesY = (height+TILE_SIZE_Y-1)/TILE_SIZE_Y;&lt;BR /&gt;
	&amp;nbsp; launch_renderTile(numTilesX*numTilesY,pixels,width,height,time,vx,vy,vz,p,numTilesX,numTilesY);&amp;nbsp;&lt;BR /&gt;
	&amp;nbsp; rtcDebug();&lt;BR /&gt;
	}&lt;/P&gt;

&lt;P&gt;Does this help you further?&lt;/P&gt;

&lt;P&gt;Best regards,&lt;/P&gt;

&lt;P&gt;Carsten&lt;/P&gt;

&lt;P&gt;&amp;nbsp;&lt;/P&gt;

&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 03 Jul 2014 11:26:17 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Embree-Ray-Tracing-Kernels/rtcSetTransform/m-p/1052217#M494</guid>
      <dc:creator>BenthinC_Intel</dc:creator>
      <dc:date>2014-07-03T11:26:17Z</dc:date>
    </item>
    <item>
      <title>Wow! thank you very much, I</title>
      <link>https://community.intel.com/t5/Intel-Embree-Ray-Tracing-Kernels/rtcSetTransform/m-p/1052218#M495</link>
      <description>&lt;P&gt;WOW! thank you very much! I didn't expect such an elaborate and detailed answer. Much appreciated.&lt;/P&gt;

&lt;P&gt;My best to you and the team.&lt;/P&gt;

&lt;P&gt;-Al&lt;/P&gt;</description>
      <pubDate>Thu, 03 Jul 2014 22:26:37 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Embree-Ray-Tracing-Kernels/rtcSetTransform/m-p/1052218#M495</guid>
      <dc:creator>Al_N_</dc:creator>
      <dc:date>2014-07-03T22:26:37Z</dc:date>
    </item>
    <item>
      <title>One more thing, how is the</title>
      <link>https://community.intel.com/t5/Intel-Embree-Ray-Tracing-Kernels/rtcSetTransform/m-p/1052219#M496</link>
      <description>&lt;P&gt;One more thing, how is the position defined? is it relative to the master of the instance? So it seems if I set the position to zero and simply use an identity matrix for the rotation, it is at the same place as the master. But as soon as I use a rotation, it no longer stay at the same place even though the position is set to zero!!??&lt;/P&gt;

&lt;P&gt;Thanks&lt;/P&gt;

&lt;P&gt;-Al&lt;/P&gt;</description>
      <pubDate>Sat, 05 Jul 2014 20:29:07 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Embree-Ray-Tracing-Kernels/rtcSetTransform/m-p/1052219#M496</guid>
      <dc:creator>Al_N_</dc:creator>
      <dc:date>2014-07-05T20:29:07Z</dc:date>
    </item>
    <item>
      <title>Hi,</title>
      <link>https://community.intel.com/t5/Intel-Embree-Ray-Tracing-Kernels/rtcSetTransform/m-p/1052220#M497</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;

&lt;P&gt;The transformation passed to &lt;CODE&gt;rtcSetTransform&lt;/CODE&gt; transforms from the local space of the instantiated scene, to world space. About your rotation/translation issue, could you post some example code?&amp;nbsp;&lt;/P&gt;

&lt;P&gt;Thanks,&lt;/P&gt;

&lt;P&gt;Carsten&lt;/P&gt;</description>
      <pubDate>Wed, 09 Jul 2014 10:13:37 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Embree-Ray-Tracing-Kernels/rtcSetTransform/m-p/1052220#M497</guid>
      <dc:creator>BenthinC_Intel</dc:creator>
      <dc:date>2014-07-09T10:13:37Z</dc:date>
    </item>
    <item>
      <title>Hi,</title>
      <link>https://community.intel.com/t5/Intel-Embree-Ray-Tracing-Kernels/rtcSetTransform/m-p/1052221#M498</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;

&lt;P&gt;I'm using your tutorial #4 and all works perfectly now with positioning&amp;nbsp;but I have one last question, what do I need to do in the shading code to shade rotated instances properly? They shade properly if not rotated, but not when rotated.&lt;/P&gt;

&lt;P&gt;Thanks for your help.&lt;/P&gt;

&lt;P&gt;-Al&lt;/P&gt;</description>
      <pubDate>Wed, 09 Jul 2014 17:10:00 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Embree-Ray-Tracing-Kernels/rtcSetTransform/m-p/1052221#M498</guid>
      <dc:creator>Al_N_</dc:creator>
      <dc:date>2014-07-09T17:10:00Z</dc:date>
    </item>
  </channel>
</rss>

