<?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: Import/Export BVH question in FBX Forum</title>
    <link>https://forums.autodesk.com/t5/fbx-forum/import-export-bvh-question/m-p/13027458#M804</link>
    <description>&lt;P&gt;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/1650435"&gt;@regalir&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Is there any solution to this?&lt;BR /&gt;Apparently, when I imported BVH, LclTranslation was already returned as 0.&lt;BR /&gt;Is there anything else to set when importing?&lt;/P&gt;</description>
    <pubDate>Wed, 18 Sep 2024 07:30:44 GMT</pubDate>
    <dc:creator>genk05223122</dc:creator>
    <dc:date>2024-09-18T07:30:44Z</dc:date>
    <item>
      <title>Import/Export BVH question</title>
      <link>https://forums.autodesk.com/t5/fbx-forum/import-export-bvh-question/m-p/9628044#M790</link>
      <description>&lt;P&gt;&lt;SPAN&gt;Hello, &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;We are currently working on our 3d software import/export process. &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;We need to import .bvh files and we saw that it's possible with your fbx sdk (we are already use it for fbx). &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;After a try, it works well ! But now, we would like to export BVH files. &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;After using the FbxExporter initialize funtion (virtual bool Initialize(const char* pFileName, int pFileFormat = -1, FbxIOSettings* pIOSettings = NULL)) with pFileFormat = -1, Export function returns false and our resulted file is empty.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;We are a bit disapointed because on your website, we can find 2 different informations : &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;- "Remarks: According to the file suffix, a specialized writer will be created internally. Ex: for .fbx files a FBX Writer, for .3ds files, a 3ds writer, etc. Supported files formats: FBX 5/6/7 Binary &amp;amp; ASCII, Collada, DXF, OBJ, 3DS" &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;- "MotionFiles readers/writers are now registered in the public FBX SDK. &lt;/SPAN&gt;&lt;SPAN&gt;This means that the FBX SDK can now import and export the following motion file formats: Biovision (BVH), MotionAnalysis (HTR/TRC), Acclaim (ASF/AMC), Vicon (C3D), Adaptive Optics (AOA), and Superfluo (MCD)." &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Our question : Can we export .bvh files with the fbx sdk ? If yes, what are we doing wrong ? &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Regards, &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Nukeygara team&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 10 Jul 2020 08:38:50 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/fbx-forum/import-export-bvh-question/m-p/9628044#M790</guid>
      <dc:creator>ebeschetRKDHJ</dc:creator>
      <dc:date>2020-07-10T08:38:50Z</dc:date>
    </item>
    <item>
      <title>Re: Import/Export BVH question</title>
      <link>https://forums.autodesk.com/t5/fbx-forum/import-export-bvh-question/m-p/9639054#M791</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;yes the FBX SDK can write BVH files. However, due to the nature of the BVH format, your FBX scene must follow a few rules:&lt;/P&gt;
&lt;OL&gt;
&lt;LI&gt;You need to mark a 'root' node so the BVH writer knows where the hierarchy starts. You can achieve this by calling the &lt;STRONG&gt;FbxNode::SetSelected(true) &lt;/STRONG&gt;on the node you have elected as the root&lt;/LI&gt;
&lt;LI&gt;All the objects names &lt;STRONG&gt;must NOT&lt;/STRONG&gt; contain spaces&lt;/LI&gt;
&lt;LI&gt;You can select the correct writer using:&lt;LI-CODE lang="general"&gt;int lFormat = lSdkManager-&amp;gt;GetIOPluginRegistry()-&amp;gt;FindWriterIDByExtension("bvh");

// Create an exporter.
FbxExporter* lExporter = FbxExporter::Create(lSdkManager, "");

