codecat / godot-tbloader

TrenchBroom Loader for Godot 4. (Alternative to Qodot)
MIT License
232 stars 29 forks source link

Mesh created without textures when building with godot-cpp for rc2 #68

Closed dominiks closed 1 year ago

dominiks commented 1 year ago

Hi, after successfully using this addon for a while I now encounter a problem when recreating the meshes from maps. When I create an example map like this:

trenchbroom_screenshot

Creating the mesh with the plugin results in this:

generated_mesh

Apparently the mesh does not have any materials set. mesh_properties

When changing the texture_path of the TBLoader node to something wrong, I get the expected error message Texture cannot be found or is unsupported! - res://prototype_textures/128/green_checker.

I am using a custom build with precision=double based on Godot 4 Rc2. The green_checker.png file is automatically imported as Texture2D.

dominiks commented 1 year ago

After playing around with different combinations of custom builds and releases I found that it works correctly when I build tbloader with godot-cpp checked out at https://github.com/godotengine/godot-cpp/commit/516fad14e45d341211121832bb3daa172aebd6e1 (synced with RC1) and not when checked out at https://github.com/godotengine/godot-cpp/commit/0068320ff13fd91d16f3a2bdcf7956cd439c2869 (sycned with RC2).

codecat commented 1 year ago

That's interesting, are there no compiler errors? It kinda sounds like this might be a bug in godot-cpp then, maybe? 🤔

dominiks commented 1 year ago

No compiler errors or warnings, sadly. I tried building tb-loader master with godot-cpp for rc2 as a non-precision build, so as standard as it goes, but no luck with that either.

Unfortunately I'm not knowledgeable enough about godot-cpp to debug this but I also suspect that the issue here is a change on that side. Are you able to build tb-loader with the latest godot-cpp for rc2?

codecat commented 1 year ago

Looks to be caused by this change: https://github.com/godotengine/godot-cpp/commit/75af9003dc2b1583966ab91be6ce1687378860ae

codecat commented 1 year ago

The latest godot-cpp commit should fix this.

dominiks commented 1 year ago

Great to hear. Thank you for taking the time to investigate this.Â