I’m encountering a scenario with 19.3.0.0 where an fbx file is being opened by Scene and some nodes and geometry are being lost. This has never been an issue in the past and has only presented itself with a set of models we have received from a client.
Further inspection reveals that there are some abandoned nodes not in the Scene hierarchy, but they exist within the Scene.Library.
Another thing to notice is that the first 5 children nodes are successfully loaded and exist within the RootNode hieararchy. Children at index of 5 and over are lost, and Geometry.ParentNode.Parent is null.
Image showing the input and output differences: Discrepancy.jpg (66.1 KB)
I believe there are abandoned nodes located by the following:
Scene scene = new Scene( openFileDialog.FileName );
var abandonedMeshes = scene.Library.OfType<Mesh>().Where( m => m.ParentNode.ParentNode == null ).ToList();
var abandoned (1.6 MB)
Nodes = scene.Library.OfType().Where( n => n.ParentNode == null ).ToList();
We have logged a ticket with ID THREEDNET-497 in our issue management system for further investigations. The ticket ID has been linked with this thread so that you will receive notification as soon as the ticket is resolved.
We have executed the code snippet with the test file, but the abandonedMeshes is an empty list.
So please elaborate your requirements a little more if you want to remove the abandoned meshes from the file, or wondering why the objects are lost?
For the first case, the FBX has a “document” concept, a FBX file can be used as a component library to provide reusable 3D objects to other FBX files, so in design there can be objects that are not in scene hierarchy, if you want to strip them from the file, you can remove them from scene.Library, usually objects will not be added to scene.Library automatically, so in most cases, when we remove an object from scene hierarchy, we do not need to do it again from scene.Library.
For second case, we do not get valid abandonedMeshes from the code snippet, so we are afraid, we can not investigate further.
Sorry, maybe I’m wrong in those lines identifying the missing meshes, but there is definitely an issue with geometry being lost and not visible when opened by other applications.
All other applications have the issue
There is definitely an issue that has to be checked visually for confirmation.MissingGeometry.png (124.5 KB)
We have investigated it further and have found it to be evaluation limitation. You can test the API in its full capacity by applying a 30-days temporary license. You may apply for temporary license on the given link and evaluate latest version of the API as per your requirements. In case you face any issue, please feel free to let us know.