// Initialize the exporter.
lResult = lExporter-&amp;gt;Initialize(lNewFileName, lFormat, lSdkManager-&amp;gt;GetIOSettings());​&lt;/LI-CODE&gt;&lt;/LI&gt;
&lt;LI&gt;If you want to write animation as well, you need to specify the Frame count and the start time using the following properties (the values you see are the defaults used if you do not change them):&lt;/LI&gt;
&lt;/OL&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="general"&gt;IOS_REF.SetIntProp(EXP_MOB_FRAME_COUNT, 0);
IOS_REF.SetTimeProp(EXP_MOB_START, FBXSDK_TIME_ZERO);
​&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I have attached a simple FBX file used to generate the BVH (below). During export, I set the frame count to 3. There are 2 animated objects in the FBX files, therefore you can see 3 values for the translation and 3 values for the rotation&amp;nbsp; for both nodes on each line of the MOTION section.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;EM&gt;HIERARCHY&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;ROOT MyRoot&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;{&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;OFFSET -0.45317 2.82824 -0.51851&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;CHANNELS 6 Xposition Yposition Zposition Zrotation Xrotation Yrotation&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;JOINT J1&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;{&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;OFFSET 39.879 0.445741 -0.0817193&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;CHANNELS 6 Xposition Yposition Zposition Zrotation Xrotation Yrotation&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;End Site&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;{&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;OFFSET 33.9878 0 0&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;}&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;}&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;}&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;MOTION&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;Frames: 3&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;Frame Time: 0.0333333&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;-0.45317 2.82824 -0.51851 0 0 -0 39.879 0.445741 -0.0817193 0 0 -0 &lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;-0.45317 2.82824 -0.51851 -0 0 0.00597333 39.879 0.445741 -0.0817193 0 0 -0 &lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;-0.45317 2.82824 -0.51851 -0 0 0.0237867 39.879 0.445741 -0.0817193 0 0 -0&lt;/EM&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 16 Jul 2020 13:41:10 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/fbx-forum/import-export-bvh-question/m-p/9639054#M791</guid>
      <dc:creator>regalir</dc:creator>
      <dc:date>2020-07-16T13:41:10Z</dc:date>
    </item>
    <item>
      <title>Re: Import/Export BVH question</title>
      <link>https://forums.autodesk.com/t5/fbx-forum/import-export-bvh-question/m-p/9644513#M792</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks for your answer !&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;We tried to export a bvh with the following code :&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;//&amp;nbsp;Create&amp;nbsp;an&amp;nbsp;exporter.&lt;BR /&gt;FbxExporter*&amp;nbsp;lExporter&amp;nbsp;=&amp;nbsp;FbxExporter::Create(manager,&amp;nbsp;"");&lt;/P&gt;&lt;P&gt;int&amp;nbsp;lFormatBVH&amp;nbsp;=&amp;nbsp;manager-&amp;gt;GetIOPluginRegistry()-&amp;gt;FindWriterIDByExtension("bvh");&lt;/P&gt;&lt;P&gt;if&amp;nbsp;(lExporter-&amp;gt;Initialize(charStr,&amp;nbsp;lFormatBVH,&amp;nbsp;manager-&amp;gt;GetIOSettings())&amp;nbsp;==&amp;nbsp;false)&lt;BR /&gt;{&lt;BR /&gt;return&amp;nbsp;false;&lt;BR /&gt;}&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;IOS_REF.SetIntProp(EXP_MOB_FRAME_COUNT,&amp;nbsp;0);&lt;BR /&gt;IOS_REF.SetTimeProp(EXP_MOB_START,&amp;nbsp;FBXSDK_TIME_ZERO);&lt;BR /&gt;&lt;BR /&gt;lExporter-&amp;gt;SetProgressCallback((FbxProgressCallback)ProgressCallback);&lt;/P&gt;&lt;P&gt;lStatus&amp;nbsp;=&amp;nbsp;lExporter-&amp;gt;Export(_scene);&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;lStatus is always false and our result file is empty... lStatus is true and our result file is good when we export fbx and obj files.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;We tried with FbxNode::SetSelected(true) and verified names not contains space (we used your fbx file).&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Do you have any ideas ? How can we debug this export ? Is it our _scene setup&amp;nbsp;that is causing the problem ?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks a lot !&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Nukeygara team&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 20 Jul 2020 13:25:34 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/fbx-forum/import-export-bvh-question/m-p/9644513#M792</guid>
      <dc:creator>ebeschetRKDHJ</dc:creator>
      <dc:date>2020-07-20T13:25:34Z</dc:date>
    </item>
    <item>
      <title>Re: Import/Export BVH question</title>
      <link>https://forums.autodesk.com/t5/fbx-forum/import-export-bvh-question/m-p/9645092#M793</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;the code you have pasted looks a lot like the samples that are shipping with the FBX SDK. The only few points I would raise here are:&lt;/P&gt;
&lt;OL&gt;
&lt;LI&gt;make sure that IOS_REF is the same (reference instead of pointer) as &lt;EM&gt;manager-&amp;gt;GetIOSettings()&lt;/EM&gt; (or simply use this last statement instead) for setting the FRAME_COUNT and START values).&lt;/LI&gt;
&lt;LI&gt;your root node (the one you called SetSelected(true)) is &lt;STRONG&gt;not&lt;/STRONG&gt; the &lt;EM&gt;scene-&amp;gt;GetRootNode()&lt;/EM&gt;. I am assuming it is already the case but, if not, please create a new child of it and attach your other nodes to this new node. FYI, the RootNode() object is a in-memory anchor point and never gets saved to a file.&lt;/LI&gt;
&lt;LI&gt;You can also use the call &lt;EM&gt;lExporter-&amp;gt;GetStatus().&lt;/EM&gt;to retrieve the internal error value (if you are lucky &lt;span class="lia-unicode-emoji" title=":winking_face:"&gt;😉&lt;/span&gt; it will tell you what went wrong. You can take a look in the Common.cxx files in the samples of the FBX SDK to see how it is used.&lt;/LI&gt;
&lt;LI&gt;Finally, the BVH writer is processing FbxNode objects only, since it is only interested in the T, R and S so make sure that your scene is looking something like below (of course the hierarchy can look totally different, depending on your requirements):&lt;/LI&gt;
&lt;/OL&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="general"&gt;            FBxScene::RootNode
                   |
                 MyRoot (FbxNode)
                 /   \
    ChildA (FbxNode)   ChildB (FbxNode)
              |
        ChildC (FbxNode)&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&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;&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;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If the above conditions are met, my FBX file should export to BVH without problems. In fact, setting the FRAME_COUNT and START to 0, I am getting the following bfh file:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="general"&gt;HIERARCHY
ROOT MyRoot
{
  OFFSET -0.45317 2.82824 -0.51851
  CHANNELS 6 Xposition Yposition Zposition Zrotation Xrotation Yrotation
  JOINT J1
  {
    OFFSET 39.879 0.445741 -0.0817193
    CHANNELS 6 Xposition Yposition Zposition Zrotation Xrotation Yrotation
    End Site
    {
      OFFSET 33.9878 0 0
    }
  }
}
MOTION
Frames:	0
Frame Time:	0.0333333&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I am not sure it does make sense, though, that you export a BVH without animation. After all, it is a motion file so, what would be the point of such a file without motion? &lt;span class="lia-unicode-emoji" title=":winking_face:"&gt;😉&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 20 Jul 2020 17:54:18 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/fbx-forum/import-export-bvh-question/m-p/9645092#M793</guid>
      <dc:creator>regalir</dc:creator>
      <dc:date>2020-07-20T17:54:18Z</dc:date>
    </item>
    <item>
      <title>Re: Import/Export BVH question</title>
      <link>https://forums.autodesk.com/t5/fbx-forum/import-export-bvh-question/m-p/9646107#M794</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks a lot again for your help !&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;We got "Can not find root node" with the&amp;nbsp;&lt;EM&gt;lExporter-&amp;gt;GetStatus() call ! &lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;As you told us,&amp;nbsp;&lt;/EM&gt;we probably have a problem with the FbxNode::SetSelected method.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;We tried to use it this way (newNode is not our _scene-&amp;gt;GetRootNode()):&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;SPAN&gt;//&amp;nbsp;create&amp;nbsp;a&amp;nbsp;FbxNode&lt;/SPAN&gt;
FbxNode&lt;SPAN&gt;*&lt;/SPAN&gt;&amp;nbsp;&lt;SPAN&gt;newNode&lt;/SPAN&gt;&amp;nbsp;&lt;SPAN&gt;=&lt;/SPAN&gt;&amp;nbsp;FbxNode&lt;SPAN&gt;::&lt;/SPAN&gt;Create&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;_scene&lt;/SPAN&gt;&lt;SPAN&gt;,&lt;/SPAN&gt;&amp;nbsp;&lt;SPAN&gt;nodeInfoI&lt;/SPAN&gt;&lt;SPAN&gt;.&lt;/SPAN&gt;&lt;SPAN&gt;GetName&lt;/SPAN&gt;&lt;SPAN&gt;());&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN&gt;newNode&lt;/SPAN&gt;&lt;SPAN&gt;-&amp;gt;&lt;/SPAN&gt;SetSelected&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;true&lt;/SPAN&gt;&lt;SPAN&gt;);&lt;/SPAN&gt;&lt;/PRE&gt;&lt;P&gt;However, we did not find any doc or example on this method (on the internet or even in fbxnode.h)...&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Nukeygara team&lt;/P&gt;</description>
      <pubDate>Tue, 21 Jul 2020 08:19:29 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/fbx-forum/import-export-bvh-question/m-p/9646107#M794</guid>
      <dc:creator>ebeschetRKDHJ</dc:creator>
      <dc:date>2020-07-21T08:19:29Z</dc:date>
    </item>
    <item>
      <title>Re: Import/Export BVH question</title>
      <link>https://forums.autodesk.com/t5/fbx-forum/import-export-bvh-question/m-p/9722985#M795</link>
      <description>&lt;P&gt;Hello&amp;nbsp;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/1650435"&gt;@regalir&lt;/a&gt;&amp;nbsp;!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The &lt;SPAN&gt;FbxNode::SetSelected&amp;nbsp;&lt;/SPAN&gt;method doesn't work for us. Could you please detail how we could correctly use it or give us a doc ?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Nukeygara team&lt;/P&gt;</description>
      <pubDate>Tue, 01 Sep 2020 12:28:42 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/fbx-forum/import-export-bvh-question/m-p/9722985#M795</guid>
      <dc:creator>ebeschetRKDHJ</dc:creator>
      <dc:date>2020-09-01T12:28:42Z</dc:date>
    </item>
    <item>
      <title>Re: Import/Export BVH question</title>
      <link>https://forums.autodesk.com/t5/fbx-forum/import-export-bvh-question/m-p/9779478#M796</link>
      <description>&lt;P&gt;Apologies for the delay in answering this.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Have you correctly attached your 'newNode' to the scene using scene-&amp;gt;GetRootNode()-&amp;gt;AddChild() ? Just creating a node with the scene as argument will not add it to the scene graph. Your steps should look like:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="general"&gt;FbxNode* newNode = FbxNode::Create(_scene, nodeInfoI.GetName());
newNode-&amp;gt;SetSelected(true);

_scene-&amp;gt;GetRootNode()-&amp;gt;AddChild(newNode);&lt;/LI-CODE&gt;
&lt;P&gt;The rest of your code should be okay. The SetSelected() function belong to the FbxObject and all it does is set a flag.&lt;/P&gt;</description>
      <pubDate>Thu, 01 Oct 2020 18:16:29 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/fbx-forum/import-export-bvh-question/m-p/9779478#M796</guid>
      <dc:creator>regalir</dc:creator>
      <dc:date>2020-10-01T18:16:29Z</dc:date>
    </item>
    <item>
      <title>Re: Import/Export BVH question</title>
      <link>https://forums.autodesk.com/t5/fbx-forum/import-export-bvh-question/m-p/12983282#M797</link>
      <description>&lt;P&gt;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/1650435"&gt;@regalir&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Hi. I'm trying to convert from FBX to BVH and am using this as a reference, but the message "Can not find root node" is still displayed.&lt;/P&gt;&lt;P&gt;Is there anything else you would like to add or any reference material?&lt;/P&gt;</description>
      <pubDate>Tue, 27 Aug 2024 09:22:34 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/fbx-forum/import-export-bvh-question/m-p/12983282#M797</guid>
      <dc:creator>genk05223122</dc:creator>
      <dc:date>2024-08-27T09:22:34Z</dc:date>
    </item>
    <item>
      <title>Re: Import/Export BVH question</title>
      <link>https://forums.autodesk.com/t5/fbx-forum/import-export-bvh-question/m-p/12983851#M798</link>
      <description>&lt;P&gt;The "Can not find root node" error simply means that you have not called &lt;STRONG&gt;SetSelected(true)&lt;/STRONG&gt; on the node that you want to be the root of the BVH. Assuming that "your" root is the only child of the FbxScene::GetRootNode() - as I've shown in the simple scene graph in a previous post - the following snipped of code should be okay to export to BVH and not have the error. The important lines are 6,7 and 8 &lt;span class="lia-unicode-emoji" title=":winking_face:"&gt;😉&lt;/span&gt; and, if there are no other errors in your setup, 'stat' on line 19 will be empty!&lt;/P&gt;
