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.
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.
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.
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.
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.
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.
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.