Jump to content

Meshes grouped with an Empty Object do not show up


n26
 Share

Recommended Posts

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?

Link to comment
Share on other sites

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

Link to comment
Share on other sites

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 :)

Link to comment
Share on other sites

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 :)

Link to comment
Share on other sites

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.

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