-
-
Notifications
You must be signed in to change notification settings - Fork 18.7k
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
MeshDataTool corrupting meshes in Forward+ rendering method #91618
Comments
The imported resource is being overwritten, it needs to be either
|
It works, thank you! Is this behavior intentional? The documentation shows to call |
Misclick, sorry, just woke up |
The data is created as part of an import process so it should be readonly, yeah the documentation needs to warn for this at the very least. |
Tested versions
System information
Godot v4.2.2.stable - Windows 10.0.19045 - Vulkan (Forward+) - dedicated NVIDIA GeForce RTX 3070 (NVIDIA; 31.0.15.5123) - 11th Gen Intel(R) Core(TM) i7-11700K @ 3.60GHz (16 Threads)
Issue description
I'm running into an issue where 3D models (unmodified default cube & UV sphere from Blender 4.1 exported as .GLB) are getting corrupted, turning solid black and changing size, after creating a MeshDataTool from their surface and re-committing it to the mesh.
The following barebones script causes the issue to occur:
The docs include a warning that MeshDataTool can only be used on Meshes that use the PrimitiveType Mesh.PRIMITIVE_TRIANGLES (3), but if you modify the script to print it out, you can confirm that this is not the issue.
The MRP scene contains 5 meshes, left to right: cube and sphere with the barebones script, cube and sphere with the example MeshDataTool script from the Godot docs, and finally, the only working one, the previous script but using a procedurally generated sphere mesh made with the example ArrayMesh script from the Godot docs.
Editor screenshot:
Forward+ rendering method build:
Mobile rendering method build:
This honestly makes zero sense to me and I have no idea what's happening here or how any of the involved steps even could go wrong. Whether it's somehow an issue with the models, the import process, MeshDataTool, or why it changes depending on the rendering method. I've tried asking in the Discord server a couple times, but the only lead that's been found is that it works when using the mobile renderer.
Steps to reproduce
Open the attached MRP in any Godot version 4.x. The selected rendering method is Forward+, and when running the project, you should see the above graphical glitch. If you switch the rendering method to Mobile and save and restart the project, it will look correct when running.
Minimal reproduction project (MRP)
MRP_MeshDataTool_ForwardPlus_Issue.zip
The text was updated successfully, but these errors were encountered: