<?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: Reading Alembic Vertex Cache Data using FBX SDK in FBX Forum</title>
    <link>https://forums.autodesk.com/t5/fbx-forum/reading-alembic-vertex-cache-data-using-fbx-sdk/m-p/8212237#M1302</link>
    <description>&lt;P&gt;At this point, I must ask how you defined the alembic cache "in" the FBX file. For what I remember, Maya cannot export an alembic cache when you do "Create cache" (it only gives you the option to save mcc or mcx) therefore, I doubt you did export to the FBX file from Maya.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The FBX SDK can read abc files directly (limited to geometries and vertex caches) and the FbxScene with be polulated with the appropriate FbxMesh and FbxDeformer objects translated from Alembic (I assumed this is how you tried to read your ABC files).&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;For your information, FbxReview (v1.4.1.0) - desktop version - does read alembic files (both HDF5 and Ogawa flavors), as I just explained, by reading the ABC file directly. For the FBX SDK, please note that starting with version 2019.1, only the Ogawa flavor is supported. Also, be aware that &lt;STRONG&gt;we never provided&lt;/STRONG&gt; support of Alembic cache on its WindowStore and IOs versions.&lt;/P&gt;</description>
    <pubDate>Mon, 20 Aug 2018 20:04:26 GMT</pubDate>
    <dc:creator>regalir</dc:creator>
    <dc:date>2018-08-20T20:04:26Z</dc:date>
    <item>
      <title>Reading Alembic Vertex Cache Data using FBX SDK</title>
      <link>https://forums.autodesk.com/t5/fbx-forum/reading-alembic-vertex-cache-data-using-fbx-sdk/m-p/8201693#M1299</link>
      <description>&lt;P&gt;I'm trying to use the FBX SDK to pull vertex cache data out of Alembic files. (This is for a commercial product; it runs on normal FBX files.) The FBX SDK offers up an FbxVertexCacheDeformer and&amp;nbsp;FbxCache, but the channel data isn't right. I see vertex cache deformer Channel.Get() is "/Object01/Box01/Box01Shape[P]" instead of the expected FbxVertexCacheDeformer::ePositions constant, ie "0".&amp;nbsp; FbxCache::GetChannelIndex works (returning 0), but GetChannelDataType fails, returning false. Similarly I get bad results from GetChannelSamplingRate, SampleCount, and PointCount.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;My understanding is that the primary purpose of the Alembic part of the FBX SDK is to be able to read vertex cache data, so I'm pretty much expecting this to work. Is there a magic incantation required? Thanks&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;if (!pCache-&amp;gt;OpenFileForRead())&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; &amp;nbsp; // OK&lt;BR /&gt;{&lt;BR /&gt;fprintf(logf, "*** Couldn't open the alembic cache for reading.\n");&lt;BR /&gt;errors++;&lt;BR /&gt;return;&lt;BR /&gt;};&lt;BR /&gt;lChannelIndex = pCache-&amp;gt;GetChannelIndex(pVCD-&amp;gt;Channel.Get());&lt;BR /&gt;if (lChannelIndex &amp;lt; 0)&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;// returns zero&lt;BR /&gt;{&lt;BR /&gt;fprintf(logf, "*** Couldn't find the right alembic channel.\n");&lt;BR /&gt;errors++;&lt;BR /&gt;return;&lt;BR /&gt;};&lt;BR /&gt;pCache-&amp;gt;GetChannelDataType(lChannelIndex, lChnlType);&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; // this call returns FALSE, leaving lChnlType uninitialized&lt;BR /&gt;if (lChnlType != FbxCache::eFloatVectorArray)&lt;BR /&gt;{&lt;BR /&gt;fprintf(logf, "*** Data isn't float vectors.\n");&lt;BR /&gt;errors++;&lt;BR /&gt;return;&lt;BR /&gt;};&lt;/P&gt;</description>
      <pubDate>Wed, 15 Aug 2018 16:24:46 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/fbx-forum/reading-alembic-vertex-cache-data-using-fbx-sdk/m-p/8201693#M1299</guid>
      <dc:creator>ssontech</dc:creator>
      <dc:date>2018-08-15T16:24:46Z</dc:date>
    </item>
    <item>
      <title>Re: Reading Alembic Vertex Cache Data using FBX SDK</title>
      <link>https://forums.autodesk.com/t5/fbx-forum/reading-alembic-vertex-cache-data-using-fbx-sdk/m-p/8207973#M1300</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;first of all, not all the functions in the interface of the FbxCache apply to all the possible cache types. Some are in the Maya section and only apply to Maya caches. Calling them on the other supported caches format will not return any usable value. It is possible that, in a future release of the FBX SDK, we may be able to consolidate the FbxCache interface so more function could be called on all the supported cache formats.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;This being said, the current interface is enough to retrieve the Alembic data and the code snippet below should demonstrate how to access it. Note that I wrote it from memory and it may need some tweaking but, hopefully, you'll get the idea &lt;span class="lia-unicode-emoji" title=":winking_face:"&gt;😉&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;FbxVertexCacheDeformer* deformer = FbxCast&amp;lt;FbxVertexCacheDeformer&amp;gt;(pFbxVertexCacheDeformer);
