
(一) USDZ 到 GLB 或 GLTF 转换器 – C# API 安装
PM> Install-Package Aspose.3D
(二) 在 C# 中将 USDZ 转换为 GLB 文件
您可以通过以下步骤将 USDZ 文件转换为 GLB 格式:
- 使用Scene类加载源 USDZ 文件。
- 打开场景并使用Save方法将 USDZ 转换为 GLB 格式。
以下代码片段显示了如何在 C# 中以编程方式将 USDZ 文件转换为 GLB 格式:
// Initialize an object of Scene classAspose.ThreeD.Scene scene = new Aspose.ThreeD.Scene();// Open the scene from the given pathscene.Open("Input.usdz");// Save output GLB filescene.Save("Output.glb");
(三) 在 C# 中将 USDZ 转换为 GLTF 文件
您可以按照以下步骤将 USDZ 格式文件转换为 GLTF 格式:
- 创建Scene类的实例以加载输入的 USDZ 文件。
- 使用Save方法将 USDZ 转换为 GLTF 格式。
下面的代码示例详细说明了如何在 C# 中以编程方式将 USDZ 文件转换为 GLTF 格式:
// Initialize an object of Scene classAspose.ThreeD.Scene scene = new Aspose.ThreeD.Scene();// Open the scene from the given pathscene.Open("Input.usdz");// Save output GLTF filescene.Save("Output.gltf");
(四)结论
欢迎下载|体验更多Aspose产品
获取更多信息请咨询在线客服 或 加入Aspose技术交流群()
标签:
声明:本站部分文章及图片源自用户投稿,如本站任何资料有侵权请您尽早请联系jinwei@zod.com.cn进行处理,非常感谢!