This is a read-only snapshot of the ComputerCraft forums, taken in April 2020.
pokemonmegaman's profile picture

AutoBuilder - Automatically build 3D models in game!

Started by pokemonmegaman, 25 July 2012 - 07:55 AM
pokemonmegaman #1
Posted 25 July 2012 - 09:55 AM
UPDATE 11/5/2012: Haven't worked on this project in a while, fixed some dependency issues with some of the tools, the program may no longer work with the latest version of CC, sorry if it does not work for you (it's tested on Tekkit, but I will see if I get some time to update it for the other versions of CC).

Before I start, enormous thanks to Binvox (http://www.cs.prince...du/~min/binvox/) for their incredibly helpful program.

AutoBuilder automatically takes any Binvox supported 3D model (OBJ, OFF, DXF, PLY, VRML, or STL) and builds it in Minecraft. Because the turtle uses lots of resources, it will return to the ground every time it needs to refill.

Usage guide:
Spoiler1. Extract the files in the .zip folder.
2. Move the AutoBuild file to your turtle's programs(or the …modsComputerCraftluaromprogramsturtle folder.)
3. Insert the 3D model of your choice into the folder with binvox.exe.
4. Open up a command line and navigate to the folder you extracted the files to.
5. Run binvox like so: binvox -down -down -down -down <model name> (the four downs aren't neccecary, but they make the model so that it isn't too big.)
6. Once binvox finishes running, open the folder you extracted all of the files to and drag and drop the .binvox file of your 3D model onto viewvox.exe. You will see a 3D model of what the finished product will look like. If you don't like how it looks, or it appears to be too big, try running binvox with different launch parameters (an excelent guide to using binvox is avalible here: http://www.minecraft...Binvox#Tutorial)
7. Once you have got a good looking model, drag and drop the .binvox file onto read_binvox.exe. This will generate a text file called voxels.txt.
8. Drag and drop the voxels.txt file into the folder of the turtle you want the program to run on.
9. Completely fill the turtle with the building material of choice. Make sure to fill the last slot on the turtle (this is the slot that the program checks to see when it is empty).
10. Step behind your turtle and run the program. As long as the turtle does not collide with any object and can move freely, it will create a copy of your 3D model in Minecraft!

It's still a beta program, so feel free to edit the code if you think you could make it faster. You are free to redistribute this as long as you credit both me (pokemonmegaman) and Binvox for their work.

Also, here is a tutorial video (skip to 7:39 if you just want to see a time lapse build):


Results:
SpoilerOriginal model:
http://i.imgur.com/fyiPV.png

Minecraft build and binvox model:
http://i.imgur.com/KPxOv.jpg

Roughly 1 hour to build, made in the air so no obstructions. Refilled with wood once.

Download: http://www.mediafire.com/?3rw7o7904eg73ak

Thanks for checking out my program!
Noodle #2
Posted 25 July 2012 - 10:03 AM
Woah, dude, THIS IS AWESOME.
Haven't found any bugs yet.
pokemonmegaman #3
Posted 25 July 2012 - 08:19 PM
Thanks! I'll probably update the code so that it can return to a chest to refill when it needs to (to completely automate the process), as well as mob detection so that it doesn't move until the way is clear.
KingMachine #4
Posted 26 July 2012 - 06:56 AM
Why is the propeller backwards?
pokemonmegaman #5
Posted 26 July 2012 - 11:28 AM
Why is the propeller backwards?

That was an earlier version of the program. I corrected that problem by mirroring the movement of the turtle. It no longer is backwards.
KingMachine #6
Posted 26 July 2012 - 01:55 PM
Why is the propeller backwards?

That was an earlier version of the program. I corrected that problem by mirroring the movement of the turtle. It no longer is backwards.
Excellent, congratz on your success.
Noodle #7
Posted 26 July 2012 - 03:56 PM
Nice video, The music a bit much though.. (Still was good)
Mlmiii #8
Posted 01 August 2012 - 07:22 PM
ALL MY YES.

This will make replicating Kiershar's mob grinders in SSP so much easier.

Well, it would if I would bother to learn how to run the modeling program. Oh well, still bookmarking this.
Tiin57 #9
Posted 01 August 2012 - 09:24 PM
This receives all of my most excellent pies and cookies. Along with two full jaffa cakes and a Notch and a half.
ookami125 #10
Posted 03 August 2012 - 03:53 PM
Well, I took a look at your Lua program and the way I normally am thought I could make a faster one well… I kinda did… kinda didn't because I have to solve one more problem with my script, but when I do have it done could I post it here that is all that I'm asking?
pokemonmegaman #11
Posted 06 August 2012 - 02:01 AM
Well, I took a look at your Lua program and the way I normally am thought I could make a faster one well… I kinda did… kinda didn't because I have to solve one more problem with my script, but when I do have it done could I post it here that is all that I'm asking?
Absolutely! I'm still learning lua myself, so if you have a faster script, please do post it. I'd love to see what you did.
KingMachine #12
Posted 06 August 2012 - 03:37 AM
I'm still learning lua myself

Even if you know lua by heart and have been coding with it for literally millions of years, you would still be learning lua.
You are enlightened.
pokemonmegaman #13
Posted 05 November 2012 - 11:59 PM
Some people were saying they were having dependency issues (missing DLLs), they should be fixed now. Also, I haven't played around with CC or this script for a long time (school and what not) so it may not work with the latest version of CC (however, it still works on the Tekkit version).

Will try to update it in the future, as well as optimize the code…
zzvenuszz #14
Posted 09 October 2016 - 08:05 PM
UPDATE 11/5/2012: Haven't worked on this project in a while, fixed some dependency issues with some of the tools, the program may no longer work with the latest version of CC, sorry if it does not work for you (it's tested on Tekkit, but I will see if I get some time to update it for the other versions of CC).

