-
-
Notifications
You must be signed in to change notification settings - Fork 3.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
Double MAX_JOINTS and MAX_MORPH_WEIGHTS #15972
Conversation
Welcome, new contributor! Please make sure you've read our contributing guide and we look forward to reviewing your pull request shortly ✨ |
Do you have a convenient link to a model that previously failed but now works that we can use to test this? |
This has been moved several times, and I'm trying to piece together the history. It was moved to |
Ah, @mockersf touched this back in #9351, and may have more context about why this exists and why it was set to that value.
|
Unfortunately not, it's a purchased & proprietary model and license doesn't allow me to redistribute it like that. I'm wondering if maybe just the weight/joint data however could be extracted and used for a test case, would just be data and should be fine in theory. If this could work for you/Bevy and be beneficial, I can reach out to the original model author and ask if it's OK with them. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This values are used to allocate buffers. Their maximum sizes depend on the GPU/platform, the current values are the ones guaranteed to work everywhere.
To allow bigger values, you would have to check against the limits of the GPU at runtime, which would mean not using consts anymore.
How would that realistically work like? I'm guessing we can't dynamically figure that out, as that would have to take into consideration other things that go into the GPU, or not? Or would it just be a question of reading a value then setting the limits based on that? Alternatively, would it make sense to have the default values as they were before this patch, and then allow users to set the limit themselves via passed in values? Would be a workaround at best I suppose. |
Closing this in favor of Be able to customize MAX_JOINTS and MAX_MORPH_WEIGHTS #17128 |
Objective
I tried to import a 3D model that were slightly above the existing MAX_JOINTS and MAX_MORPH_WEIGHTS limits, got this error:
Solution
So tried the simplest solution possible, doubling the limits I hit when trying to load the model. It seems to work without any issues, everything still works exactly the same as far as I can tell. @alice-i-cecile asked me to PR the changes, so here we are :)
Ideally, I'd would have liked the comments for these two values to describe why those exact limits have been chosen, but I don't know the answer to that, maybe someone else could help me explain why the limits are there in the first place, and how the specific numbers were chosen.