Open scottdavis opened 1 week ago
After realizing that making this issue was my rubber duck i realized if you bake the mesh array then export you get the geometry. However it would still be nice it that was automatic.
Are there any signals or function calls the editor emits when the user selects export to gltf? I didn't see any. If there aren't, we can't do anything about that.
Baking beforehand when needed is only 3-4 clicks.
Does your script do anything that our mesh baker doesn't already do? It looks like it bakes at lod0, whereas we can bake at any lod, and likely faster. Note that the terrain can be huge, up to 65.5 x 65.5km. Large terrains are not something you want to dump into text. Export to glb is more optimal than obj.
Yea i ended up removing most of what my script does and doing it manually. My goal was to run it headless and generate my nav mesh via CI/CD for my server. However the closest thing i can find that the editor does would be this. https://docs.godotengine.org/en/stable/classes/class_gltfdocumentextension.html
Description
Currently if you export a scene with a Terrian3D node it exports everything except the Terrian3D mesh. This would be super helpful for using 3rd party navmesh libraries and blender workflows.
Currently i have a workflow where I dump the baked mesh to an obj file then import it into blender and merge the gltf export. Its super time consuming.
Hoping there is a callback that can bake the mesh on export when the editor makes the gltf.
if anyone happens to stumble on this needing a solutions my work around involves baking the mesh then passing it to this function.
Usage would look something like this