Before I start, enormous thanks to Binvox (http://www.cs.prince...du/~min/binvox/) for their incredibly helpful program.

AutoBuilder automatically takes any Binvox supported 3D model (OBJ, OFF, DXF, PLY, VRML, or STL) and builds it in Minecraft. Because the turtle uses lots of resources, it will return to the ground every time it needs to refill.

Usage guide:
Spoiler1. Extract the files in the .zip folder.
2. Move the AutoBuild file to your turtle's programs(or the …modsComputerCraftluaromprogramsturtle folder.)
3. Insert the 3D model of your choice into the folder with binvox.exe.
4. Open up a command line and navigate to the folder you extracted the files to.
5. Run binvox like so: binvox -down -down -down -down <model name> (the four downs aren't neccecary, but they make the model so that it isn't too big.)
6. Once binvox finishes running, open the folder you extracted all of the files to and drag and drop the .binvox file of your 3D model onto viewvox.exe. You will see a 3D model of what the finished product will look like. If you don't like how it looks, or it appears to be too big, try running binvox with different launch parameters (an excelent guide to using binvox is avalible here: http://www.minecraft...Binvox#Tutorial)
7. Once you have got a good looking model, drag and drop the .binvox file onto read_binvox.exe. This will generate a text file called voxels.txt.
8. Drag and drop the voxels.txt file into the folder of the turtle you want the program to run on.
9. Completely fill the turtle with the building material of choice. Make sure to fill the last slot on the turtle (this is the slot that the program checks to see when it is empty).
10. Step behind your turtle and run the program. As long as the turtle does not collide with any object and can move freely, it will create a copy of your 3D model in Minecraft!

It's still a beta program, so feel free to edit the code if you think you could make it faster. You are free to redistribute this as long as you credit both me (pokemonmegaman) and Binvox for their work.

Also, here is a tutorial video (skip to 7:39 if you just want to see a time lapse build):


Results:
SpoilerOriginal model:
http://i.imgur.com/fyiPV.png

Minecraft build and binvox model:
http://i.imgur.com/KPxOv.jpg

Roughly 1 hour to build, made in the air so no obstructions. Refilled with wood once.

Download: http://www.mediafire...3rw7o7904eg73ak

Thanks for checking out my program!

I keep getting error: AutoBuild:21: attempt to index ? (A nil value)
How can I fix that?
TheRockettek #15
Posted 10 October 2016 - 07:42 AM
UPDATE 11/5/2012: Haven't worked on this project in a while, fixed some dependency issues with some of the tools, the program may no longer work with the latest version of CC, sorry if it does not work for you (it's tested on Tekkit, but I will see if I get some time to update it for the other versions of CC).
Before I start, enormous thanks to Binvox (http://www.cs.prince...du/~min/binvox/) for their incredibly helpful program.
AutoBuilder automatically takes any Binvox supported 3D model (OBJ, OFF, DXF, PLY, VRML, or STL) and builds it in Minecraft. Because the turtle uses lots of resources, it will return to the ground every time it needs to refill.
Usage guide:
Spoiler1. Extract the files in the .zip folder.
2. Move the AutoBuild file to your turtle's programs(or the …modsComputerCraftluaromprogramsturtle folder.)
3. Insert the 3D model of your choice into the folder with binvox.exe.
4. Open up a command line and navigate to the folder you extracted the files to.
5. Run binvox like so: binvox -down -down -down -down <model name> (the four downs aren't neccecary, but they make the model so that it isn't too big.)
6. Once binvox finishes running, open the folder you extracted all of the files to and drag and drop the .binvox file of your 3D model onto viewvox.exe. You will see a 3D model of what the finished product will look like. If you don't like how it looks, or it appears to be too big, try running binvox with different launch parameters (an excelent guide to using binvox is avalible here: http://www.minecraft...Binvox#Tutorial)
7. Once you have got a good looking model, drag and drop the .binvox file onto read_binvox.exe. This will generate a text file called voxels.txt.
8. Drag and drop the voxels.txt file into the folder of the turtle you want the program to run on.
9. Completely fill the turtle with the building material of choice. Make sure to fill the last slot on the turtle (this is the slot that the program checks to see when it is empty).
10. Step behind your turtle and run the program. As long as the turtle does not collide with any object and can move freely, it will create a copy of your 3D model in Minecraft!
It's still a beta program, so feel free to edit the code if you think you could make it faster. You are free to redistribute this as long as you credit both me (pokemonmegaman) and Binvox for their work.
Also, here is a tutorial video (skip to 7:39 if you just want to see a time lapse build):
Results:
SpoilerOriginal model:
http://i.imgur.com/fyiPV.png
Minecraft build and binvox model:
http://i.imgur.com/KPxOv.jpg
Roughly 1 hour to build, made in the air so no obstructions. Refilled with wood once.
Download: http://www.mediafire...3rw7o7904eg73ak
Thanks for checking out my program!
I keep getting error: AutoBuild:21: attempt to index ? (A nil value)
How can I fix that?

voxels.txt is missing
H4X0RZ #16
Posted 10 October 2016 - 12:42 PM
UPDATE 11/5/2012: Haven't worked on this project in a while, fixed some dependency issues with some of the tools, the program may no longer work with the latest version of CC, sorry if it does not work for you (it's tested on Tekkit, but I will see if I get some time to update it for the other versions of CC).

