Hi,
I was wondering if it is possible somehow to create a simple brick creation and then save its data about blocks used and position/rotation.
For example to know
Brick 3004 in color 21 at X0 Y0 Z4 with rotation X0 Y0 Z0
Brick 3004 in color 226 at X16 Y0 Z4 with rotation X0 Y0 Z0
Brick 3004 in color 21 at X28 Y0 Z-4 with rotation X0 Y90 Z0
Or something alike.
Currently mecabrick exports collada (dae), obj and zmbx, but as far as I know these are all formats containing the complete geometry of each and every brick (vertices, poly's, ....) .
I read a post from Scrubs (I believe he is the maker of mecabricks) and there was a suggestion to try this line through the javascrips console.
JSON.stringify(GBLMenubar.toJSON(GBLScene.main))
But unfortunately it looks like this piece of code is not executing correctly because GBLMenubar is reported to be not defined.
I really hope that there is some kind of way to know the model as a hierarchy (list) where you et to know the numbers of the parts, their material, position and rotation
The models I would create are not meant to be rendered out with blender, but are meant to be used in a VR setup. Therefor I would then use Mecabricks to edit/create a model, but the real model to be displayed in VR would then be calculated based on the list generated. With clever preprocessing a lot of invisible geometry can be left out and make realtime VR easier on the hardware. Of course the final render quality will not be the same as a blender cycles render with near photo quality 😃
So is there a way to export my model in such a way (even if it is only a javascript trick) and get "some kind of" list with bricks, positions, rotations, ... ?
Kind regards,
Bart Libert
I'm not sure if this would be possible at this moment. The mecabricks file format contains rotations and positions, but the saved brick references are Mecabricks brick references.
With 2 Brick 1x4's next to eachother in Brick Yellow, the format looks like this:
{"list":{"0":{"0":[1,2],"1":"scene"},"1":{"1":"part","2":185,"3":[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1],"4":true,"5":480,"6":[5],"7":0},"2":{"1":"part","2":185,"3":[1,0,0,0,0,1,0,0,0,0,1,0,0,0,-8,1],"4":true,"5":362,"6":[5],"7":0}},"keys":["children","type","id","matrix","visible","objectIndex","color","parent"]}
LEGO, the LEGO logo, the Minifigure, and the Brick and Knob configurations are trademarks of the LEGO Group of Companies. ©2024 The LEGO Group.
Mecabricks, the Mecabricks logo and all content not covered by The LEGO Group's copyright is, unless otherwise stated, ©2011-2024 Mecabricks.