n26 Posted January 9, 2015 Share Posted January 9, 2015 Considering the following example: When grouping meshes into an empty object, they do not show up when loaded in Babylonjs. As of the example, only the non grouped cube is rendered: Any idea how to fix this behavior? Thanksexample.babylon.txt Quote Link to comment Share on other sites More sharing options...
jahow Posted January 9, 2015 Share Posted January 9, 2015 Hi, I've had a similar problem recently. It wasn't related to the mesh data, but to the way I was adding objects to the scene. As such, I would advise you to paste here the code you're using to initialize your scene. Also you should make sure you're using the last Blender exporter (1.5). If I recall correctly, it has an option to only export meshes in a certain layer, maybe that is what's coausing you trouble? Quote Link to comment Share on other sites More sharing options...
n26 Posted January 9, 2015 Author Share Posted January 9, 2015 Thanks for the answer jahow. I am already using the latest Exporter (1.5). The Cube is contained in the resulting .babylon file. I think I've found the issue. The Empty objects have their "isEnabled" property not being set to true. Enabling them solves the issue. I'll make a PR to Babylon to start a discussion about this on Github. Edit: https://github.com/BabylonJS/Babylon.js/pull/354 Quote Link to comment Share on other sites More sharing options...
gryff Posted January 9, 2015 Share Posted January 9, 2015 n26 : I've experienced that too. With a cube parented to an empty here is what I get for the meshes:"meshes":[{"name":"Empty","id":"Empty","position":[0,0,0],"rotation":[0,0,0],"scaling":[1,1,1],"isVisible":false,"checkCollisions":false,"billboardMode":0,"receiveShadows":false},{"name":"Cube","id":"Cube","parentId":"Empty","materialId":"emptyw72.Material","billboardMode":0,"position":[2,0,0],"rotation":[0,0,0],"scaling":[1,1,1],"isVisible":true,"isEnabled":true,"useFlatShading":false,"checkCollisions":false,"receiveShadows":false,"positions":[1,-1,-1,-1,-1,-1,-1,-1,1,-1,1,1,-1,1,-1,1,1,-1,1,-1,1,1,1,1],"normals":[0.5773,-0.5773,-0.5773,-0.5773,-0.5773,-0.5773,-0.5773,-0.5773,0.5773,-0.5773,0.5773,0.5773,-0.5773,0.5773,-0.5773,0.5773,0.5773,-0.5773,0.5773,-0.5773,0.5773,0.5773,0.5773,0.5773],"indices":[0,1,2,3,4,5,6,7,5,0,5,4,4,3,2,6,2,3,6,0,2,7,3,5,0,6,5,1,0,4,1,4,2,7,6,3],"subMeshes":[{"materialIndex":0,"verticesStart":0,"verticesCount":8,"indexStart":0,"indexCount":36}],"instances":[]}],And I don't see the cube. However, if i add manually "isEnabled':true,"meshes":[{"name":"Empty","id":"Empty","position":[0,0,0],"rotation":[0,0,0],"scaling":[1,1,1],"isVisible":false,"isEnabled":true,"checkCollisions":false,"billboardMode":0,"receiveShadows":false},{"name":"Cube","id":"Cube","parentId":"Empty","materialId":"emptyw72.Material","billboardMode":0,"position":[2,0,0],"rotation":[0,0,0],"scaling":[1,1,1],"isVisible":true,"isEnabled":true,"useFlatShading":false,"checkCollisions":false,"receiveShadows":false,"positions":[1,-1,-1,-1,-1,-1,-1,-1,1,-1,1,1,-1,1,-1,1,1,-1,1,-1,1,1,1,1],"normals":[0.5773,-0.5773,-0.5773,-0.5773,-0.5773,-0.5773,-0.5773,-0.5773,0.5773,-0.5773,0.5773,0.5773,-0.5773,0.5773,-0.5773,0.5773,0.5773,-0.5773,0.5773,-0.5773,0.5773,0.5773,0.5773,0.5773],"indices":[0,1,2,3,4,5,6,7,5,0,5,4,4,3,2,6,2,3,6,0,2,7,3,5,0,6,5,1,0,4,1,4,2,7,6,3],"subMeshes":[{"materialIndex":0,"verticesStart":0,"verticesCount":8,"indexStart":0,"indexCount":36}],"instances":[]}],It works fine. It would be nice to have a check box in the exporter to enable the empty. cheers, gryff Quote Link to comment Share on other sites More sharing options...
gryff Posted January 9, 2015 Share Posted January 9, 2015 I see Jeff(?) did an update to the Blender exporter - Empties work fine now Would have been useful when I was laying out all those trees in my Christmas Village scene - the scene outline became awkward with dozens of entries. cheers, gryff Quote Link to comment Share on other sites More sharing options...
JCPalmer Posted January 9, 2015 Share Posted January 9, 2015 Someone, I think the thread owner, updated the exporter. Too bad they forgot to update the version #. Wish David would have rejected the pull request until it was set to 1.5.1 Quote Link to comment Share on other sites More sharing options...
GameMonetize Posted January 9, 2015 Share Posted January 9, 2015 Will fix it Quote Link to comment Share on other sites More sharing options...
JCPalmer Posted January 10, 2015 Share Posted January 10, 2015 Thanks. I do have a version 1.6 already coded, but all it had new was those new VR cameras, that most people do not even know exist yet. Was holding off PR'ing while I considered exporting text object. Have since abandoned that in favor of a font / sign generator .blend. Also waiting due to major changes coming for Tower of Babel 2.0. With the new BABYLON.Mesh constructor can now have computer built, Module level, Mesh subclass factories. Coupled with app stores, where download is already pre-done, you can really pull off complex things much more easily that you can being stuck with only loading a BABYLON.Mesh. 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.