&lt;LI-CODE lang="cpp"&gt;    if (lResult &amp;amp;&amp;amp; !lOutFilePath.IsEmpty())
    {
        lSdkManager-&amp;gt;GetIOSettings()-&amp;gt;SetIntProp(EXP_MOB_FRAME_COUNT, 0);
        lSdkManager-&amp;gt;GetIOSettings()-&amp;gt;SetTimeProp(EXP_MOB_START, FBXSDK_TIME_ZERO);

        FbxNode* bvhRoot = lScene-&amp;gt;GetRootNode()-&amp;gt;GetChild(0);
        if (bvhRoot)
            bvhRoot-&amp;gt;SetSelected(true);

        //lResult = SaveScene(lSdkManager, lScene, lOutFilePath.Buffer(), 0);
        int lFormat = lSdkManager-&amp;gt;GetIOPluginRegistry()-&amp;gt;FindWriterIDByExtension("bvh");

        // Create an exporter.
        FbxExporter* lExporter = FbxExporter::Create(lSdkManager, "");

        // Initialize the exporter.
        lExporter-&amp;gt;Initialize(lOutFilePath.Buffer(), lFormat, lSdkManager-&amp;gt;GetIOSettings());
        lResult = lExporter-&amp;gt;Export(lScene);
        FbxStatus&amp;amp; stat = lExporter-&amp;gt;GetStatus();

        // Destroy the exporter.
        lExporter-&amp;gt;Destroy();
    }&lt;/LI-CODE&gt;
&lt;P&gt;&lt;STRONG&gt;Reminder: As I mentioned earlier in the posts, do not use lScene-&amp;gt;GetRootNode() as the root of the BVH !&lt;/STRONG&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 27 Aug 2024 13:18:53 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/fbx-forum/import-export-bvh-question/m-p/12983851#M798</guid>
      <dc:creator>regalir</dc:creator>
      <dc:date>2024-08-27T13:18:53Z</dc:date>
    </item>
    <item>
      <title>Re: Import/Export BVH question</title>
      <link>https://forums.autodesk.com/t5/fbx-forum/import-export-bvh-question/m-p/12985313#M799</link>
      <description>&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="general"&gt;HIERARCHY
ROOT BVH:reference
{
  OFFSET 0 0 0
  CHANNELS 6 Xposition Yposition Zposition Zrotation Xrotation Yrotation
  JOINT MyRoot
  {
    OFFSET 0 0 0
    CHANNELS 6 Xposition Yposition Zposition Zrotation Xrotation Yrotation
    JOINT J1
    {
      OFFSET 39.879 0.445741 -0.0817193
      CHANNELS 6 Xposition Yposition Zposition Zrotation Xrotation Yrotation
      End Site
      {
        OFFSET 33.9878 0 0
      }
    }
  }
}
MOTION
Frames:	0
Frame Time:	0.0333333&lt;/LI-CODE&gt;&lt;P&gt;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/1650435"&gt;@regalir&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you for your quick response.&lt;BR /&gt;The error has now disappeared.&lt;BR /&gt;However, when I convert the exported BVH file back to FBX and then back to BVH, the ROOT name changes to "BVH:reference" as shown above. Do you know the cause of this?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;This is the code that converted from BVH to FBX.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="general"&gt;FbxManager* manager = FbxManager::Create();
FbxScene* scene = FbxScene::Create(manager, "");
FbxImporter* importer = FbxImporter::Create(manager, "");

int formatBVH = manager-&amp;gt;GetIOPluginRegistry()-&amp;gt;FindReaderIDByExtension("bvh");
importer-&amp;gt;Initialize(bvh_path, formatBVH, manager-&amp;gt;GetIOSettings());
importer-&amp;gt;Import(scene);

FbxExporter* exporter = FbxExporter::Create(manager, "");
exporter-&amp;gt;Initialize(fbx_path);

