Jump to content

Are Indices optional, or can they be?


JCPalmer
 Share

Recommended Posts

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?

Link to comment
Share on other sites

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 True

Got 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.

Link to comment
Share on other sites

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.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...