I originally posted this question in answer hub but since it’s kinda open ended I thought it might be better to post it here. I’m currently working on a procedural and custom mesh generation plugin that will allow you to use procedurally generated meshes as assets and edit them in an editor as well as the game. I’ve got a lot of plans for it and I’ll probably post a more detailed WIP thread once I have something more substantial.
Anyway I’d like to have an option to convert a morph mesh (as I’ve called my asset type :)) to a static mesh for reasons that should be obvious. I’ve already got a conversion for the other way around. I’ve been digging around in the code and I can see a couple ways to convert back to a static mesh.
One would be just to export an FBX and then import it again. I like this option because it also means that you can then edit a generated mesh in some program if need be plus most other assets have this option. The problem I’m having is that all the FBX exporters are methods of FFbxExporter, you need to access this class’s private data to make an exporter. Doing this would make my plugin not stand alone, I don’t want it to rely on modified engine code.
The other option is just to make a static mesh asset directly by filling in the RawMesh or StaticMeshLOD data structure. I still need to look into this option a bit to see what would be the best way to do this. The meshes could then still be exported from the static mesh asset. The problem with this way is I’m not sure if there’s any asset factory for a static mesh asset apart from the Fbx one.
Does anyone have any suggestions on what way might be best?