bool status = exporter-&amp;gt;Export(scene);&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 28 Aug 2024 02:08:20 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/fbx-forum/import-export-bvh-question/m-p/12985313#M799</guid>
      <dc:creator>genk05223122</dc:creator>
      <dc:date>2024-08-28T02:08:20Z</dc:date>
    </item>
    <item>
      <title>Re: Import/Export BVH question</title>
      <link>https://forums.autodesk.com/t5/fbx-forum/import-export-bvh-question/m-p/12985360#M800</link>
      <description>&lt;P&gt;Yes I do! &lt;span class="lia-unicode-emoji" title=":winking_face:"&gt;😉&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;This is actually the default behaviour of the BVH reader to keep all the "skeleton" joints defined in the BVH file under a unique node so they can be more easily identified and manipulated.&amp;nbsp; We do provide the possibility to change this and just connect everything to the scene-&amp;gt;GetRootNode(). However, be aware that, if the scene you are using to import the BVH data in already contains data (nodes, lights, materials, etc.), all the BVH joints will automatically become children of GetRootNode() and when you have to manipulate them you will have more work to do to walk through all the children of GetRootNode() , find the nodes you are interested in and manipulate them individually.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;To change the behaviour, you just need to call:&lt;/P&gt;
&lt;LI-CODE lang="cpp"&gt;manager-&amp;gt;GetIOSettings()-&amp;gt;SetBoolProp(IMP_BIOVISION_BVH_CREATE_REFERENCE_NODE, false);&lt;/LI-CODE&gt;
&lt;P&gt;before the call to:&lt;/P&gt;
&lt;LI-CODE lang="general"&gt;importer-&amp;gt;Initialize(bvh_path, formatBVH, manager-&amp;gt;GetIOSettings());&lt;/LI-CODE&gt;
&lt;P&gt;Depending on your workflow(s) both approaches can make sense. However I suggest you keep using the default behaviour as much as possible and if you don't desire to explicity use the "BVH:Reference" name, just rename the node to something more meaningful right after the&lt;/P&gt;
&lt;LI-CODE lang="cpp"&gt;importer-&amp;gt;Import(scene)&lt;/LI-CODE&gt;
&lt;P&gt;call. Then, when you re-export the FBX scene back to BVH, your ROOT node will have the name you've set!&lt;/P&gt;</description>
      <pubDate>Wed, 28 Aug 2024 02:59:17 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/fbx-forum/import-export-bvh-question/m-p/12985360#M800</guid>
      <dc:creator>regalir</dc:creator>
      <dc:date>2024-08-28T02:59:17Z</dc:date>
    </item>
    <item>
      <title>Re: Import/Export BVH question</title>
      <link>https://forums.autodesk.com/t5/fbx-forum/import-export-bvh-question/m-p/12985466#M801</link>
      <description>&lt;P&gt;I see. Thank you for your easy to understand answer.&lt;/P&gt;&lt;P&gt;The OFFSET value directly under MyRoot also does not match. Are there any settings for this?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="general"&gt;ROOT MyRoot
{
  OFFSET -0.45317 2.82824 -0.51851&lt;/LI-CODE&gt;&lt;LI-CODE lang="general"&gt;ROOT MyRoot
{
  OFFSET 0 0 0&lt;/LI-CODE&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;&lt;P&gt;And,&lt;BR /&gt;・How to change FrameTimes(Converting a 60F FBX file to BVH returns 30F)&lt;BR /&gt;・How to optionally convert one data to BVH when there are multiple animation data in FBX&lt;/P&gt;&lt;P&gt;・How to get Channels in BVH file&lt;/P&gt;&lt;P&gt;Is it possible to implement these?&lt;/P&gt;</description>
      <pubDate>Wed, 28 Aug 2024 10:45:11 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/fbx-forum/import-export-bvh-question/m-p/12985466#M801</guid>
      <dc:creator>genk05223122</dc:creator>
      <dc:date>2024-08-28T10:45:11Z</dc:date>
    </item>
    <item>
      <title>Re: Import/Export BVH question</title>
      <link>https://forums.autodesk.com/t5/fbx-forum/import-export-bvh-question/m-p/12986967#M802</link>
      <description>&lt;P&gt;I haven't actually tested the following code but, from memory, I think this is how you can proceed &lt;span class="lia-unicode-emoji" title=":smiling_face_with_smiling_eyes:"&gt;😊&lt;/span&gt;&lt;BR /&gt;For multiple animation stacks:&lt;/P&gt;
&lt;LI-CODE lang="cpp"&gt;        // Select one of the AnimStack from the FBX scene
        int desiredStackID = 0;
        int nbAnimStacks = lScene-&amp;gt;GetSrcObjectCount&amp;lt;FbxAnimStack&amp;gt;();
        FbxAnimStack* desiredStack = nullptr;
        for (int as = 0; as &amp;lt; nbAnimStacks; as++)
        {
            if (as == desiredStackID)
            {
                desiredStack = lScene-&amp;gt;GetSrcObject&amp;lt;FbxAnimStack&amp;gt;(as);
                break;
            }
        }
        // make sure we make it the current one!
        if (desiredStack)
            lScene-&amp;gt;SetCurrentAnimationStack(desiredStack);
&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;BR /&gt;And, hopefully, a combination of the following settings could help with the other issues:&lt;/P&gt;
&lt;LI-CODE lang="cpp"&gt;        // available options for the BVH importer/exporter (see \include\fbxsdk\fileio\fbxiosettingspath.h)
        // the _MOB_ variable are generic for the MotionBase - they apply to all the Motion file formats.
        lSdkManager-&amp;gt;GetIOSettings()-&amp;gt;SetIntProp(EXP_MOB_FRAME_COUNT, 0);
        lSdkManager-&amp;gt;GetIOSettings()-&amp;gt;SetTimeProp(EXP_MOB_START, FBXSDK_TIME_ZERO);
        lSdkManager-&amp;gt;GetIOSettings()-&amp;gt;SetDoubleProp(EXP_MOB_FRAME_RATE, 60.0);
        lSdkManager-&amp;gt;GetIOSettings()-&amp;gt;SetBoolProp(EXP_BIOVISION_BVH_MOTION_TRANSLATION, false);
        lSdkManager-&amp;gt;GetIOSettings()-&amp;gt;SetBoolProp(EXP_MOB_FROM_GLOBAL_POSITION, false);

        // import setting
        lSdkManager-&amp;gt;GetIOSettings()-&amp;gt;SetTimeProp(IMP_MOB_START, FBXSDK_TIME_ZERO);
        lSdkManager-&amp;gt;GetIOSettings()-&amp;gt;SetIntProp(IMP_MOB_FRAME_COUNT, 0);
        lSdkManager-&amp;gt;GetIOSettings()-&amp;gt;SetDoubleProp(IMP_MOB_FRAME_RATE, 60.0);
        lSdkManager-&amp;gt;GetIOSettings()-&amp;gt;SetBoolProp(IMP_BIOVISION_BVH_CREATE_REFERENCE_NODE, false);
&lt;/LI-CODE&gt;
&lt;P&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 28 Aug 2024 16:01:30 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/fbx-forum/import-export-bvh-question/m-p/12986967#M802</guid>
      <dc:creator>regalir</dc:creator>
      <dc:date>2024-08-28T16:01:30Z</dc:date>
    </item>
    <item>
      <title>Re: Import/Export BVH question</title>
      <link>https://forums.autodesk.com/t5/fbx-forum/import-export-bvh-question/m-p/12988062#M803</link>
      <description>&lt;P&gt;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/1650435"&gt;@regalir&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you. I will try to refer to it.&lt;/P&gt;&lt;P&gt;Also, no matter what setting I tried, the OFFSET directly under ROOT remained at 0. Is this due to Import or Export?&lt;/P&gt;</description>
      <pubDate>Wed, 18 Sep 2024 05:29:57 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/fbx-forum/import-export-bvh-question/m-p/12988062#M803</guid>
      <dc:creator>genk05223122</dc:creator>
      <dc:date>2024-09-18T05:29:57Z</dc:date>
    </item>
    <item>
      <title>Re: Import/Export BVH question</title>
      <link>https://forums.autodesk.com/t5/fbx-forum/import-export-bvh-question/m-p/13027458#M804</link>
      <description>&lt;P&gt;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/1650435"&gt;@regalir&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Is there any solution to this?&lt;BR /&gt;Apparently, when I imported BVH, LclTranslation was already returned as 0.&lt;BR /&gt;Is there anything else to set when importing?&lt;/P&gt;</description>
      <pubDate>Wed, 18 Sep 2024 07:30:44 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/fbx-forum/import-export-bvh-question/m-p/13027458#M804</guid>
      <dc:creator>genk05223122</dc:creator>
      <dc:date>2024-09-18T07:30:44Z</dc:date>
    </item>
  </channel>
</rss>