FbxMesh* mesh = pFbxVertexCacheDeformer-&amp;gt;GetDstObject&amp;lt;FbxMesh&amp;gt;();
FbxCache* cache = deformer-&amp;gt;GetCache();
switch( deformer-&amp;gt;Type )
{
    case FbxVertexCacheDeformer::ePositions:	mVertexElement = Vertex::Element::Position; break;
    case FbxVertexCacheDeformer::eNormals:	mVertexElement = Vertex::Element::Normal; break;
    case FbxVertexCacheDeformer::eUVs:		mVertexElement = Vertex::Element::Texcoord0; break;
    case FbxVertexCacheDeformer::eTangents:	mVertexElement = Vertex::Element::Tangent; break;
    case FbxVertexCacheDeformer::eBinormals:	mVertexElement = Vertex::Element::Binormal; break;
    default:	break;
}

mChannelIndex = cache-&amp;gt;GetChannelIndex(deformer-&amp;gt;Channel.Get());
&lt;BR /&gt;//If cache type is ePosition, then we know that it is always defined by control point.&lt;BR /&gt;However, for all the other types we have to look how the data is mapped in the mesh &lt;BR /&gt;(using the LayerElement::GetMappingMode()) so we can validate that we receive the corrent&lt;BR /&gt;amount.&lt;BR /&gt;&lt;BR /&gt;mByControlPoint = ElementIsByControlPoint(mesh, mVertexElement);&lt;BR /&gt;if( deformer-&amp;gt;Type.Get() != FbxVertexCacheDeformer::ePositions )&lt;BR /&gt;{ &lt;BR /&gt;    //First, if the mesh got triangulated, we cannot use this data since it won't match anymore&lt;BR /&gt;    if( mesh-&amp;gt;mOriginalControlPointsCount != 0 ) { deformer-&amp;gt;Active = false; return; } &lt;BR /&gt;&lt;BR /&gt;    //Now verify that the cache channel read length is the size we are expecting&lt;BR /&gt;    unsigned int Length = 0; &lt;BR /&gt;    if( !cache-&amp;gt;Read(nullptr, Length, FBXSDK_TIME_ZERO, mChannelIndex) ) &lt;BR /&gt;    { &lt;BR /&gt;        mIsValid = false; &lt;BR /&gt;        FBX_ASSERT_NOW("Unable to read from cache file!"); &lt;BR /&gt;        return; &lt;BR /&gt;    } &lt;BR /&gt;&lt;BR /&gt;    if (mByControlPoint) &lt;BR /&gt;        deformer-&amp;gt;Active = (Length == mesh-&amp;gt;GetControlPointsCount() * 3 ); &lt;BR /&gt;    else &lt;BR /&gt;        deformer-&amp;gt;Active = (Length == mesh-&amp;gt;GetPolygonVertexCount() * 3 ); &lt;BR /&gt;&lt;BR /&gt;    if (!deformer-&amp;gt;Active) return;&lt;BR /&gt;} &lt;BR /&gt;&lt;BR /&gt;unsigned int lSampleCount;&lt;BR /&gt;ret = cache-&amp;gt;GetChannelSampleCount(mChannelIndex, lSampleCount, &amp;amp;lStatus);&lt;BR /&gt;if (ret &amp;amp;&amp;amp; lSampleCount)&lt;BR /&gt;{&lt;BR /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;FbxTime start, end, time, inc;&lt;BR /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;ret = lCache-&amp;gt;GetAnimationRange(lChannelIndex, start, end, &amp;amp;lStatus);&lt;BR /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;inc = (end - start) / lSampleCount;&lt;BR /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;for (time = start; time &amp;lt;= end; time += inc)&lt;BR /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;{&lt;BR /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;    unsigned int bufferSize;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; float* buffer = NULL; // buffer belongs to 'cache' it is allocated internally so we don't need &lt;BR /&gt;                              // to free it ourselves. But we need to set/reset the pointer&lt;BR /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;ret = cache-&amp;gt;Read(&amp;amp;buffer, bufferSize, time, mChannelIndex);&lt;BR /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;}&lt;BR /&gt;}&lt;BR /&gt;&lt;BR /&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 17 Aug 2018 20:45:27 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/fbx-forum/reading-alembic-vertex-cache-data-using-fbx-sdk/m-p/8207973#M1300</guid>
      <dc:creator>regalir</dc:creator>
      <dc:date>2018-08-17T20:45:27Z</dc:date>
    </item>
    <item>
      <title>Re: Reading Alembic Vertex Cache Data using FBX SDK</title>
      <link>https://forums.autodesk.com/t5/fbx-forum/reading-alembic-vertex-cache-data-using-fbx-sdk/m-p/8212171#M1301</link>
      <description>&lt;P&gt;Thanks for the message. I'm already using the functions labeled "Format Independent Functions", though&amp;nbsp;the GetChannelIndex function that you show and I use is in the Maya section. I call OpenFileForRead, which you do not... without it, even the GetChannelIndex function fails. Even with it, though, most of the format-independent Get....&amp;nbsp; functions fail or produce nil results. I can't get it to do anything useful. FBX Review doesn't read Alembic. There's no sample code, no sample files. I don't see that there's a way to proceed.&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span class="lia-unicode-emoji" title=":disappointed_face:"&gt;😞&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 20 Aug 2018 19:34:01 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/fbx-forum/reading-alembic-vertex-cache-data-using-fbx-sdk/m-p/8212171#M1301</guid>
      <dc:creator>sandnseapa</dc:creator>
      <dc:date>2018-08-20T19:34:01Z</dc:date>
    </item>
    <item>
      <title>Re: Reading Alembic Vertex Cache Data using FBX SDK</title>
      <link>https://forums.autodesk.com/t5/fbx-forum/reading-alembic-vertex-cache-data-using-fbx-sdk/m-p/8212237#M1302</link>
      <description>&lt;P&gt;At this point, I must ask how you defined the alembic cache "in" the FBX file. For what I remember, Maya cannot export an alembic cache when you do "Create cache" (it only gives you the option to save mcc or mcx) therefore, I doubt you did export to the FBX file from Maya.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The FBX SDK can read abc files directly (limited to geometries and vertex caches) and the FbxScene with be polulated with the appropriate FbxMesh and FbxDeformer objects translated from Alembic (I assumed this is how you tried to read your ABC files).&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;For your information, FbxReview (v1.4.1.0) - desktop version - does read alembic files (both HDF5 and Ogawa flavors), as I just explained, by reading the ABC file directly. For the FBX SDK, please note that starting with version 2019.1, only the Ogawa flavor is supported. Also, be aware that &lt;STRONG&gt;we never provided&lt;/STRONG&gt; support of Alembic cache on its WindowStore and IOs versions.&lt;/P&gt;</description>
      <pubDate>Mon, 20 Aug 2018 20:04:26 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/fbx-forum/reading-alembic-vertex-cache-data-using-fbx-sdk/m-p/8212237#M1302</guid>
      <dc:creator>regalir</dc:creator>
      <dc:date>2018-08-20T20:04:26Z</dc:date>
    </item>
    <item>
      <title>Re: Reading Alembic Vertex Cache Data using FBX SDK</title>
      <link>https://forums.autodesk.com/t5/fbx-forum/reading-alembic-vertex-cache-data-using-fbx-sdk/m-p/8212336#M1303</link>
      <description>&lt;P&gt;The file being read by FBX is an Alembic .abc Ogawa file containing animated vertex data, produced by a non-Autodesk application. The FBX SDK's overall emulation, where the .abc appears to be an FBX file, is generally working&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The FBX Review I tested with is the one in the Windows Store.&amp;nbsp;It's 1.4.1 --- I had no idea there was a separate but different version on Autodesk's site.... I'm pretty sure at one point the Windows Store version was the one folks were told to use, since I'd never be on the Windows Store otherwise &lt;span class="lia-unicode-emoji" title=":winking_face:"&gt;😉&lt;/span&gt; I'll have to see what it does for comparison&lt;/P&gt;</description>
      <pubDate>Mon, 20 Aug 2018 20:33:35 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/fbx-forum/reading-alembic-vertex-cache-data-using-fbx-sdk/m-p/8212336#M1303</guid>
      <dc:creator>sandnseapa</dc:creator>
      <dc:date>2018-08-20T20:33:35Z</dc:date>
    </item>
    <item>
      <title>Re: Reading Alembic Vertex Cache Data using FBX SDK</title>
      <link>https://forums.autodesk.com/t5/fbx-forum/reading-alembic-vertex-cache-data-using-fbx-sdk/m-p/8212382#M1304</link>
      <description>&lt;P&gt;My .abc file does read OK in FBX Review from Autodesk's site. That's good.... but bad because now I really don't know what incantation is required to make the vertex cache reading work! FWIW my reader uses FBX SDK 2018.1.1.&lt;/P&gt;</description>
      <pubDate>Mon, 20 Aug 2018 20:56:44 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/fbx-forum/reading-alembic-vertex-cache-data-using-fbx-sdk/m-p/8212382#M1304</guid>
      <dc:creator>sandnseapa</dc:creator>
      <dc:date>2018-08-20T20:56:44Z</dc:date>
    </item>
    <item>
      <title>Re: Reading Alembic Vertex Cache Data using FBX SDK</title>
      <link>https://forums.autodesk.com/t5/fbx-forum/reading-alembic-vertex-cache-data-using-fbx-sdk/m-p/8214140#M1305</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;the code snipped I gave you is coming from the sources of FbxReview &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt; but you can also look at the ViewScene sample. It can read abc files as well (although it only process the vertices channels mapped by control point).&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I am also attaching one of my test file (I generated it with Maya a while ago) so you have a file that you know is working. As you may already be aware, finding public ABC files for testing is practically impossible. We did our best to implement the Alembic support but, despite our efforts, it is not impossible that some alembic files are not correctly understood by the the FBX SDK simply because we did not have access to similar definitions for thorough testing.&lt;/P&gt;</description>
      <pubDate>Tue, 21 Aug 2018 14:17:05 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/fbx-forum/reading-alembic-vertex-cache-data-using-fbx-sdk/m-p/8214140#M1305</guid>
      <dc:creator>regalir</dc:creator>
      <dc:date>2018-08-21T14:17:05Z</dc:date>
    </item>
  </channel>
</rss>