Before I start, enormous thanks to Binvox (http://www.cs.prince...du/~min/binvox/) for their incredibly helpful program.

AutoBuilder automatically takes any Binvox supported 3D model (OBJ, OFF, DXF, PLY, VRML, or STL) and builds it in Minecraft. Because the turtle uses lots of resources, it will return to the ground every time it needs to refill.

Usage guide:
Spoiler1. Extract the files in the .zip folder.
2. Move the AutoBuild file to your turtle's programs(or the …modsComputerCraftluaromprogramsturtle folder.)
3. Insert the 3D model of your choice into the folder with binvox.exe.
4. Open up a command line and navigate to the folder you extracted the files to.
5. Run binvox like so: binvox -down -down -down -down <model name> (the four downs aren't neccecary, but they make the model so that it isn't too big.)
6. Once binvox finishes running, open the folder you extracted all of the files to and drag and drop the .binvox file of your 3D model onto viewvox.exe. You will see a 3D model of what the finished product will look like. If you don't like how it looks, or it appears to be too big, try running binvox with different launch parameters (an excelent guide to using binvox is avalible here: http://www.minecraft...Binvox#Tutorial)
7. Once you have got a good looking model, drag and drop the .binvox file onto read_binvox.exe. This will generate a text file called voxels.txt.
8. Drag and drop the voxels.txt file into the folder of the turtle you want the program to run on.
9. Completely fill the turtle with the building material of choice. Make sure to fill the last slot on the turtle (this is the slot that the program checks to see when it is empty).
10. Step behind your turtle and run the program. As long as the turtle does not collide with any object and can move freely, it will create a copy of your 3D model in Minecraft!

It's still a beta program, so feel free to edit the code if you think you could make it faster. You are free to redistribute this as long as you credit both me (pokemonmegaman) and Binvox for their work.

Also, here is a tutorial video (skip to 7:39 if you just want to see a time lapse build):


Results:
SpoilerOriginal model:
http://i.imgur.com/fyiPV.png

Minecraft build and binvox model:
http://i.imgur.com/KPxOv.jpg

Roughly 1 hour to build, made in the air so no obstructions. Refilled with wood once.

Download: http://www.mediafire...3rw7o7904eg73ak

Thanks for checking out my program!

I keep getting error: AutoBuild:21: attempt to index ? (A nil value)
How can I fix that?

Well… 4 years ago it was already outdated so, unless OP is still interested in this and is still active, you should give up on using this. Or you search for a new maintainer.
Edited on 10 October 2016 - 10:43 AM