JCPalmer Posted November 19, 2015 Share Posted November 19, 2015 I am informed by the behavior of the Blender exporter for BabylonJS. If you assign a skeleton to a mesh, it no longer writes an optimized list of verts/normals/UV/etc. It writes them all. Now I do not really know why this required, but lets assume it (I will challenge this through experimentation @ another time). This can create a choke point. As your mesh gets larger, if you have a skeleton you could reach the 65k limit of indices (likely causing problems for mobile), where as if they were optimized they would not. If you are not optimizing, would not requiring indices completely solve the problem? That is if it works. There is much checking if indices are defined in JS, but will the other buffers work without the index? Quote Link to comment Share on other sites More sharing options...
JCPalmer Posted November 19, 2015 Author Share Posted November 19, 2015 First part, are optional? No. when I pass a mesh setting no indices, I get the error "Error: WebGL: drawElements: bound element array buffer doesn't have any data". I am not sure where or why it is being bound yet. Quote Link to comment Share on other sites More sharing options...
GameMonetize Posted November 19, 2015 Share Posted November 19, 2015 Optional: no Quote Link to comment Share on other sites More sharing options...
JCPalmer Posted November 19, 2015 Author Share Posted November 19, 2015 I jumped over to the Blender side to start allowing meshes with skeletons to be optimized, and put in the same checking that the matrix weights & indices also matched, like normals, UV's, & color. Was a lot easier with the calling of this new method:def same_array(arrayA, arrayB): if len(arrayA) != len(arrayB): return False for i in range(len(arrayA)): if arrayA[i] != arrayB[i] : return False return TrueGot real good optimization, and the runtime as actually 20% faster. DK, you just gave up on optimizing with skeletons, right? I hate to mark this as answered, cause thought the first way should have worked. This is actually much better than no indices. This reduces, by a lot, positions, normals, uvs, skeleton weights & indices, and the skeleton extras when # of influencers > 4. Gryff, you should redo your Blue Lady, once this is implemented in the Repo. Actually anyone who has an existing .babylon generated with a Blender exporter v3.0 or less with a skeleton. Quote Link to comment Share on other sites More sharing options...
GameMonetize Posted November 19, 2015 Share Posted November 19, 2015 it was more a timing issue:) so I'm glad you did it 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.