<?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: What to do if a control point contains multiple UVs? in FBX Forum</title>
    <link>https://forums.autodesk.com/t5/fbx-forum/what-to-do-if-a-control-point-contains-multiple-uvs/m-p/11521346#M253</link>
    <description>&lt;P&gt;Turns out it's caused by wrong index buffer in my code.&lt;/P&gt;&lt;P&gt;I found building indices with&amp;nbsp;GetPolygonVertex() was wrong.&lt;/P&gt;&lt;P&gt;Instead, the index stored in&amp;nbsp;UVElement-&amp;gt;GetIndexArray() provides the proper indices!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;This really surprises me, I thought&amp;nbsp;GetControlPoints can be used for vertex buffer directly.&lt;/P&gt;&lt;P&gt;And I just built index buffer with&amp;nbsp;GetPolygonVertex(). But I was wrong.&lt;/P&gt;&lt;P&gt;I need to get index array from UV element, and reconstruct a larger vertex buffer with some duplicate control points.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;In my case, a mesh has 81 control points and the max value in&amp;nbsp;GetPolygonVertex() is 80. However, the UV index can be up to 101 in the mesh. The mesh supposes to have 102 control points! I guess those duplicated points are "optimized" during export. But it's fine, I'll just construct my data based on index array of UV element.&lt;/P&gt;</description>
    <pubDate>Mon, 31 Oct 2022 21:21:42 GMT</pubDate>
    <dc:creator>ltes50414</dc:creator>
    <dc:date>2022-10-31T21:21:42Z</dc:date>
    <item>
      <title>What to do if a control point contains multiple UVs?</title>
      <link>https://forums.autodesk.com/t5/fbx-forum/what-to-do-if-a-control-point-contains-multiple-uvs/m-p/11521144#M252</link>
      <description>&lt;P&gt;Here is the code piece that I'm using for importing texture UV from FBX:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Noname.jpg" style="width: 999px;"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/1134247iBF739E5B3A86757A/image-size/large?v=v2&amp;amp;px=999" role="button" title="Noname.jpg" alt="Noname.jpg" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;The "Result" is a vector which has the same size as control points.&lt;/P&gt;&lt;P&gt;I imagine the number of UVElement-&amp;gt;GetDirectArray() should have the same number as control point.&lt;/P&gt;&lt;P&gt;So I wrote the loaded UV with control point index to the Result.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;However here is the problem: &lt;STRONG&gt;The UV counts could be different than control point counts!&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;I realized the same control point index could have multiple UV values...&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Do I simply sum the UVs and average them?&lt;/P&gt;&lt;P&gt;Or there is a way to get proper weight for blending the UVs?&lt;/P&gt;&lt;P&gt;None of official sample seems to mention this.&lt;/P&gt;&lt;P&gt;Many thanks!&lt;/P&gt;</description>
      <pubDate>Mon, 31 Oct 2022 19:31:38 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/fbx-forum/what-to-do-if-a-control-point-contains-multiple-uvs/m-p/11521144#M252</guid>
      <dc:creator>ltes50414</dc:creator>
      <dc:date>2022-10-31T19:31:38Z</dc:date>
    </item>
    <item>
      <title>Re: What to do if a control point contains multiple UVs?</title>
      <link>https://forums.autodesk.com/t5/fbx-forum/what-to-do-if-a-control-point-contains-multiple-uvs/m-p/11521346#M253</link>
      <description>&lt;P&gt;Turns out it's caused by wrong index buffer in my code.&lt;/P&gt;&lt;P&gt;I found building indices with&amp;nbsp;GetPolygonVertex() was wrong.&lt;/P&gt;&lt;P&gt;Instead, the index stored in&amp;nbsp;UVElement-&amp;gt;GetIndexArray() provides the proper indices!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;This really surprises me, I thought&amp;nbsp;GetControlPoints can be used for vertex buffer directly.&lt;/P&gt;&lt;P&gt;And I just built index buffer with&amp;nbsp;GetPolygonVertex(). But I was wrong.&lt;/P&gt;&lt;P&gt;I need to get index array from UV element, and reconstruct a larger vertex buffer with some duplicate control points.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;In my case, a mesh has 81 control points and the max value in&amp;nbsp;GetPolygonVertex() is 80. However, the UV index can be up to 101 in the mesh. The mesh supposes to have 102 control points! I guess those duplicated points are "optimized" during export. But it's fine, I'll just construct my data based on index array of UV element.&lt;/P&gt;</description>
      <pubDate>Mon, 31 Oct 2022 21:21:42 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/fbx-forum/what-to-do-if-a-control-point-contains-multiple-uvs/m-p/11521346#M253</guid>
      <dc:creator>ltes50414</dc:creator>
      <dc:date>2022-10-31T21:21:42Z</dc:date>
    </item>
  </channel>
</rss>

