Blender script to reconstruct a map mesh from it's list of blocks
This script requires data from three external other tools:
The map block exporter plugin is an Openplanet plugin which outputs a json object containing all the block informations for a given map.
Here is what the array looks like:
{
"nadeoBlocks": [
{
"name": "RoadTechDiagRightStartCurve1In",
"pos": [ 784, 12, 848 ],
"dir": 0,
"blockOffsets": [
[ 0, 0, 0 ],
[ 1, 0, 0 ],
[ 1, 0, 1 ],
[ 0, 0, 1 ]
]
},
{...}
],
"freeModeBlocks": [ ],
"anchoredObjects": [ ]
}
The Nadeo block item exporter is an Openplanet plugin which scraps all available Nadeo blocks ingame and exports it as .Item.Gbx files (required to then extract the 3D mesh for those blocks)
Gbx2Obj is a .net program that goes through the exported .Item.Gbx blocks and converts it in 3D .obj mesh
This blender script will ask you to enter the absolute path of the map json file (generated with the map block exporter plugin)
Once all the block informations about the map is loaded, it will then ask you to give the root folder where all the Block 3D mesh are located.
It will then go through all the blocks, and place it on the scene.