Comments (8)
Thanks, I created a new ticket in #96043
from godot.
Please edit your earlier comments instead of commenting several times in a row, it creates a lot of unnecessary notifications
from godot.
Please edit your earlier comments instead of commenting several times in a row, it creates a lot of unnecessary notifications
thanks i will do that
from godot.
update:
it looks like it imports mesh instances as importer mesh instances and it doesn't convert it back into a normal mesh via inportermesh::get_mesh()
update2:
i will dig a bit more
btw why does this importer use importer mesh instance class while gltf doesn't?
edit: okay gltf also uses that.... but somehow converts it to a normal mesh instance hmmmm...
maybe looping through the entire tree to convert importer mesh instance to a normal mesh instance might work?
im fully open for any better ideas.
update3:
actually this can be as simple as adding in fbxdocument::generate_scene()
meshinst.mesh = importermesh.mesh.get_mesh();
in a recursive loop right???
from godot.
My application could also load gltf with gdscript at runtime but if I just try the same with FBXDocument/FBXState I get this error:
E 0:00:28:0463 Viewer.gd:265 @ _load_gltf_or_fbx(): No loader found for resource: /home/andreas/Games/Assets/3d/kaykit/KayKit_Adventurers_1.0_SOURCE/Assets/fbx/rogue_texture.png (expected type: Texture2D)
<C++-Fehler> Method/function failed. Returning: Ref()
<C++-Quelle> core/io/resource_loader.cpp:291 @ _load()
Viewer.gd:265 @ _load_gltf_or_fbx()
Viewer.gd:253 @ load_fbx()
Viewer.gd:350 @ _on_files_dropped()
But the texture png exist at this path. I assume it's the same problem as it seems to be imported correct (e.g. animations are correctly read in) but the mesh is not available. My application is opensource. So in case the bug authors code isn't enough to analyze the problem I could link my code here.
from godot.
My application could also load gltf with gdscript at runtime but if I just try the same with FBXDocument/FBXState I get this error:
E 0:00:28:0463 Viewer.gd:265 @ _load_gltf_or_fbx(): No loader found for resource: /home/andreas/Games/Assets/3d/kaykit/KayKit_Adventurers_1.0_SOURCE/Assets/fbx/rogue_texture.png (expected type: Texture2D)
<C++-Fehler> Method/function failed. Returning: Ref()
<C++-Quelle> core/io/resource_loader.cpp:291 @ _load()
Viewer.gd:265 @ _load_gltf_or_fbx()
Viewer.gd:253 @ load_fbx()
Viewer.gd:350 @ _on_files_dropped()But the texture png exist at this path. I assume it's the same problem as it seems to be imported correct (e.g. animations are correctly read in) but the mesh is not available. My application is opensource. So in case the bug authors code isn't enough to analyze the problem I could link my code here.
this seems off topic u should create a separate issue for that with a Minimal reproduction project (MRP)
ill try to look into that too
what version do you use
i tried what u've said and gltf importer works flawlessly
edit: sorry i misunderstood ur comment ur issue is relevant to this topic
from godot.
i was able to fix the issue [finally] but the "fix" is more of a flex tape rather than a real solution
i added this at line 2144 in fbx_document.cpp file, almost exactly at the end of the generate_scene function
_convert_meshimporters_recursive(root);
return root;
}
void FBXDocument::_convert_meshimporters_recursive(Node *parent) {
TypedArray<Node> children = parent->get_children();
for (int i = 0; i < children.size(); i++) {
_convert_meshimporters_recursive(cast_to<Node>(children[i]));
ImporterMeshInstance3D *child = cast_to<ImporterMeshInstance3D>(children[i]);
if (child == nullptr) {
continue;
}
Ref<Mesh> imported_mesh = cast_to<ImporterMeshInstance3D>(child)->get_mesh()->get_mesh();
MeshInstance3D *meshinst = memnew(MeshInstance3D);
child->replace_by(meshinst);
meshinst->set_name(child->get_name());
meshinst->set_transform(child->get_transform());
meshinst->set_mesh(imported_mesh);
meshinst->set_skin(child->get_skin());
meshinst->set_skeleton_path(child->get_skeleton_path());
memfree(child);
}
}
and in fbx_document.hpp at line 68 i added
void _convert_meshimporters_recursive(Node *parent);
and now it looks good but i will test it more first i still have to duplicate transforms and other variables too
btw i only know gdscript this is the first time i do anything in c++ so please if u can help i will appreciate it
and still we need to find the real problem cus this might create more problems than it fixes idk
from godot.
it works now
all meshes are converted (the fix)
all animations and transforms and materials imported (so it didn't break... cool)
now i have no idea what to do hehe
should i wait for review or pull or what exactly
from godot.
Related Issues (20)
- Issue: Path3D/PathFollow3D logic HOT 2
- RichTextLabel mouse_exited() event fires by Context Menu when control is Right Clicked HOT 1
- Image file imported incorrectly
- Is there a function to update the Project Manager? HOT 1
- PopupMenu visual issues in 3.6 RC1 HOT 1
- Using -rigid import hint on a blender model with an unapplied scale changes scale of rigidbody nodes directly, causing issues.
- Subviewport exhibiting aberrant alpha behaviour on _draw() HOT 3
- Concatenating constant arrays always gives the same array reference
- After importing a GLB file with animations using a Bone Map, some animation data seems to be lost
- Custom enumeration is not colored HOT 1
- Unused class variable warning does not have one for public class variable HOT 2
- Autocomplete does not work properly in certain circumstances.
- Animation editor breaks if snapping is set to more than 1 second
- Godot 4.3 export to Android release and debug issue aab files HOT 1
- Connect signal dialog controls not aligned
- Lightmap capture for dynamic objects don't work
- TLS Handshake error when using TLSOptions.client_unsafe
- OneShot GPUParticles keep emitting in AnimationTree HOT 1
- Broken icons in the gizmo visibility popup menu HOT 3
- setup_boot_logo: Non-existing or invalid boot splash at 'res://icon.svg'. Loading default splash. HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from godot.