-
-
Notifications
You must be signed in to change notification settings - Fork 18.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
FBX import takes forever (more than 2 minutes for single object) #85074
Comments
Like I said the main problem is the mipmaps. (Left - original texture , Right - mipmap 0) I extracted all mipmaps into files so I can view them, and we can see the 5MB texture inflated to 52MB mipmaps: EDIT: I tried importing only the texture (JPG, 5MB, 8k) and it took 41 seconds! The problem is with
So the main problem is importing high resolution textures. EDIT: I found temporary solution - using compression mode |
This is very likely a bug because the Detect 3D mechanism (which works based on textures being assigned to BaseMaterial3D properties) will automatically use VRAM compression for textures, regardless of their size. It doesn't appear to kick in with FBX import in your case, but it should. It seems FBX import saves its own textures instead of relying on Godot's import system, and that's likely the root cause. It should probably always use VRAM compression by default, with an import option to disable it if needed. We have similar options available for embedded textures in the glTF importer. |
@Calinou I also noticed the texture is inflated in size: Left: original FBX files, totaling 60MB |
Lossless compression generally results in smaller files than VRAM compression, which has a fixed 1:4 compression ratio (1:6 for S3TC DXT1). This is especially the case with textures that have lots of flat color areas, which compress very well with lossless compression but won't compress any better than an highly detailed texture when using VRAM compression. If you want smaller file size at the cost of import times and quality, use the Basis Universal compress mode. (We could support using Zstandard compression on VRAM-compressed textures at the same time, but this loses the universal aspect of Basis Universal and will result in slower loading times.) PS: You may not need a 8192×8192 texture for a character, especially if they're not the main character you constantly view from behind in a third-person game. 4096×4096 or even 2048×2048 should be plenty. |
Can you still reproduce this on 4.3.dev6? FBX import is now handled by ufbx, which should be faster than fbx2glTF. On my system, it takes about 30 seconds to import the 3D scene from scratch, with most time spent in the VRAM compression process:
Make sure to test this on a fully optimized editor build ( #91535 should make it possible to achieve much faster VRAM compression speeds in the future, although that PR is only focusing on HDR formats for now, not SDR (most game textures are SDR). PC specifications
|
Godot version
v4.1.3 stable official and v4.2.rc.custom_build [80de898]
System information
Godot v4.2.rc (80de898) - Windows 10.0.19045 - Vulkan (Forward+) - dedicated NVIDIA GeForce RTX 3070 (NVIDIA; 31.0.15.3742) - AMD Ryzen 5 3600 6-Core Processor (12 Threads)
Issue description
When importing an FBX asset (56MB) it takes way too long (2 minutes and 17 seconds, yes I measured it).
On the other hand, blender takes 1-2 seconds.
Steps to reproduce
rp_nathan_animated_003_walking.fbx
to the scene / FileSystem to import itMinimal reproduction project
I can't upload it. For some reason, a single node3d and FBX import, the size of the ZIP is 250MB.
I'm not joking, the
.godot
folder size is 211MB (again this is brand new project that I only imported FBX)So I can't upload demo project
Possible solution is discussed here: godotengine/godot-proposals#8476
The text was updated successfully, but these errors were encountered: