Create and Read an Existing 3D Scene


The article explains the following topics using C# 3D file formats manipulation library.

  • Create an Empty 3D Scene in C# from scratch
  • Read or Load Existing 3D Scene in C#
  • Save the 3D Scene in Supported 3D Formats using C#
  • Work with 3D Scene Properties in C#

Create an Empty 3D Scene and Save in Supported 3D File Formats

Aspose.3D API supports creating the new 3D scenes from the scratch and then save in any supported file format. Developers can also load an existing 3D Scene for the modification, addition or processing purposes.

Creating a 3D Scene Document

Please follow these steps in C# to create a 3D Scene document using the Aspose.3D APIs:

  1. Create an instance of the Scene class that represents a 3D scene document.
  2. Generate a 3D Scene document by calling the Save method of the Scene class object.

Reading a 3D Scene

Using Aspose.3D API, developers can load all the supported 3D documents. The available constructors of the Scene class allow to do so and they accept a valid file path string. The supported readable file formats are as follows:

  1. FBX 7.5 (ASCII, Binary)
  2. FBX 7.4 (ASCII, Binary)
  3. FBX 7.3 (ASCII, Binary)
  4. FBX 7.2 (ASCII, Binary)
  5. STL (ASCII, Binary)
  6. WavefrontOBJ
  7. Discreet3DS
  8. Universal3D
  9. Collada
  10. glTF
  11. DXF
  12. PLY (ASCII, Binary)
  13. X (ASCII, Binary)
  14. Draco
  15. 3MF
  16. RVM (Text, Binary)
  17. ASE

Constructors of the Scene class detect 3D document format internally.

Working with 3D Scene Properties

Aspose.3D API lets you read 3D Scene properties using the scene’s child nodes. The following C# code sample demonstrates the usage of this feature.