webmastersara Posted November 6, 2014 Share Posted November 6, 2014 Hello fellow developers & Babylon.js enthusiasts, I am currently attempting to export a scene from 3ds Max to .babylon format using the exporter tool. However, I am running into an strange issue during the process. I am receiving this error: "Exportation cancelled: Object reference not set to an instance of an object". I am not sure what this could refer to. During the conversion process I received a few messages stating "Mesh has too many vertices", but I don't think this would be the reason the exportation was cancelled, could it? I would appreciate any tips on what could be causing this problem. Thank you for your time! Quote Link to comment Share on other sites More sharing options...
Dad72 Posted November 6, 2014 Share Posted November 6, 2014 Hello, Your model should not exceed 65565 vertices by mesh for WebGL. so yes, this is the cause of the problem. you simplify the mesh. webmastersara 1 Quote Link to comment Share on other sites More sharing options...
joshcamas Posted November 6, 2014 Share Posted November 6, 2014 Interesting! What about submeshes? To they all add up to the total count? Quote Link to comment Share on other sites More sharing options...
Supermitch Posted November 7, 2014 Share Posted November 7, 2014 Yes , or you can split the mesh in several parts, as long as each part does not exceed the 65 k vertices limit (16 bits index limitation). Quote Link to comment Share on other sites More sharing options...
Dad72 Posted November 7, 2014 Share Posted November 7, 2014 Good question, an object must not exceed 65565 if more objects form a single object, it should not be a problem, but if it is attached and form a single object, it should not exceed its famous 65565. otherwise WebGL a problem has show the scene. Quote Link to comment Share on other sites More sharing options...
webmastersara Posted November 13, 2014 Author Share Posted November 13, 2014 Thank you dad72 and everyone else for your responses. I have optimized the vertices in my meshes and am no longer receiving the "Mesh has too many vertices" notice, however I still run into the "Exportation cancelled: Object reference not set to an instance of an object" message. Very strange. I am not sure why this is still happening. Quote Link to comment Share on other sites More sharing options...
JCPalmer Posted November 14, 2014 Share Posted November 14, 2014 I am sorry that I cannot elaborate much on your new problem since I do not use 3ds max, but simplification was the way to go. The Blender exporter, which I am familiar with, actually does go beyond the 65 k limit, but it does so by breaking it into multiple meshes & parenting to glue the parts back together. I believe there could be side effects in addition to performance though, like armature issues. Also, subMeshes might have a name which is misleading. More accurately, they are just definitions of vertex ranges into the actual mesh. Their reason for existing is so that multi-materials can more easily managed . Consequently, exported meshes which have multiple materials have their vertices which are ordered differently from where they came. The name of that error sounds like it is coming from a 'catch' for a null pointer exception. Quote Link to comment Share on other sites More sharing options...
Dad72 Posted November 14, 2014 Share Posted November 14, 2014 webmastersara, Your error may be different. this can happen if a vertex is useless. 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.