Closed MarioGladiator closed 4 days ago
Yep, it's possible to create a scene from scratch and export it to a file (e.g. fbx). Here's a minimal example that creates a plane:
using var ctx = new AssimpContext(); var scene = new Scene(); scene.Meshes.Add(new(PrimitiveType.Triangle) { Vertices = { new(0, 0, 0), new(1, 0, 0), new(0, 0, 1), new(1, 0, 1) }, Faces = { new([0, 1, 2]), new([1, 2, 3]) }, }); // Mesh needs a material. scene.Materials.Add(new()); // Scene needs a root node, mesh should be attached to a node. scene.RootNode = new() { MeshIndices = { 0 }}; ctx.ExportFile(scene, "test.fbx", "fbx");
Yep, it's possible to create a scene from scratch and export it to a file (e.g. fbx). Here's a minimal example that creates a plane: