Modulo Magica

In my spare time I’ve been playing around with MagicaVoxel. Today I was experimenting with using modulo operations to stagger the cells of a model over multiple layers. I originally thought this would be useful for exporting .obj models that could then be imported elsewhere as independent cells. It wasn’t! But it was still fun playing with numbers and colorful cubes.

Here’s the original layers I was working with:

Screengrab of MagicaVoxel editor showing several solid voxel layers across the y-axis, displayed in a colorful gradient of pinks and yellows.

The colors are from a map I was using to generate the original model. I output these values as colors to help me debug my code. Also it’s pretty.

Here’s a screengrab of what it looked like midway:

Screengrab of MagicaVoxel editor showing voxel layers spread across the y-axis, where each layer contains cells with the same x and z coordinants as its neighbors, displayed in a colorful gradient of pinks and yellows.

My math was off at this point, so the cells aren’t staggered correctly.

And here’s another screengrab of what it looked like once I got the cell-staggering to work:

Screengrab of MagicaVoxel editor showing voxel layers spread across the y-axis, where each layer contains cells with x and z coordinants distinct from its neighbors, displayed in a colorful gradient of pinks and yellows.

Each original layer is now blasted out evenly across multiple layers.

Go check out MagicaVoxel → https://ephtracy.github.io/

10-13-21

Print Friendly, PDF & Email

Leave a Reply

Your email address will not be published. Required fields are marked *