Godot: error importing external resource

Just a heads-up for anyone that stumbles upon issues with importing 3D assets.

For this lesson I had issues when I tried importing the weapon model, and just to state it here, I still don’t really know what or why I had an issue, but I worked around it.

I’m using Godot 4.2.stable, so I know thats different. Anyway, I got it working, though with a small workaround which I think will be part of my (future) workflow anyway (as I intend on using blender for 3d Models).

First off, I could add the weapon to the player scene as directed, but after saving, when trying to run the game, it didn’t appear in game, and I now had errors importing external resources, which pointed toward the SandBox scene, which wasn’t correct. I tried resolving the dependencies (aka, “Fixing them”) by r-click on the scene in the file system, and clicking Edit Dependencies, but all the paths mentioned in the list were correct and the “fix-button” wasn’t clickable. Still, just to ensure this wasn’t any kind of visual glitch, I re-added the correct paths anyway, but to no avail.

I also tried removing the player scene and re-instantiating it, but this made my SandBox scene impossible to load at all, and it essentially broke completely.

My way around it was to import the model to blender and saving it as a .blend file. This is because at least this version of Godot ( I don’t know how far back it goes) can import .blend files, instead of having to export them to other formats (which is partially the reason I’ll be adding this to my workflow). Also there is this nice feature that one can enable, which is to enable importing from blender by choosing the blender path in the editor settings, under FileSystem and Import.

This makes it so that Godot can discover these files when they are created, and I think also, updated.

Next I double clicked on the .blend file inside godot and I ticked off “Skip Import” in the upper left for both the light and the Camera.
image
image

I also had to reimport the materials, which got saved in it’s own folder under the Weapons folder. and now the weapon will load into the scene and game, as if nothing was different.

4 Likes

Awesome, yea I ran into this problem and this fixed it for me. Thanks!

For anyone else who decides to go this route, Godot also provides a small number of name suffixes that can be used to change the way a model imports into the engine, and once you’re used to them, they can save you some time. These work by adding them to the names of your Blender objects in the Outliner (example: Camera -noimp would ignore importing the Camera object).

You can find details about the available suffixes here:

1 Like

Hey guys,

Thanks for the great tips about incorporating the Blender workflow! That is probably what I am going to do too, eventually, but for the time being, I found a much simpler and faster fix for this issue.

I, too, ran into pretty much the same import errors, so for anyone else who went rogue and is not using the same godot version as the course, perhaps this will help. (I am using 4.2.1)

All I had to do was open the .glb file from the File Tree, make sure the root node “Scene” was selected, and then go down to the bottom right corner under glTF where there is a Naming Version option. By default mine was set to “Godot 4.2 or later”. Open the dropdown and select “Godot 4.1 or 4.0”. Click “Reimport” at the bottom.

After this, my errors went away and my scenes all ran fine, although there was some visual glitching in the Sandbox scene 3D viewport that showed the model in the wrong place (in the floor), although it appeared in the correct place when the game played. This was corrected after I closed and restarted Godot.

I held off posting this fix until i finished the course, just to see if the change in naming would cause any errors or anything to pop up further down the line (perhaps in internal filepaths or something?), but everything seems fine. I did the same thing when I imported the next weapon, but all other assets imported fine normally.

Hopefully this might help someone who doesn’t want to go through the hassle of reimporting everything through Blender!

2 Likes

Privacy & Terms