What is the workflow for world geometry importing

Godot Version

4.4.1

Question

Hey folks,

What is the workflow for 3D level geometry? I have a .blend file in my project’s asset folder. In there, I have 3 objects, generic_corridor, generic_corrider_divider and generic_corridor_light.

I had intended to split those 3 objects into separate scenes so I could build levels by re-using copies of scenes in a level scene, but it doesn’t look like this is possible? If I right click on the blend file and click ‘New Inherited Scene’, the separate MeshInstance3D nodes in there can’t be saved to a new scene (error: Can’t save a branch which is part of an inherited scene.)

Do I really have to manually split my blend file into 3 separate blend files, one for each object? I feel like I am missing something here.

What’s the workflow for this kind of thing? I can’t seem to find any tutorials or even anyone talking about it, so maybe I’m going about this the wrong way.

Save the inherited scene, right click on its root node and click “Clear Inheritance”. Now you’ll be able to save branches.

OK, so that does achieve one of the things I was looking for, but this disconnects the separated scenes from the meshes in the blend file.

Is there a way to split the meshes into separate scenes while still maintaining the connection to the original file so that when I modify one of the objects in Blender, the associated separated scene meshes update?

Or is this the wrong way to do it?

What do people do when they are building a palette of prefab objects to build 3D levels out of? Just build each piece in a separate blend file? Doesn’t that make it hard to see how the pieces work together if they are all on their own?

Sorry if this is a dumb question, but I don’t really know how this is supposed to work.

You can export selectively from Blender.

I create each part as a separate file, and combine them either programmatically or manually (depending on my needs).

Are you saying the only way to achieve this is to manually separate each object into its own file? What if I had dozens of objects?

Maybe this is more a Blender question that Godot. Seems like Godot is not the place to solve this problem.

Thanks, yes, with your reply along with normalized’s it’s starting to look more and more like a Blender problem rather than a Godot one. I think I’ll need to check with the other side.

Put each part into a collection, select a collection, and enable “active collection” in gltf export options. You can do the same with selections as well.

If you have many of them and need frequent updates, you can write a Python script that automatically exports all collections, each to a separate file.

Import the .blend into godot, then right click the import in the node tree, select ‘make local’, then select the model you want to separate and ‘save branch as scene’.
I think that would break the connection to the original blend file. If you convert the scene to ‘editable children’ then i think the editor complains that you cant save the branch - maybe it still works, im not sure.

I too am struggling a bit with this workflow. There are many tutorials/examples of how to do the transfer either directly with the .blend file or via gltf export but they typically only show 1 model not a whole gamesworth of models.

I like being able to save the .blend file straight to the Godot project folder and this has really helped me with testing progress before the model is anywhere near complete eg. I can make sure a model is essentially valid before I worry about texturing and materials and armatures/skeletons/animations. My mental problem with this approach is that my Blender work folder has more stuff in it like the Blender backup files, test renders, reference images etc. and I don’t want all that in the Godot folder.

My Blender files also tend to have more than just the model. I like to include lights and perhaps other game objects, again to validate my model in it’s intended surroundings..

So where do I think I will end up…?

  1. Each Blender model to be exported will be in it’s own Collection in a Blender file. This allows me to either have individual Blender files or multiple models/collections in one file depending on what is appropriate for the models I’m making.
  2. Each Collection will have some Custom Properties “Export Y/N”, “Export Filename” and “Export Settings”.
  3. I will (one day) make a Blender Addon to handle a little UI panel for these properties along with a button to trigger the Export script. The main Blender Export dialog allows the saving of presets for controlling the export process so I hope it’s possible to link to these settings.
  4. I will make some sort of publish script to copy newly exported models from various Blender folders to the relevant Godot folder(s). I’m tempted to have a stab at a Godot Addon for this such that within Godot I can “Check for model updates…” To me fetching on demand feels like the right way round to do this step.
  5. Try the model in Godot, realise my mistake, go back to Blender…. etc.

At the moment I am effectively doing this manually. As each step becomes clearer I will try to automate some of the steps.

Martin

I had more luck exporting to GLB. Apprently the Blend import actually invokes blenders GLB exporter.

There was a problem with the materials getting duplicated and textures saved with different filenames, but overall it was an easier process, as the GLB exporter allows you to export selected objects.

If you have a GLB file in a scene then you can double click the GLB file in the file viewer to bring up the advanced import options, then reimport and the scene should update.

I prefer them to be located at the origin.

That is the way with character meshes, scripted objects like collectables, so why not chunks of the scene too. You can also build the scene in Godot, and this makes organisation of the scene better.

Dave.

Well I’ll be blowed! When you start looking how to do this you find that Blender 5.0 already has such a UI component in the Collection tab in the Properties panel. Now I’d best start research at the Godot end, maybe I’ll find something there too :slight_smile:

So I’ve solved (for now, unless I find a better way) this problem by using linked files in Blender. I have a master file with all my objects together so I can see how they work together but I have each piece in its own file for use in Godot.

I used this addon: GitHub - kitt-cat/auto-reload-linked-libraries: Blender addon which automatically reloads linked libraries when they are modified.
It auto refreshes linked files when they are modified.

I didn’t want my blend files in my project folder, so I used symlinks. Godot doesn’t seem to mind them so far…

Isn’t exporting collections simpler?

If I was using FBX, then I could use batch mode for exporting with collections, but for some reason, it’s not supported for glb files and I’d like to use glb for the custom data stuff.

I ended up finding this: Super Duper Batch Exporter — Blender Extensions

Which exports my objects as separate glbs into a folder of my choosing. It’s not perfect, I’d prefer operating right out of the blend files as that is automatic and prevents user error, but this is still very fast and will facilitate quick iteration.

3 Likes