Eden – MagicaVoxel Integration

I have been meaning to experiment with the MagicaVoxel program in relation to rendering worlds in Eden. I scoured the internet looking for a simple little library in C# to make generating MagicaVoxel .vox files quick and easy and couldn’t find anything. There is a plethora of importers to other programs so one can create models in MagicaVoxel and then import them into various game engines, modeling applications etc, but I couldn’t find anything that generated models in MagicaVoxel programmatically, so I just wrote my own little library to do just that! It’s freely available over on Github if you are interested.

For reference the following sample code will generate a .vox file of a simple 3x3x3 cube of random different voxel colors (given the chosen palette which is default currently) with a lattice structure:

I’ve since integrated a simple command into Eden that automatically exports the terrain information into the .vox format required by MagicaVoxel and was rewarded with a 3D representation of worlds within Eden!

Never fear, Eden at its graphical heart is a crunchy pixelated 2D game, by design. I just thought it would be cool for players to be able to export their little worlds in Eden in such a way that they can visualize it in the three dimensions the game is accurately simulating. It was also a nice little diversion to work on something a little outside of Eden but still related in a way 🙂

Disclaimer: The image below does NOT represent the visuals of Eden, it is an image produced using MagicaVoxel to render the world information within Eden. I have no association with MagicaVoxel, I just think it’s an awesome voxel editor/renderer and that @Ephtracy fella has made a wonderful application 🙂

The two images below are not correlated, just samples of a random world in Eden, one exported to render in MagicaVoxel, the other as it is rendered within Eden.

A World in Eden as Rendered in MagicaVoxelA World in Eden as Rendered in Eden