STL -> FBX conversion


I am trying out your product and need to convert ASCII STL files to FBX. It seems like the conversion works but when I open the result in Autodesk FBX Review or Unity it is empty. Looking in the files they seem to be correct except that there are a lot of zeros. :slight_smile:

The code:
OpenFileDialog openFileDialog1 = new OpenFileDialog();

        openFileDialog1.InitialDirectory = "c:\\";
        openFileDialog1.Filter = "stl files (*.stl)|*.stl|All files (*.*)|*.*";
        openFileDialog1.FilterIndex = 2;
        openFileDialog1.RestoreDirectory = true;

        if (openFileDialog1.ShowDialog() == DialogResult.OK)
                FileFormat inputFormat = FileFormat.Detect(openFileDialog1.FileName);
                // Display the file format
                textBox1.AppendText("File Format: " + inputFormat.ToString() + "\r\n");

                // Load a 3D document into Aspose.3D
                Scene scene1 = new Scene();

                // Open an existing 3D scene

                // Save Scene to a local path
                scene1.Save("c:\\temp\\tst5.fbx", FileFormat.FBX7500ASCII);
                scene1.Save("c:\\temp\\tst5b.fbx", FileFormat.FBX7500Binary);
                scene1.Save("c:\\temp\\tst4.fbx", FileFormat.FBX7400ASCII);
                scene1.Save("c:\\temp\\tst3.fbx", FileFormat.FBX7300ASCII);
                scene1.Save("c:\\temp\\tst2.fbx", FileFormat.FBX7200ASCII);
                scene1.Save("c:\\temp\\tst.obj", FileFormat.WavefrontOBJ);

                MemoryStream dstStream1 = new MemoryStream();
                scene1.Save(dstStream1, FileFormat.FBX7500ASCII);
                // Rewind the stream position back to zero so it is ready for next reader.
                dstStream1.Position = 0;
                scene1.Save("c:\\temp\\tst5stream.fbx", FileFormat.FBX7500ASCII);

As you can see Ive tried a number of different formats and also tried to loop through with a “sub scene”
In the ziple are the original STL and the FBX7500ASCII file that I saved. (3.5 KB)

What am I doing wrong?




An investigation has been logged under the ticket ID THREEDNET-407 in our bug tracking system. We have linked your post to this ticket and will keep you informed regarding any available updates. Please share a snapshot of the output Zeros and Aspose.3D for .NET API version.


Thank you for being patient.

We have further investigated the ticket reported by you, THREEDNET-407, and have found that all of these FBX files are opened in Autodesk FBX Review and Unity3D; all of them render correctly. We have also checked these ASCII FBX files in text editor, but cannot find any unexpected zeros. The binary file tst5b00.fbx contains some zero bytes, but they are required by FBX specification.

Please elaborate the issue if you still notice it in your environment, so that we may take care of your concerns accordingly.