Keslinger Posted March 7, 2017 Share Posted March 7, 2017 (edited) Hi, I'm playing with a wearables system to load clothes pieces and associate them with a baseMesh's skeleton (not unlike the XBox avatar stuff). http://babylonjs-playground.com/#WDMRY#23 There should be two models, one clapping and one cheering. They should be wearing different wearables (loaded during runtime and set via wearableMesh.skeleton = baseMesh.skeleton) I've run into a weird issue on devices that run out of uniforms for skinned models. Works great on my desktop (Chrome), but on my Nexus 6, I see shader compiler errors and messages that say it will fall back to CPU skinning. The CPU fallback doesn't work, though. The end result is the skeletons are not associated properly with the skinned mesh pieces (wearables). Which parts are wrong varies from load to load. The same thing happens on other mobile devices that have to fallback. I understand that I can reduce the number of bones in a mesh to ensure I take advantage of GPU skinning (and I will eventually), but CPU fallback should work, right? Is there something else I'm doing wrong? Thanks! Edit: A much cleaner example, just loading the same file twice http://babylonjs-playground.com/#1XQ32V Edited March 8, 2017 by Keslinger Added cleaner example Quote Link to comment Share on other sites More sharing options...
Keslinger Posted March 8, 2017 Author Share Posted March 8, 2017 After some more documentation spelunking... If I iterate through all the meshes and set "computeBonesUsingShaders = false" for each mesh, it skins properly on mobile. How do I know (programmatically) when I should do that and when it's okay to use the shader? Quote Link to comment Share on other sites More sharing options...
GameMonetize Posted March 9, 2017 Share Posted March 9, 2017 Hello are you on 3.0-alpha? I think we fixed the fallback bug recently Quote Link to comment Share on other sites More sharing options...
GameMonetize Posted March 9, 2017 Share Posted March 9, 2017 Ok we did not really fixed it Now it is good (clear your cache and your PG should work even on iOS) Quote Link to comment Share on other sites More sharing options...
Keslinger Posted March 9, 2017 Author Share Posted March 9, 2017 Haha.. you researched, merged and deployed faster than I could figure out what property of the engine contained the version. Too cool. Yup, that fixed it! Thanks! Hmm.. still... Is there a way for me to know if the engine had to fall back to CPU? I think (one day) I'd like to notify the user, swap assets, etc. if I know they are on a lower end device. Thanks again. Quote Link to comment Share on other sites More sharing options...
GameMonetize Posted March 9, 2017 Share Posted March 9, 2017 The best option could be to test is computeBonesUsingShaders ==- false at rendering time Quote Link to comment Share on other sites More sharing options...
Keslinger Posted March 9, 2017 Author Share Posted March 9, 2017 Perfect. Marked as Solved. GameMonetize 1 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.