PolygonModifier.MergeMesh

MergeMesh(Scene)

Convert a whole scene to a single transformed mesh Vertex elements like normal/texture coordinates are not supported yet

public static Mesh MergeMesh(Scene scene)
ParameterTypeDescription
sceneSceneThe scene to merge

Return Value

The merged mesh

Examples

The following code shows how to merge all objects from a scene into a single mesh.

//Input file may contains multiple objects
var scene = Scene.FromFile("input.fbx");
//now merge them into a single mesh
Mesh merged = PolygonModifier.MergeMesh(scene);
//then we save it to a file with only one mesh
var newScene = new Scene(merged);
newScene.Save("test.obj");

See Also


MergeMesh(IList<Node>)

public static Mesh MergeMesh(IList<Node> nodes)

See Also


MergeMesh(Node)

Convert a whole node to a single transformed mesh Vertex elements like normal/texture coordinates are not supported yet

public static Mesh MergeMesh(Node node)
ParameterTypeDescription
nodeNodeThe node to merge

Return Value

Merged mesh

Examples

The following code shows how to merge all objects from nodes into a single mesh.

//Input file may contains multiple objects
var scene = Scene.FromFile("input.fbx");
//now merge them into a single mesh
Mesh merged = PolygonModifier.MergeMesh(scene.RootNode);
//then we save it to a file with only one mesh
var newScene = new Scene(merged);
newScene.Save("test.obj");

See Also