Minecraft, Blender, and mcobj

If you want to make images of your Minecraft world like this, this, these, or these, you have come to the right place.

This tutorial is aimed at *nix  (linux, mac, etc.) systems workflows, mainly because those are the systems I have. I will include windows instructions, but they aren’t tested, or are tested less than the *nix instructions. Luckily, the differences shouldn’t be too great.

Requirements

  • A good computer. You need a computer capable of playing video games which are more demanding than Minecraft, and you basically require an actual graphics card.
  • A modern operating system. I’m uncertain as to the precise requirements, but any modern linux distro, Mac OS X Tiger, and probably a windows version as old as XP will work just fine.
  • Minecraft. For targeting the render. A mapping program would also work.
  • InvGrid (or similar)
  • Blender, at least version 2.5 or greater.
  • mcobj, and mcobj-gui. I’ll cover installation in the tutorial.

Overview

Workflow:

  1. Find target.
  2. Convert world to .obj with mcobj and mcobj-gui
  3. Import .obj into Blender.
  4. Adjust render in Blender.
  5. Render with Blender and export.

Targeting

If you have an absolute beast of a computer, and a fairly small world, you can skip this section.

Due to hardware limitations (my computer can’t handle more than a few million vertices in Blender for editing), we frequently can’t convert the entire map to .obj. When you convert a world to .obj, the size increases. I have not had time to study carefully this relationship, but I know that if your world is about 100 megs, the resulting .obj file will be 2.5 gigs, and unless you have  a beast of a machine, you can’t import .obj files that large into Blender (at least, I can’t.)

Therefor, we must take advantage of mcobj’s ability to constrict the portions of the map it uses. First, you need to find, either in Minecraft using F3, or using another mapping program, the coordinates of your target. You need the x and the z coordinates. Note that these are block coordinates. Next, you need to find out whether your target will be contained by a 40 chunk sized square around your target. You can basically assume that 40 will work, but for larger creations, you may need to increase this number. You have now determined everything you need to know to target and restrict your render.

Note that if you want to render the area around your spawn, you may need something like InvGrid to determine the coordinates, because minecraft does not spawn you at 0,0.

Installing mcobj and mcobj-gui

The linchpin of this entire operation is mcobj and, to a lesser extent, mcobj-gui. Step one is to make sure you can extract 7zip files.

On Ubuntu (and perhaps Debian)

sudo apt-get install p7zip

For Windows: Download and install from here.

Mac: While I haven’t tested, this seems to claim to work.

Next, download mcobj from here. Unzip. You should now have a small executable called mcobj. Remember where you unzipped this, it will be important.

Next, download mcobj-gui from here. It should also produce an executable. Remember where you unzip this executable as well.

Converting the world

Now you have all the tools you need (assuming you already have Blender installed. See blender.org for installation instructions.)

Now, launch mcobj-gui. You will see a window pop up with lots of different controls. On the left side, you can see the file selector for the save file to process, the output .obj file, and the location of mcobj. On the other side, you can see other, mcobj specific controls, and on the bottom left, there are some options.

Step 1 is to let mcobj-gui know where mcobj is. Find, in this window, the file selector for “mcobj location”, which at this point should be “(unknown)”, click the select button, and navigate to the mcobj executable. Next, use the top file selector (labeled “Save file to process”), click select, and navigate to the save file you want to render. Search around and see if you can find the save location for your platform. On linux, it’s ~/.minecraft/saves, and on mac is in ~/Library/Application Support/minecraft/saves, and in Windows, it has something to do with %AppData%. Google will be enlightening at this juncture. Finally, you will want to tell mcobj-gui where to save the .obj file. They suggest a location, but you may want to change that. Remember that it should end it .obj, and that mcobj will produce 2 files, a .obj and a .mtl file, and they need to be kept together.

Next, you will want to take the block coordinates from the targeting section, divide by 16 (as instructed by mcobj-gui (this is because Minecraft’s F3 location finder works in block coordinates, while mcobj and mcobj-gui works in chunk coordinates)), and set the “Center of Chunk” fields to those numbers. Next, set size of chunk to 40, though if you need some other number for this flag, use it here. Determining size of chunk is beyond the scope of this tutorial. You also need to consider whether or not you need the blocks below sea level to be in this render. If you are render a surface creation (like a tower, city, etc.) that isn’t below sea level, you can happily set “Omit blocks below” to 50. Note that I use 50 because if you use 63, as mcobj-gui suggests, if you have any water at sea level, you won’t get to see the bottom of that lake, or it will get cut off mid lake, and it will look strange. If you are making a render of a giant pit, or something underground, you can’t set this option.

Take a quick look over all your options, and make sure you have them all set correctly. Then click process. Watch the progress bar fill, or do something else, because this can take a while. You should try to remember where you saved the .obj file. If you need to move the .obj file, make sure you move the .mtl along with the .obj file.

Working in Blender

At this point, proficiency in Blender becomes important, because if you need anything strange in mcobj, the strangeness will be carried over into Blender (to a certain extent.)

A full tutorial in Blender is beyond the scope of this tutorial, though I heartily suggest Blender: Noob to Pro for learning at least the basics of Blender. They will come in handy later in this tutorial.

Launch Blender. Once Blender has launched, click to clear the pop up of a Chameleon (or similar) and move your mouse into the 3D view (the one with the cube floating in space.) Hit x, don’t move your mouse, and click. This will delete the cube. We don’t need it. Hit 7 on your key pad to move to an overhead view. Hit the space bar, and type “import obj”, then hit enter. A file selection box should replace the 3D view. Find the .obj file mcobj produced, select it, and hit import. This will take a while (roughly proportional to the size of the chunk of the world you converted.)

At this point we face a problem. If you targeted an area of your world more than about 50 chunks away from 0,0, you won’t be able to see anything. Zoom out, and you should quickly be able to see your terrain. If your terrain isn’t in the center of the Blender screen, hover your house over the center of the terrain, hit g, then move your mouse to the center of the 3D screen, and click. The terrain should move with your mouse.

Next, hit 0 on your numpad. This will move your view to the camera view. Camera manipulation is complex, but if you select the camera, and hit g, you can roughly pan around. However, getting a good angle will require more manipulation than that, and that’s where Blender: Noob to Pro comes in handy.

Next, look to the right side bar. You should see an incredibly complex and obtuse panel of settings. Don’t try to understand these, just observe the row of icons running along the almost top, starting with a camera. You should see a little blue sphere. Click it, then look down to the panel and find “Ambient Occlusion”, and click the checkbox next to it. Then click on the littler camera in the row of icons. Click the button that says “Image”, or hit F12 (assuming nothing else on your computer is using F12) to render. The 3d view should be replaced with a grey grid that, after a while, will turn black, then start filling with the render. When it is done, look over the image, then hit ESC. If you weren’t happy with the image, adjust it, then render again. Repeat until you are happy with your render.

When you are happy with your render, return to the 3D view, and look over to the panel with the row of icons. Ensure the camera is selected. Look down until you see a little arrow followed by “Dimensions.” Below that, you should see 2 fields below “Resolution”. One should be labeled X, and the other Y, and in my case, they are set to x = 1920, while y = 1080. You want your image to look really good, while maintaining the same aspect ratio. Click on 1920, replace it with 7111, click on 1080, replace it with 4000. Render again. This will take longer. Finally, you should have a very large render of your world. When it is finished rendering, hit F3. Another file selection box should replace the render, but instead of finding your .obj file, you are instead saving the render. Navigate to your desired location, type in a name (make sure you keep the .png at the end of it) and hit Save.

You have successfully render and saved out your mcobj render. Congratulations.

About these ads
  1. Hint: Linux isn’t fully POSIX compliant, yet Windows is.
    Perhaps you mean *NIX :P

    • Auquilius
    • May 31st, 2011

    I can’t download mcobj. The link won’t take me anywhere.

  2. when i click process nothing happens. i have correctly located mcjob and the save file and found the right coordinates…what could i be doing wrong? i’m on mac os

    • Can you tell me what size the mcobj executable is? One of the OSX downloads for mcobj has been broken, and it’s possible you downloaded that one.

  3. it’s 1.9 mb

    • Then perhaps you could post it to a service like pastebin? It’s basically impossible for me to debug your problem without more information, and these logs would provide that information.

        • Will
        • July 26th, 2011

        I have the same problem as Ian. If you figure out how to help him, tell me :()

    • Wally
    • July 27th, 2011

    How do you render the entire map and not just a portion of it?

    • Do not set any constraints on the rendering area.

        • jonathan
        • June 23rd, 2012

        hey, have a specific error you may be able to help with bro. When i go to process, it goes through the process of converting and doesn’t do it. I looked into the process section and it showed the list of attempts at conversion and found that it is searching for:
        /SG1/region/r.-7.-2.mcr: no such file or directory

        while in my region files I see that they are formatted as:

        r.-7.-2.mca

        which would explain why it doesn’t see the files. Help :(

      • It looks like you need a new version of mcobj. That, or you need to load this world in Minecraft and let it do some map conversion. Looks like mcobj is working with a different Minecraft map version than the map is in.

    • Angmare
    • July 27th, 2011

    Hello ! I’m french thus my level in english isn’t very high.
    Why my progress bar doesn’t move ?

    Thanks.

  4. To anyone having issues: My bar wouldn’t fill with the files downloaded from this post. I am running a mac with the lion OS. All I had to do was download a different mcobj executable file. you can find the one that works for you on the right of this page.

    http://www.reddit.com/r/mcobj

    Hope it helps!

      • Daedalus
      • September 6th, 2011

      That doesn’t seem to help anything. The file I had was nothing different than that one. I’ve tried all available os x downloads of mcobj, but nothing works, so I’m guessing the problem actually lies in mcobj-gui. I hate Terminal and I can never get anything to work in there, so I cannot try if mcobj alone works.

    • ZombieZebra
    • August 17th, 2011

    I’ve set the amount of chunks to be converted to .obj to 10, yet McObj still generates my entire world, causing it to be around 900MB in size. Why? What can I do to prevent this?

    • I’m not entirely sure why that isn’t working, but it might be that you are instead telling mcobj to convert a 100 chunk square (10 chunks on each side.) Instead of just 10 chunks. Try restricting the chunks in a different way.

    • eintein
    • August 17th, 2011

    Hahaha. You used a serial comma in the title. Wtfff.

    • ZombieZebra
    • August 18th, 2011

    Okay, I got the thing to work by just using a .bat file from someone on YouTube, but now I can’t get McObj to work in another fashion.

    I want to convert a negative chunk (x=-1296), but if I type “-x -1296 -z 68″ or “-cx -81 -z 5″, McObj doesn’t visibly do anything and I end up with a 1 KB .obj file.

    • Are you sure you aren’t restricting the render area in some other, and are you sure you are using the correct world?

        • ZombieZebra
        • August 18th, 2011

        I’m absolutely sure I’m using the correct world.

        Here’s the entire .bat file:
        “mcobj -cpu 4 -x=1296 -z=68 -s 20 -o world2.obj %AppData%\.minecraft\saves\World2
        pause”

        Now, that one works, I just want to use x-coordinate -1296 instead of 1296. Though when I just put a minus-sign in front of the 1296, nothing happens in McObj, it just says ‘press any key to continue’ and I’m stuck with a 1KB .obj file that doesn’t contain anything.

      • What happens when you remove the the equals sign like so: “mcobj -cpu 4 -x -1296 -z 68 -s 20 -o world2.obj %AppData%\.minecraft\saves\World2

    • ZombieZebra
    • August 18th, 2011

    Doesn’t change anything.

    • Ed
    • August 21st, 2011

    What if the center of the chunk I want to render is more than 30,000 blocks from center? The GUI limits the center of chunk to 2 digits which doesn’t let you go much further than 1500 blocks…please tell me I’m an idiot and missed something. Thanks

    • MCObj-Gui is just a wrapper around mcobj itself. If you need more digits, you should try running the command from the command line yourself. See “mcobj -h” for more information and the relevant command flags.

    • randosity
    • August 26th, 2011

    whenever I try this the bar gets maybe 10% or less through and stops, then the process uses a constant 17% of my cpu and just sits there. eventually after maybe an hour it will say jump to being complete, but then there is no output file.

    • What does the log output say? Have you tried running an equivalent command from the command line?

    • hengyu
    • October 7th, 2011

    when i click process,the message log turns out like this.

    Starting with arguments: -cpu 2 -cx -22 -cz 4 -s 40 -y 61 -o F:/minecraft/saves for mcobj/a.obj C:/Documents and Settings/wgzhu/Application Data/.minecraft/saves/world of buildings

    mcobj 0.13.1 (cpu: 1) Copyright (c) 2011 Jonathan Wright

    Finished running.

    Is there something wrong? because the process button dosn’t work.

    ‘starting with arguments’ thats my key word

    • Beanwy
    • November 21st, 2011

    Hello!

    Hey I have a really dumb question but , when you say unzip mcobj , do I shrink it, Expand it, or go to the command thing from the view option.

    I would be very grateful
    thanks

    • Beanwy
    • November 21st, 2011

    I tried expanding it and using it in GUI but that didn’t work. I used view and I was able to punch in the correct code in the command line and it all loaded.

    Thank you very much Geeklob. All of this information was extremely helpful

  5. I am having a bit of trouble first it was not processing (left it for 8hrs nothing happened) so I adjusted the location of the mcobj file (from reading lots of posts about the problem) I was selecting the folder but now I’m going straight for the file (Unix Executable File) is that right? and is this right
    Application Support/minecraft/saves/World1 – its an older world (no natural sandstone) but I play it on 1.0.0, does any of that make a difference?… whats happening now its taking no time(about 0.1seconds) and its saying done.

    Starting with arguments: -cpu 2 -cx 15 -cz 1 -s 40 -o /Users/Main/Desktop/a.obj /Users/Main/Library/Application Support/minecraft/saves/World1

    mcobj 0.13.1 (cpu: 1) Copyright (c) 2011 Jonathan Wright

    Finished running.

    Computer
    Mac OS X
    Version 10.7.2
    Processor 2.26GHz Intel Core 2 Duo
    Memory 2 GB 1067 MHz DDR3

    • Your path to select the world might be the problem. I notice it has a space in it. This might be throwing mcobj off.

      Try:

      Starting with arguments: -cpu 2 -cx 15 -cz 1 -s 40 -o /Users/Main/Desktop/a.obj “/Users/Main/Library/Application Support/minecraft/saves/World1″

      and see if that works. It should output a list of chunks as they are converted.

      • I am using the wrapper, how would I change that?
        I think that space you see in here is just the next line, made a short video on what it is doing, if that helps…

  6. Pere250 :

    I am using the wrapper, how would I change that?
    I think that space you see in here is just the next line, made a short video on what it is doing, if that helps…
    [youtube http://www.youtube.com/watch?v=fxWuyc-Ix9A?version=3&rel=1&fs=1&showsearch=0&showinfo=1&iv_load_policy=1&wmode=transparent&w=510&h=317%5D

    I’m not sure. Try moving or copying the world to to your desktop. That should fix the problems.

    • Alright so I have moved the local user and the world, same thing.
      Starting with arguments: -cpu 2 -cx 15 -cz 1 -s 20 -o /Users/streetcop_1995/Desktop/a.obj /Users/streetcop_1995/Desktop/World1_copy

      mcobj 0.13.1 (cpu: 1) Copyright (c) 2011 Jonathan Wright

      Finished running.
      Should I try a windows computer?

      • You can try, that might help. Other than that, you can try installing a later version of mcobj.

  7. geeklob :
    You can try, that might help. Other than that, you can try installing a later version of mcobj.

    I have been trying to get it downloaded and such but Im rather really stupid or I can’t find the right things on the windows comp.

    • Harry
    • January 20th, 2012

    where can the mcobj – gue found cause the download dont work?

    • I changed the link to the downloads list. Hope this fixes things.

    • Sam
    • April 3rd, 2012

    Is there any way to make the textures more realistic?

    • Not really. This is Minecraft. You can tweak the textures once you’re in Blender though.

    • Hello19970
    • April 11th, 2012

    Whenever i hit process, it just opens up another window.

    • Hello19970
    • April 11th, 2012

    Hello19970 :
    Whenever i hit process, it just opens up another window.

    Disreguard the last one, but now i have a new problem

    mcobj will not open up as an exe after i extract it

  8. Excellent post. I absolutely appreciate this site.
    Stick with it!

  9. I’m excited to uncover this page. I wanted to thank you for ones time for this wonderful read!! I definitely liked every part of it and I have you saved as a favorite to look at new things in your blog.

  10. Hi, all the time i used to check web site posts here early in the morning, as i love
    to learn more and more.

  11. Your style is very unique compared to other folks I have read stuff from.

    Thanks for posting when you have the opportunity, Guess I will just bookmark this blog.

  12. Greetings! This is my first comment here so
    I just wanted to give a quick shout out and say I truly enjoy reading your articles.
    Can you recommend any other blogs/websites/forums that cover
    the same subjects? Thanks a lot!

  13. Can’t freakin get the mcobj.exe anywhere sheesh. Its not in those zips. Gui is fine, even have OLD mcobj.exe pre anvil all looking for mcr files and when i renamed them… at any rate, I’m not a fool here, I am on window and I cannot find the mcobj.exe or whatever the gui needs, there are no executables in the zips just like the one jason and alotta go files, in this, if there is an exe how am i hypnotically blind to it!?

    https://github.com/quag/mcobj your windows link from above

  1. November 30th, 2012

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

Follow

Get every new post delivered to your Inbox.

%d bloggers like this: