Created
May 8, 2024 15:33
-
-
Save aspose-com-gists/61679d97294485f5b3fc695b4e527ff9 to your computer and use it in GitHub Desktop.
Convert PLY to USD in C#
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using Aspose.ThreeD; | |
using Aspose.ThreeD.Formats; | |
namespace AsposeThreeD | |
{ | |
class Graphics | |
{ | |
// Convert PLY to USDZ/USD in C# | |
static void Main(string[] args) | |
{ | |
// Define the directory path. | |
String dataDir = "/sample-files/"; | |
// Create an object of the Scene class. | |
Scene scene = new Scene(); | |
// Invoke the Open method to load the Source PLY file. | |
scene.Open(dataDir + "sample.ply"); | |
// Create an instance of the UsdSaveOptions class. | |
var usdSaveOptions = new UsdSaveOptions(); | |
// Call the Save method to save the output file in USD file format. | |
scene.Save("/sample.usd", usdSaveOptions); | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment