We're sorry Aspose doesn't work properply without JavaScript enabled.

Free Support Forum - aspose.com

Line entities do not export to GLTF/GLB

When I add Line entities to a new scene, they do not show up in the exported GLTF or GLB file (I tried both.) If the line is the only entity in the scene, the resulting GLTF/GLB fails validation using KhronosGroup/glTF-Validator. I am using aspose 20.3.

Here is the code to reproduce:

      var scene = new Scene();
        x1 = 0,
        y1 = 0,
        z1 = 0,
        x2 = 10,
        y2 = 10,
        z2 = 10;
      var line = new Line("LineEntity");
      line.Excluded = false;
      line.Visible = true;
      line.ControlPoints.Add(new Vector4(x1, y1, z1));
      line.ControlPoints.Add(new Vector4(x2, y2, z2));
      line.Segments.Add(new int[] { 0, 1 });
      line.Color = new Vector3(1, 0, 0);
      scene.RootNode.CreateChildNode("LineNode", line);
      var saveOpts = new GLTFSaveOptions(Aspose.ThreeD.FileContentType.ASCII);
      saveOpts.EmbedAssets = true;
      var fmt = saveOpts.FileFormat;
      scene.Save($"TestLine ({x1},{y1},{z1})-({x2},{y2},{z2}).gltf", saveOpts);


Can you please share your generated result along with expected result to further investigate this issue.

Attached is the output of the above code as a GLTF. Expected result is a valid GLTF file which passes validation and displays a single red line from {0,0,0} to {10,10,10}.

TestLine (0,0,0)-(10,10,10).zip (335 Bytes)


Thank you for the details.

We have logged a ticket with ID THREEDNET-652 in our issue management system for further investigation and resolution. The ticket ID has been linked with this thread so that you will receive notification as soon as the ticket is resolved.

We are sorry for the inconvenience.


I like to inform that Line is not supported in our GLTF exporter. We are working on a more powerful curve implementation, which will have a GLTF support.