As part of my development process, I ended up creating a general-purpose voxel-based 3d layout tool with a WYSIWYG interface that allows for reasonably efficient non-expert use: Select a tool, select a color (if applicable), select a picking mode, then click drag to generate objects (or geometry). The entire modelling process is designed, from the ground up, to require no instruction or training other than a description of what the tools are and how to access them.
I consider it to be useful enough to have put a lot of time into developing and implementing for my own work, but I am unsure whether or not I should continue improving it, to make it available for other peoples’ projects. I’ve noticed that voxel layouts are starting to become prominent in games, so I suspect that something more flexible than a 3d bitmap editor might be a useful thing to have around.
Here is a video of my editor in action:
It is almost entirely click drag, with slow interface interactions kept to a minimum. Arrow keys where used to shift view planes and another keyboard shortcut was used to occasionally adjust the alignment plane.
Is there any interest in seeing this tool adapted and improved for use in Unity? I’m thinking about doing that and putting it up for sale.
I think I will go ahead with the plan to make it useful within a standard Unity project. I will probably make it far more flexible than the video showed, as now I am thinking about ways to make it handle arbitrary tessellations and interface with other peoples’ voxel systems (the added flexibility necessitates a redesign anyway, so it won’t be too much trouble to make the new design work with the Unity editor). For now though, I will be concerned only with the demonstrated functionality.
When I designed the editor, I was only considering my need to have objects aligned with the sides of cubic voxels (something which would be outside of the scope of virtually every such editor), because my game involves ladders, buttons, and various traps - things which do not work well as unit cubes. Apparently, the camera and point selection systems seem to make it much easier to use than typical 3d editors, and it seemed so obvious and easy to me to implement it the way I did that I wonder why I do not see such a system, even as an alternative mode, in other 3d tools.
(I actually made a similar editor for 3d meshes [and used it to build all of the models in the video] after I got frustrated with making Blender put vertices at the exact coordinates I had in mind, but I consider the mesh editor to be more of a programmer art tool than anything else).
I’d love to see a tool like that available for level block-ins and/or white boxing. As a bonus I’d love to see ramps and/or wedges, but even without them built into the tool it’d be super easy to just have one and snap it in place where needed after using this tool to make the other 90%ish of a level’s shape.
I have settled on a design for the editor. Geometry will be fully abstracted, so if you don’t like cubes, you’ll be able to configure it to work with any 3d tessellation. They won’t even have to be uniform tessellations (though you might have to be ready to construct lots of procedural Meshes for the editor to cast rays against).
After some rather rapid development (breaking apart the old editor and re-assembling it with a new design), I was able to use its super-abstracted geometry to draw cubic voxels by casting mouse-rays against a sphere:
After much consideration, I built a new Voxel Engine, which I call “HoneyVox”. It uses honeycombs to define the shape, position, and adjacency of voxels, instead of a fixed 3d grid of cubes.
I haven’t yet hooked it into my editor, so I threw together, a quick test with a truncated cubic honeycomb configuration and some random data:
There is a big update coming soon(ish) and plans for a lot more features like procedural generation, slopes, and the ability to place prefabs as easily as placing blocks.
I haven’t actually created an official thread. I know I should create one, but wanted to have some more screenshots and features to talk about before I posted. However, I have had a number of conversations on reddit, which I’d be happy to link to if there is any interest.
I’ve never tested it on a mobile device, but I can tell you that I’m not doing any ‘greedy meshing.’ I’m guessing it won’t perform terribly well on mobile, since each voxel face is 2 tris.
The current strategy:
Interior faces when there are 2 solid blocks neighboring eachother are not drawn (this is what minecraft does, I think), and you have the option to totally disable certain faces (ie back faces for a sidescroller.)
I’m happy to answer questions you might have about performance. I can tell you that I’ve had ~400 of 16x8x16 voxel structures displayed on a macbook pro, with one shadow caster and a buncha lights and still got 60fps, though that was starting to push the limits, and would be hugely overkill for your average topdown/sidescroller level. If you watch the time lapsed build I posted, that scene easily gets 400fps.