Mass converting .qb to .vox?

Hiya! I’m working on a stonehearth mod that requires a lot of model editing.

However, as I’m leaving for Spain on Tuesday evening, and won’t have access to a computer for a bit over three weeks, I found and purchased a voxel modeling app for Android (VoxelMaker, if anyone is interested).

However, the app only supports .vox, and so, I need to get the game’s .qb files to .vox, preferably all of the files, to have as much as possible to work with.

So, here is my question; Is there a way to automatically convert the files, or will I have to do it manually?


I haven’t found good options there. .qb is an intentionally proprietary format. You need quibicle constructor in order to open them reliably. Whether you can batch convert stuff in QC or not, I don’t know. I honestly doubt it though.

I believe qubicle can import qb’s and export as vox… Does that not work?

It works, but having to do the same process for every model file is going to take ages, so I was looking for something to convert them all while I’m doing something else.

I don’t know if .vox is standardised. Do the files generated by Qubicle work? If you open the .vox with an editor, does it look like plain text or binary? Does it start with 'VOX ’ and contains strings like ‘SIZE’, ‘XYZI’ (i.e. does this format fit the description)?

If I knew what the format looks like, I could modify Panicle to export .vox, then we could easily process all files. If you could shoot me one of those files, I could have a look at it.

I currently don’t have access to my pc, but the .vox files are the ones from MagicaVoxel. Here’s a screenshot from the app:

And here is an exported .vox from the app: (644 Bytes)
I hope that covers it all!


Does the program support multiple matrices like Qubicle, or is it only one matrix? It’s somehow not obvious from the format specification…

I’ve got no idea what a matrix is, or if I do, I can’t recall what it is. Mind explaining it quickly so I can check? :smiley:

Uh, a matrix is kinda like a sub-model. A .qb can contain multiple matrices. For example, Hearthlings have half a dozen or so matrices (torso, arm_L, arm_R, foot_L, foot_R, head, and so forth). You can edit and move them independently.

I suppose if you don’t know them, then they’re probably all merged into one huge blob in .vox files.

Ah, I see.
If I were to convert a .qb to .vox, all the matrices get merged together, right?

Can I later import the .vox files into qubicle and redefine the matrices?

If .vox doesn’t support something like matrices then yes, they’re all merged together. It also seems that .vox only supports up to 255 colors (.qb actually supports the whole 24bit, if you can get a model large enough).

I suppose you can split up a matrix in .qb into smaller matrices, so you would have to do it by hand, but it should be possible.

  1. I don’t know of an existing batch solution.
  2. Converting to VOX merges your matrices (think photoshop layers) together. As far as I know Ephtracy planned supporting matrices in the format, but it’s not high on his todo list.
  3. If matrix merging doesn’t scare you (like, if you work on one-matrix models like furniture), almost any tool can do a per-file conversion (Magica, VoxelShop, Zoxel etc). There are some differences though (like where the origin point is placed).

Cheers. Thanks to the input from @MelOzone, I’ve written a vox importer and exporter for Panicle. Can you test this file and tell me if it looks okay?

Exporting a file to vox will merge all matrices and attempt to create a palette (so it won’t work with models that contain more than 255 colors). Importing a vox will just create a single-matrix voxel. In my tests (vox -> qb -> vox -> qb -> png), it looked quite okay.

If that vox works for you, I can write you a program that converts all .qb within a directory to .vox.

Apologies for the late reply; I was helping to set up my mother’s birthday “party” tomorrow!

The file gets loaded into the app just fine, but I’m not sure it’s an entire model? Here’s what I get when I load Kobold.vox:

Is this what it’s supposed to be? If so, swell!
If not, not-as-swell…

Thanks for the help so far!

Edit: After moving some files around, I get this super informative error when I try to open the file:

Edit 2: After moving around some files once again, I get the same result as the first image when I do the same thing as I did to get the error in the second image.


Something went wrong while merging; I’ve updated the file, try again?

For some reason, it seems to be flipped along the X and Z axis… I am not entirely sure why though. This shouldn’t be too much of a problem, however… or is it?

As long as it’s fixable in qubicle or something similar later, I don’t really mind. Of course it’d be optimal if it didn’t flip anything, but it’s not a big deal.


It’s fixable in Qubicle, but I think I found the issue. It wasn’t in the .vox itself (I hope), but rather in the way I’ve re-saved the .qb upon trying to validate that it’s okay.

Try sheep.vox. I believe it should be okay now.

It loads just fine, but is the sheep model supposed to be positioned with the tail faced down, or should the feet be on the ground as it is in-game?

This is what I get when I load [i]Sheep.vox[/i]:

I added the turquoise to show where the bottom of the model is.


Err. In Qubicle, the ground is the XZ plane, and up/down is Y… It looks like MagicaVoxel uses XY for the ground, and Z for the upper levels?

I’ve changed y and z, try that one. I suck at 3D maths though, so it’s possible that x and y are mixed up instead.

This one turns out as nothing… But as I’ll have to redefine the matrices either way, I can rotate them correctly at the same time.

I’ll go afk for a bit now, I’ve got to take a bath to cool down, I’m not built for even swedish summer heat.