Hacker News new | ask | show | jobs
by mattlondon 2737 days ago
Nice looking game! The models look awesome!

Did you do any post-processing on the models from MagicaVoxel before using the models in your game? E.g. does MagicaVoxel export a single optimised mesh, or does it export a load of cube meshes?

1 comments

Looks like it does export a single "optimised" mesh (at least when exporting to OBJ) - i.e. it not just a load of individual cube meshes, but each separate coloured face is optimised into 3 or 4 triangles. A face with different colours is treated as a separate set of triangles though, so something like a chess board pattern would be a lot of triangles, but a white cube would be hardly any.

I had some trouble importing directly into Unity 2019, this is what I did for anyone else wondering:

- Export as OBJ in MagicaPixel

- Import Obj & Png into Unity via drag-n-drop

- In the prefab that is generated, on the model tab change the imported model's scale factor to 0.1 and hit apply.

- In the prefab that is generated, on the material tab click extract materials and save in same folder.

- Drag the Png texture you imported into the Albedo of the extracted texture.

You now have the textured MagicaVoxel model in Unity for whatever you want to do with it. Yay.

This process sounds a lot better than what we did a couple years ago when we were working on that game. Our process involved Voxel Shop https://blackflux.com/node/11 and a few steps. I can dig up the notes if it's interesting, but it looks like your process is better anyway.

I've also heard that this asset might be useful, but I haven't tried it yet: https://assetstore.unity.com/packages/tools/modeling/magicav...

Thanks for the info. Going to try importing into Godot later today.