Kreeba Posted July 30, 2017 Share Posted July 30, 2017 Hi. I am sure this is a quick question, but I can't seem to find the answer anywhere. I come from a Blitz3D background and in that engine we had 3D objects called 'Pivots'. They were basically the Position, Rotation and Scaling functionality of a full Mesh but without any Mesh data. They were used to be empty placeholders/parents of groups, anything a 3D object can do, but just didn't render anything. I think Blender calls them 'Empty's and Maya calls them 'Helper's Does the concept exist in Babylon, if so what are they called/how do I make them? Or do I create a Mesh without any vertex/face data? Quote Link to comment Share on other sites More sharing options...
gryff Posted July 30, 2017 Share Posted July 30, 2017 @Kreeba: Blender is capable of exporting "empties" . See part of the code below. Three cubes were created then an empty and the cubes then parented to the empty.The code below is is just a little part of the .babylon file produced on export from Blender. Note how the mesh named "Empty" has no data for positions etc. "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,"tags":""} , {"name":"Cube.002","id":"Cube.002","parentId":"Empty","billboardMode":0,"position":[-3.5553,0,3.3553],"rotation":[0,0,0],"scaling":[1,1,1],"isVisible":true,"freezeWorldMatrix":false,"isEnabled":true,"checkCollisions":false,"receiveShadows":false,"tags":"" ,"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,1,5,6,4,7,2,6,1,4,6,3,0,7,7,0,2,0,3,1,3,5,4,5,7,6,2,1,6,5,3,7] ,"subMeshes":[{"materialIndex":0,"verticesStart":0,"verticesCount":8,"indexStart":0,"indexCount":36}] ,"instances":[]} ... ], I use them as a way to show/hide/disable the meshes that are children of the empty (and to simplify the Properties Panel in Blender). Sorry if you are looking for a coding only method - but I'm sure others can help. cheers, gryff Quote Link to comment Share on other sites More sharing options...
JohnK Posted July 30, 2017 Share Posted July 30, 2017 mypivot = new BABYLON.Mesh("name",scene); mymesh.parent = mypivot; See also http://babylonjsguide.github.io/advanced/Pivot Quote Link to comment Share on other sites More sharing options...
Kreeba Posted July 31, 2017 Author Share Posted July 31, 2017 Thanks. Marked as solved 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.