[SOLVED] Export Scene Geometry/Meshes to File

Hello together,

Is it possible to export the current meshes in a scene to an “external geometry file” like STL?

My goal is to export the current state of a scene and use the exported data to render some high-quality images using blender.

I have already read the Saving and Loading Games chapter in the documentation, but wasn’t able to find a satisfying answer. In addition, I checked the available methods of a geometry and asset manager, but could not find anything useful. One idea I had was if it would be possible to export the current render buffers that can be obtained from the renderer of an application?

Have any of you had the same problem in the past and already found a solution? Any assistance is appreciated.

im not familiar with STL, but there are exporters/importers, but for STL i guess you would need write custom exporter since i dont think one already exist.

You can see other exporters and use similar code, just build different file structure for STL.

Mainly in JME there are importers rather than exporters but i belive there were some already.

And if you would not be able to find anything, the principle would be easy anyway.
For each Node for each Geom/Node get Geom mesh and its data and write into STL file.

Most problematic are always animations, but if you dont need animations, then its quite simple.

In 99.9% cases people dont need “export” just “import”. You said your goal, but cant you achieve your goal using JME render2texture with high resolution/quality?


Thanks for your reply!

That is an excellent idea. I had never thought of that, but now it is obvious. Since I don’t use any animation as you mentioned, this approach should be easy to implement.

I was not aware of the JME render2texture method, so I googled it and read a bit about it. All in all, I still want to use blender. I’m really good with blender and have no experience rendering images with jme/openGL (other than running an application and maybe applying some filters to improve the look). I also use blender to add some elements to the scene to create more expressive images.

I will go with writing an exporter to export the mesh data of the geometries :slight_smile:

1 Like