using Aspose.ThreeD;
using Aspose.ThreeD.Entities;
using Aspose.ThreeD.Utilities;
//Create a new 3D scene
Scene scene = new Scene();
//since all primitive entities in Aspose.3D will have built in UV generation
var mesh = (new Pyramid()).ToMesh();
//put it to the scene
var node = scene.RootNode.CreateChildNode(mesh);
node.Transform.Translation = new Vector3(-1, -4, -4);
//here we manually remove it to assume we have a mesh without UV data
mesh.VertexElements.Remove(mesh.GetElement(VertexElementType.UV));
//then we can manually generate UV for it
var uv = PolygonModifier.GenerateUV(mesh);
//generated UV data is not associated with the mesh, we should manually do this
mesh.AddElement(uv);
scene