-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
skinning doesn't work with low bone limit and no bone texture support #518
Comments
I just verified that the skin splitting does work. I suspect maybe you executed those lines after the model JSON has been parsed. To see the skin partitioner work, just have the texture_float extension return null and set the max vertex uniforms to 128. Then you'll get a bone limit of about 21. And it does actually work. The problem is that the engine has changed how it handles material mappings in the last few years. The skin partitioner does handle the mappings when they are passed in as a parameter. However, these days, the call has been changed to pass null. So materials are incorrectly assigned. And the extra mesh instances generated from the split simply get the default material: The current skin splitter is really bad for other reasons too.
I'm wondering if we should consider ripping it out and falling back to CPU skinning where necessary. I mean, we already have a CPU morphing path. |
Another option here would be to fallback on the RGBA8/16 textures to store matrices. It would be lots more texture samples to get 4x3 matrix of floats, but should still be faster than CPU skinning. These are the stats on vertex texture sampling support from about a year ago when webglstats still worked. |
Wow, that's a cool idea, @mvaligursky. Deleting all that skin partitioning code from the engine would be great. |
are we ok to drop support for up to 2% of devices (based on stats from a year ago) and do this? Or would we still need to do some backup CPU skinning or similar. |
This is a really difficult question to answer. On the one hand, I've always preferred we ensure the engine's core feature set runs on a minimum WebGL 1.0 spec. See webgl.min_capability_mode. However, the skin splitting path is clearly broken at the moment, and I'm not aware of anybody complaining. I'm really torn, TBH! |
Don't you mean 0.1%? 😄 Yeah, I think we can just close this now and rip out that skin split stuff. |
If there is no bone texture support and skin splitting is required the skinning doesn't work properly (deformed).
To try this add these lines to Doom 3 Gangnam style or other project with skinned characters.
The text was updated successfully, but these errors were encountered: