-
-
Notifications
You must be signed in to change notification settings - Fork 21.3k
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
--convert-3to4 hangs. Also fails on files >500kb #63672
Comments
Such files like provided one, was a reason why I added such limit. |
Can you add an option to not care about file size? |
Godot can read and load much, much larger files just fine. My player character scene is 360mb with several meshes, 200 animations, and a complex animation tree, all stored as text. Only materials and textures are separate. IMO, you should not set these arbitrary limits. If Godot can handle it, so should the conversion tool.
I don't think arbitrarily converting some lines and skipping others is a good idea for scene files or resources. Many people do not edit text scene or resource files. I'd say either pass or reject the whole file, unless it is a shader or gdscript. For me individually, I've made significant process manually converting (aided by a script), so I'm just here to give feedback based on a real and large project to help improve the tool for future conversions once GD4 is stable. |
In #64396 I added option to change default line length and file size limits and also everything should work faster, so freezes should happen much less frequently(if any occur, of course).
Converter cannot work on same amount of data like Godot, so this limits are needed(now user can set how many files want to convert and how much can wait for results), because when loading tres/tscn files, Godot needs only to parse data and create objects basing on this data but converter needs to run on each line hundreds/thousands of rules so it is expected that converter won't handle as big files as Godot. Additionally storing such big amount of data in text files(like tres or tscn) is highly discouraged due e.g. lower speed of loading them(I remember PR which showed dialog when user tried to save to text file, with advice to save it with e.g. res extension, but I can't find it now). |
I appreciate the concern, however this is not good advice for teams using git, like ours. Git does not do binary diffs, so working with frequently changing binary files in git is a poor choice. Godot does not behave well with developer's files, and constantly changes scenes and resources even when no change is made by users. Since the files are binary, we can't see what the actual changes are with git, so we have to either blindly upload them or blindly discard them. Neither is good. Godot changes files if you have resource A, which is tied to resource B (eg a material) and you move or rename resource B. Or the smallest change of scene format, say a new line added or removed, which has happened continuously across almost all minor versions of Godot over the last few years (even in the "stable" 3.x branch). I've seen adjustments to binary materials, animations, resources and scenes show up in my modified list every day. Godot constantly changes files even when we do not. I blew through one repository limited to 10gb, had to purge a lot of binary files and move my team over to a new repot. It got so bad, I had enough and converted every resource and scene to text except textures. Now I can see what changes are actually being made, and can make a conscious decision as to whether they are needed in the repo. When Godot decides to change things, uploads now are a few 100 bytes difference instead of 10-100MB. Godot has a convert text resources to binary option on export, so text loading speed is not a concern except during development, and only with the very largest of files. So from the experience of a game developer, not an engine developer, I discourage you and other engine devs from discouraging the use of text files for development. You should be encouraging every developer to use Git. And anyone using Git should be using text files for everything except textures, binary 3D objects that are inherited (likely rarer than the engine devs think) or other special files. I would only consider using binary resources when Godot stops changing scene and resource formats in every release, and is better designed for Git based projects. |
To wit, other version control mechanism like SVN also have problems with binary files. |
Yes. The only one I know of that does binary diffs is perforce, which is why it's popular among UE teams. UE has the same problem Godot does: Index information and asset content are in the same file. Godot has the benefit of a text based option. It might be better for revision control for both engines if index information (materials, external resources, etc) was in a text import file, then content could be saved in a binary file that never changes. But Godot/text + convert to binary on export is adequate. |
Godot version
5c6744a
System information
Win 10/64 NVIDIA GeForce GTX 1060/PCIe/SSE2
Issue description
6GB repo, 5100 files (assets, code, scenes). Now that #63377 is fixed, I ran the conversion again on my project. It identified 2011 files to process.
First I started with --validate-conversion-3to4, then went on to --convert-3to4. Both had the same behavior.
1 - 500kb Limit
There should be no such limit. If the editor can read such files, the conversion tool should be able to. Other conversion scripts can process them fine. I have plenty of large, text based assets and scenes. Binaries are no good for frequently changing files stored in git.
Also the check isn't even consistent. It's ok with this file >500kb, but not others:
2 - Hanging
It was chugging away fine validating everything, skipping anything above 500kb. Then it hit some file that it should have skipped due to the above limit and is hanging at 100% CPU on one thread. 220mb used.
After about 30+ minutes I finally hit ctrl+c and saw this:
Structurally, there's no difference between Mountain_rock_big_02_1.tscn and Mountain_rock_big_02_2.tscn, and the next one _3 in case it started that before printing. I diffed them and they only differ by names or array data. They are static bodies as the root, an immediate geometry w/ a LOD script, three LOD mesh instances as arraymeshes, and a collision shape w/ a ConcavePolygonShape (trimesh generated off of LOD1 or 2. About the same number of vertices at each LOD level. As you see above the second file is smaller. _3 is between 1 and 2 at 4mb.
Here's the scene.
Mountain_rock_big_02_2.zip
Here is the full conversion log so far.
convert_log.zip
Testing what was converted
Finally, I opened up the half converted project to see if it is any better than my current conversion process. I'm especially interested in anything that might fix #63550.
After a couple hours with my own conversion process I got my error count on open under 100. After this half finished conversion, my error count is 2862. It's not a fair comparison, just a data point.
I looked at some files that were reported as converted and here's what I found:
Shaders - not converted properly, opened a separate issue here --convert-3to4 doesn't convert shaders #63673
Mesh conversion - No different than the corrupted footbridge and support beam meshes shown in ArrayMeshes converted from Godot 3.x display incorrectly in 4.0 #63550
@qarmin
The text was updated successfully, but these errors were encountered: