godotengine / godot

Godot Engine – Multi-platform 2D and 3D game engine
https://godotengine.org
MIT License
88.89k stars 20.16k forks source link

UFBX runtime loader not working #96043

Open andreas-volz opened 2 weeks ago

andreas-volz commented 2 weeks ago

Tested versions

Godot v4.3.stable

System information

Linux Mint 21 (Vanessa) - X11 - GLES3 (Compatibility) - NVIDIA GeForce RTX 3060 (nvidia; 535.183.01) - AMD Ryzen 5 2600X Six-Core Processor (12 Threads)

Issue description

It doesn't work to load a FBX model at runetime in gdscript. Not correct, the loading works partial as you could see in the attached debugger images. But nothing is displayed in the 3D view.

Steps to reproduce

1) unzip the MRP project 2) change "PREFIX_DIR" in Viewer.gd to an absolute path in your system where you unzipped the MRP project 3) start the project and see that only the GLTF file is loaded and the FBX files produces an error 4) look into the debugger for the FBX object and see that there're "ImportedMeshInstance3D" where in the GLTF loaded file are "MeshInstance3D"

Minimal reproduction project (MRP)

github_ufbx_bug.zip

Error messages:

E 0:00:00:0934 Viewer.gd:28 @ _load_gltf_or_fbx(): No loader found for resource: /home/andreas/Games/Assets/3d/kaykit/KayKit_Adventurers_1.0_SOURCE/Characters/fbx/knight_texture.png (expected type: Texture2D) <C++-Fehler> Method/function failed. Returning: Ref() <C++-Quelle> core/io/resource_loader.cpp:291 @ _load()

Viewer.gd:28 @ _load_gltf_or_fbx() Viewer.gd:19 @ load_fbx() Viewer.gd:14 @ _ready() W 0:00:01:0019 Viewer.gd:30 @ _load_gltf_or_fbx(): Adding 'Knight_ArmLeft' as child to 'Skeleton3D' will make owner '' inconsistent. Consider unsetting the owner beforehand. scene/main/node.cpp:1579 @ add_child() Viewer.gd:30 @ _load_gltf_or_fbx() Viewer.gd:19 @ load_fbx() Viewer.gd:14 @ _ready() W 0:00:01:0019 Viewer.gd:30 @ _load_gltf_or_fbx(): Adding 'Knight_ArmRight' as child to 'Skeleton3D' will make owner '' inconsistent. Consider unsetting the owner beforehand. scene/main/node.cpp:1579 @ add_child() Viewer.gd:30 @ _load_gltf_or_fbx() Viewer.gd:19 @ load_fbx() Viewer.gd:14 @ _ready()

.......... (each bone is reported)

ufbx_remote_details

Naming-things-is-hard-btw commented 2 weeks ago

wasnt ur problem about gltf? anyways i tried it and yes i confirm there is a problem with the fbx importer

Naming-things-is-hard-btw commented 2 weeks ago

try this https://github.com/Naming-things-is-hard-btw/godot/releases/tag/asds

andreas-volz commented 2 weeks ago

It was always a FBX problem. GLTF works here great. I get this error running your binary: ./godot.linuxbsd.editor.x86_64: /lib/x86_64-linux-gnu/libm.so.6: version `GLIBC_2.38' not found (required by ./godot.linuxbsd.editor.x86_64)

Naming-things-is-hard-btw commented 2 weeks ago

It was always a FBX problem. GLTF works here great. I get this error running your binary: ./godot.linuxbsd.editor.x86_64: /lib/x86_64-linux-gnu/libm.so.6: version `GLIBC_2.38' not found (required by ./godot.linuxbsd.editor.x86_64)

hmmm... try installing the missing packages since i use arch and when i search the packages database i get this

core/glibc 2.40+r16+gaa533d58ff-2 [installed]
    GNU C Library
core/glibc-locales 2.40+r16+gaa533d58ff-2 [installed]
    Pregenerated locales for GNU C Library
core/lib32-glibc 2.40+r16+gaa533d58ff-2 [installed]
    GNU C Library (32-bit)

i have glibc installed, u dont.. please install it and try again

Naming-things-is-hard-btw commented 2 weeks ago

btw only do this for testing since i tried to patch the fbx importer in this custom build try everything!! importing exporting loading at runtime and in the editor try animations materials different node types from blender etc...

shiena commented 2 weeks ago

I also tried MRP in the following environment and got the same error message.

Furthermore, when I switch the FBX importer to FBX2glTF, I get the same error message.

andreas-volz commented 2 weeks ago

i have glibc installed, u dont.. please install it and try again

I won't play around with glibc on my stable development system. Maybe I'll try to build godot on my own, but I'll be on vacation for the next 10 days. So maybe someone else could verify the fix.

Naming-things-is-hard-btw commented 2 weeks ago

i have glibc installed, u dont.. please install it and try again

I won't play around with glibc on my stable development system. Maybe I'll try to build godot on my own, but I'll be on vacation for the next 10 days. So maybe someone else could verify the fix.

yea i tried it and it works it will be merged in godot 4.4