通過 C# 將 USD 轉換為 GLTF

使用 .NET Framework、.NET Core 和 Mono 導出 USD 和其他 3D 文件

使用 C# 將 USD 場景導出為 GLTF

  1. 使用構造函數加載 USD 文件 場景 班級2. 打電話 場景.保存 方法
  2. 將帶有 .gltf 擴展名的輸出文件名作為第一個參數傳遞
  3. 指定 GLTF 字段值 文件格式 班級

3D 格式轉換API for .NET

從命令行安裝為 nuget install Aspose.3d 或通過 Visual Studio 的包管理器控制台使用 Install-Package Aspose.3D 安裝。

或者,從 ZIP 文件中獲取脫機 MSI 安裝程序或 DLL 下載 .

C# USD 到 GLTF 轉換的代碼

// 在 Scene 對像中加載 USD 
var scene = new Aspose.ThreeD.Scene("template.usd");
// 將 USD 保存為 GLTF 
scene.Save("output.gltf", Aspose.ThreeD.FileFormat.GLTF);

Other Conversion Options

USD TO DRC (Google Draco File Format)
USD TO GLTF (GL Transmission Format File)
USD TO FBX (Autodesk FBX Interchange File)
USD TO 3DS (3D Studio Scene)
USD TO DAE (Digital Asset Exchange File)
USD TO RVM (AVEVA RVM)
USD TO PDF (Portable Document Format)
USD TO JT (JT Open CAD File)

USD What is USD File Format?

A file with .usd extension is a Universal Scene Description file format that encodes data for the purpose of data interchanging and augmenting between digital content creation applications. Developed by Pixar, USD provides the ability to interchange elemental assets (such as models) or animation.

Read More

GLTF What is GLTF File Format?

glTF (GL Transmission Format) is a 3D file format that stores 3D model information in JSON format. The use of JSON minimizes both the size of 3D assets and the runtime processing needed to unpack and use those assets. It was adopted for the efficient transmission and loading of 3D scenes and models by applications. glTF was developed by the Khronos Group 3D Formats Working Group and is also described as JPEG of 3D by its creators. The format defines an extensible, common publishing format for 3D content tools and services that streamlines authoring workflows and enables interoperable use of content across the industry. The intention behind the creation of glTF file format was to define an extensible, common publishing format for 3D content tools and services that should streamline authoring workflows and enable interoperable use of content across the industry. It minimizes runtime processing by applications using WebGL and other APIs.

Read More