As the title implies, I was curious if there is a way to export a mesh generated by SurfaceTool to be used in Blender (or any other 3D editing software for that matter).
I was unable to find anything about this in the docs.
I don't think that type of functionality is built into the engine yet. However it is still possible to export your mesh with a little ambitious gdscript coding. You can look into the documentations of, let's say .obj, and make an exporter for that file format.
Thank you, I think I'll try that. Maybe implement it as a feature in godot.
Depends on how complicated it is.
Should be doable in GDScript. The Wavefront OBJ format looks tempting simple. The most complicated part might be setting the materials correctly and copying the source-textures (not the ones in .import).
A plugin might be helpful when wanting to interactively export meshes/mesharrays stored in e.g. MeshInstance nodes.
Oh, it looks a lot simpler than I thought. Might give this a try first in GDScript and see how it goes.
Ok great! And when you do, consider helping the community out by releasing it as a plug-in. Who knows who else might find this useful.
Here's an excerpt of a plugin I made. (see the attached zip which contains a gdscript.) It may contain errors and many things you might not need or better do differently. But it perhaps gives a general idea how SurfaceTool can be used to generate meshes by code.
(As it is only part of the plugin, the script will not be directly runnable.)
Here's an excerpt of a plugin I made. It may contain errors and many things you might not need or better do differently. But it perhaps gives a general idea how SurfaceTool can be used to generate meshes by code.
Which post to keep? Also seems there's recently been an issue attaching .zip files, so might be best to host on something external, like github or google drive or such.
I can't see any attached zip (which is probably caused by the issue mentioned above) but thanks.
I already did part of the generation by myself but any reference or help would be much appreciated!
Sorry, I wasn't aware that the post went out. As soon as the zip upload actually works, I'll post it here...
Just testing file upload, just a random attachment coming through. Hope you don't mind...
Another try, here we go with the little plugin/addon which "procedurally" generates fences. Nothing fancy though ;-)
Thank you, will definitely check it out.
Right now I moved on to another part of the generation but will get back to the export after that.