Skip to content
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

Skeleton causes error and project stops working when played when a camera3D is in the scene. #78470

Closed
viksl opened this issue Jun 20, 2023 · 23 comments · Fixed by #78563 or #78713
Closed

Comments

@viksl
Copy link
Contributor

viksl commented Jun 20, 2023

Godot version

4.1 b2

System information

Windows 10, Nvidia GTX 1660Ti, Vulkan

Issue description

As you can see in the image:

skeleton_error_41b2

In the editor I have an imported model, no errors. The model has a skeleton. Moving bones moves the mesh accordingly no errors and nothing seems to be wrong as far as I can tell.

When I play the project without the camera I get no errors.
When I play the project with a Camera3D the project throws 12 errors (see the image above) and the whole project freezes without dispalying anything as you can see in the image it's just a gray window.

This model and import works just fine in 4.0.3, this is also not the only model I have issues with so it's not just this model.

I can't provide a test scene or models because these models are purchased but I hope the fact it works in 4.0.3 and the error could help?

I'll try anything you ask me to do to help to resolve this - hopefully before 4.1 get released.

NOTE: Same error and the following line as in the screenshot appear in the windows Console, no other errors.
NOTE2: This project was initiated from 4.1beta as brand new, nothing else is in as you can see.
NOTE3: I'll need to double check but I had some models working before so it might not be with every model but I'll check later on today.

Steps to reproduce

Hard to tell, if you have a model with a skeleton give it a try, add the model t othe scene, camera3d and then see if it happens?

Minimal reproduction project

For now check this one from another report: #77780

TestMeshWithSkinGD.zip

EDIT:
Related line where the editor takes me to:

ERR_FAIL_COND_V(skeleton->size == 0, RID());

Production team edit: Added the non-mono MRP (reduced to fit Github's size limit) to the issue.

@viksl viksl changed the title Dragging files (textures, ...) is extremely slow. [4.1 beta 2 regression] Skeleton causes error and project stops working when played when a camera3D is in the scene. Jun 20, 2023
@akien-mga akien-mga added this to the 4.1 milestone Jun 20, 2023
@enxas
Copy link
Contributor

enxas commented Jun 20, 2023

I have reported similar problem with ERROR: Condition "skeleton->size == 0" is true. Returning: RID() a while ago #77780. I have provided MRP there and how to reproduce it, so lets hope someone can figure it out.

@viksl
Copy link
Contributor Author

viksl commented Jun 22, 2023

@bitsawer @YuriSizov I'm not sure about the solution. I compiled the engine with the fix and it hides the errors but I still have issues, my character still doesn't render. It does render in the editor itself but when I hit the play button the 3D camera doesn't show the character.

Should I open a new bug report or ask to reopen this in case it's related?

EDIT: I'll be posting a video in couple minutes after it uploads to showcase it.

@YuriSizov
Copy link
Contributor

@viksl Make sure you have environment configured. If there is no source of light in the scene, you won't be able to see anything. There is a preview environment in the editor, but there is nothing at runtime, unless you add it yourself. (You can copy the preview environment, if you want).

@viksl
Copy link
Contributor Author

viksl commented Jun 22, 2023

@YuriSizov I have everything set up, the scene works just fine in 4.0.3 too. In the video I have it with and without environment just in case but the camera can see the model in the editor but not after I hit the play button for some reason and why it works in 4.0.3? I'm confused.
(I also use a DirectionalLight3D so there's always light in the scene)

@YuriSizov
Copy link
Contributor

If you upload an MRP, someone can take a look.

@viksl
Copy link
Contributor Author

viksl commented Jun 22, 2023

That's the issue, the model's license doesn't allow that :'/. I'm not sure what to do exactly.

EDIT: Here's the video of it in action: https://youtu.be/0xBjVyfYey0 , maybe I'm just being stupid about something but the same project works in 4.0.3. Btw I built against master so I'm not sure if it's 4.1 beta2 or already beta3 just in case it matters?

EDIT2:
@YuriSizov I tried to add some HDRI background as I had before and the project halts the rendering (it doesn't fully render the HDRI in the background, top 2/3ds render but not the rest and it seems to stop at the same time as before with the errors.

(Just in case it matters I also saved the environment and later added it to the camera but that's not in the video, it resulted in no changes so I kept the video shorter)

@bitsawer
Copy link
Member

bitsawer commented Jun 22, 2023

I'm starting to think that the skeleton errors maybe weren't the cause of the actual issue here, I guess they were just a visible thing to pin the visual error to, but looks like the real reason could be elsewhere.

So at least the issue title could probably be changed. And like YuriSizov says, it's hard to do anything without a test project, it would just be an endless guessing game. It could be something silly like a Camera3D cull mask.

@viksl
Copy link
Contributor Author

viksl commented Jun 22, 2023

@bitsawer well I wish I could provide the project as is.
I don't think the issues is the cullmask at least not from me since this is a fresh new project made only for this case so everything has default settings I did not change anything.
Second thing is that I opened this very project in 4.0.3 straight and it worked, if it was cull mask shouldn't it that also not work in 4.0.3 then?

OH! I can provide a test project, I just downloaded a character from mixamo and it has the same issue, so I'll quickly put together an MRP. Where do you want me to put it, new bug report or here and have someone reopen this or ...?

@bitsawer
Copy link
Member

You can post the test project here, I can take a look. If it's not related to skeleton stuff we can always make a new issue later.

@viksl
Copy link
Contributor Author

viksl commented Jun 22, 2023

@bitsawer Here's the project: https://we.tl/t-DS8T1dlcbm, it's above the github file size limite so I had to upload it to wetransfer, is that ok with you? (the link will expire in 7 days)

@bitsawer
Copy link
Member

I downloaded the test project and I can repro the issue. I'll try to dig a bit deeper and try report back in a few days or next week.

I think this could be re-opened for now, although the title can be a bit misleading if the issue is not actually caused by a skeleton bug (then again, maybe it is).

@viksl
Copy link
Contributor Author

viksl commented Jun 22, 2023

@bitsawer I guess that's up to @YuriSizov if he reopens it again? If you come later back figuring out it's not a skeleton issues than I can still change the name but for now this is the best I can tell since I have no idea what else to name it.

Btw, could be caused by the fbx importer in some way? Although I guess that should show in the editor as well, shouldn't it?

Thank you for checking it out so quickly and confirming the issue!

@akien-mga akien-mga reopened this Jun 22, 2023
@viksl
Copy link
Contributor Author

viksl commented Jun 23, 2023

@bitsawer

  1. I've tried reexporting the model through blender as GLTF2 and the issues is the same.
  2. If I import without skin then the character gets rendered just fine so I assume the issue might be related to it somewhere.

@akien-mga akien-mga changed the title [4.1 beta 2 regression] Skeleton causes error and project stops working when played when a camera3D is in the scene. Skeleton causes error and project stops working when played when a camera3D is in the scene. Jun 23, 2023
@akien-mga
Copy link
Member

Tested, the regression seems to start with 4.1-dev3 (both the skeleton error, and the fact that it doesn't render).
In 4.1-dev2 it works as expected.

Would be worth bisecting further, it's still a lot of changes: https://godotengine.github.io/godot-interactive-changelog/#4.1-dev3

@adamscott
Copy link
Member

Added the topic:rendering label as this might be related to the rendering.

@adamscott
Copy link
Member

@viksl Could you create a minimal reproduction project? The "MRP" you linked in #77780 is:

  • using C# files and the mono release of Godot. We usually ask contributors and users to share a MRP that uses the base release of Godot, as this is easier to debug;
  • is not a "minimal" project in itself. As a lot of factors can influence the existence of an issue, we suggest users reporting issues to create a project that contains the minimal setup to reproduce the issue.
  • A small Godot project which reproduces the issue, with no unnecessary files included. Be sure to not include the .godot folder in the archive (but keep project.godot).
  • Note for C# users: If your issue is not Mono-specific, please upload a minimal reproduction project written in GDScript or VisualScript. This will make it easier for contributors to reproduce the issue locally as not everyone has a Mono setup available.

Thank you!

@viksl
Copy link
Contributor Author

viksl commented Jun 23, 2023

@adamscott the #77780 is not mine project, it's someone else's. I linked an MRP here in the chat above (https://we.tl/t-DS8T1dlcbm) since the project file is larger than git limit it's on a temporary link which will expire in 6 days.

EDIT: This MRP was created using non- mono editor, same issue: https://we.tl/t-qf82XF7XQj (it will expire on 30.06.2023)

@adamscott
Copy link
Member

@viksl I took your non-mono editor MRP and reduced the textures to the 1/4 of their original size.
TestMeshWithSkinGD.zip

@adamscott
Copy link
Member

CC. @lyuma, @fire and @TokageItLab

@bitsawer
Copy link
Member

Bisected the regression to #75901 and made a PR that fixes this: #78623 Feedback welcome, the logic there feels a bit weird.

@YuriSizov YuriSizov modified the milestones: 4.1, 4.2 Jun 23, 2023
@viksl
Copy link
Contributor Author

viksl commented Jun 24, 2023

@bitsawer in the #78623 you mentioned main thread but you can also set the group to sub thread and it will also work, I'm not sure if it means anything, is there at this point even a difference between the choice of main/sub thread or is it not yet implemented (since group order can't be changed anyway)?

Thanks for looking into this, I appreciate a lot!

@adamscott
Copy link
Member

@viksl Forgot this detail about MRPs for your future reporting of issues. 🙂

Don't forget to delete the .godot directory from the zip before upload, because it takes a lot of space (like, in the zip you gave, it takes 50% of the size of the zip!) and that directory is not needed to open the project.

@viksl
Copy link
Contributor Author

viksl commented Jun 24, 2023

@viksl Forgot this detail about MRPs for your future reporting of issues. 🙂

Don't forget to delete the .godot directory from the zip before upload, because it takes a lot of space (like, in the zip you gave, it takes 50% of the size of the zip!) and that directory is not needed to open the project.

Oh, I see. I should have also removed the textures to reduce the size. I was tuneled so much on the issue and trying it out that I failed to properly think about the rest. Thanks for the info, definitely nice to know .godot is not necessary ;).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment