Skip to content

Instantly share code, notes, and snippets.

@aspose-com-gists
Created May 8, 2024 15:33
Show Gist options
  • Save aspose-com-gists/61679d97294485f5b3fc695b4e527ff9 to your computer and use it in GitHub Desktop.
Save aspose-com-gists/61679d97294485f5b3fc695b4e527ff9 to your computer and use it in GitHub Desktop.
Convert PLY to USD in C#
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