I can’t help you with procedural mesh generation, but I can tell you that the FSphere type is merely the mathematical representation of a sphere, i.e. a center point plus a radius. Beyond that it holds no geometry information, such as a triangulation into polygons.
That being said, you can use an FSphere instance as the basis for creating your own spherical meshes. There are many ways to triangulate a sphere, and I’m pretty sure we already have code for that. Perhaps take a look at the BSP code for sphere brushes until someone else can provide a better answer
I don’t find any of this in the documentation. In fact, FSphere is not a graphical representation. And PrimitiveDrawingUtils is not mentioned in the docs. Not very easy how to do this when you are a beginner, really…
If you want to dynamically generate a solid sphere mesh inside the render thread, particularly within the FPrimitiveSceneProxy::GetDynamicMeshElement function, use this function:
This function is defined in PrimitiveDrawingUtils.cpp.
To see example code related to GetSphereMesh(..), refer to FDebugRenderSceneProxy::FSphere::Draw(..). This can be found in DebugRenderSceneProxy.cpp.
There is also a function called DrawSphere in the same file, but if you want to save time, do not use it. When attempting to call DrawSphere inside GetDynamicMeshElement, it will throw a nullptr exception at the following line
// here, PDI->View is nullptr when you try to call DrawSphere(..) within GetDynamicMeshElement(..)
FDynamicMeshBuilder MeshBuilder(PDI->View->GetFeatureLevel());