Empire State Building |
View from "Top of the Rock" |
I found a Google sketchup model of Manhattan and using OBJexporter, exported the model to an OBJ file.
Sketchup 3d model of Manhattan |
To give a scale of how massive this model is, previously the most complicated model I had produced in Minecraft was of a girls head, that took about 3 minutes to render, this took 1 hour 25 minutes, and that was after I had already cleared a suitably large area! The Pi took it all in its stride though and while it took a long time, there were no errors or glitches.
The model is pre 9/11, so the iconic Twin Towers still dominate the skyline.
Iconic buildings |
I have updated my program to include the new york model, which you can download direct from git-hub, so run minecraft, open/create a world and follow the instructions:
sudo apt-get install git-core
cd ~
git clone https://github.com/martinohanlon/minecraft-renderObj.git
cd minecraft-renderObj
python minecraft-renderObj.py
cd ~
git clone https://github.com/martinohanlon/minecraft-renderObj.git
cd minecraft-renderObj
python minecraft-renderObj.py
If you want to know more about how this works and have a go yourself, head to this post, http://www.stuffaboutcode.com/2013/03/minecraft-pi-edition-create-massive-3d.html.
Hey, I get this error when running the v2 program on RPI:
ReplyDelete2016-01-17 00:39:46.632447
obj file loaded
Traceback (most recent call last):
File "/home/pi/minecraft-renderObj-master/minecraft-renderObjv2.py", line 422, in
mcDrawing.drawFace(faceVertices, materials[faceCount][0], materials[faceCount][1])
File "/home/pi/minecraft-renderObj-master/minecraft-renderObjv2.py", line 57, in drawFace
self.drawLine(lastVertex.x, lastVertex.y, lastVertex.z, vertex.x, vertex.y, vertex.z, blockType, blockData)
File "/home/pi/minecraft-renderObj-master/minecraft-renderObjv2.py", line 69, in drawLine
self.drawVertices(self.getLine(x1, y1, z1, x2, y2, z2), blockType, blockData)
File "/home/pi/minecraft-renderObj-master/minecraft-renderObjv2.py", line 65, in drawVertices
self.drawPoint3d(vertex.x, vertex.y, vertex.z, blockType, blockData)
File "/home/pi/minecraft-renderObj-master/minecraft-renderObjv2.py", line 21, in drawPoint3d
self.mc.setBlock(x,y,z,blockType,blockData)
File "/usr/lib/python2.7/dist-packages/mcpi/minecraft.py", line 138, in setBlock
self.conn.send("world.setBlock", intFloor(args))
File "/usr/lib/python2.7/dist-packages/mcpi/minecraft.py", line 22, in intFloor
return [int(math.floor(x)) for x in flatten(args)]
TypeError: a float is required
I converted the minecraft into mcpi
When I wrote this I was using an earlier version of the api, which is in the 'minecraft' directory. By converting it to mcpi, you are using a later version which isnt compatible with the program.
Delete