Download

Resources to make a voxel game?

Hello! I recently purchased UE4 and want to use it to make a voxel based game. Are there any good tutorials to get started with this kind of game? Thank you!

Probably depends on your skillset. I have seen a few voxel projects based in C++, but no tutorials and nothing in blueprint. If something exists it is in the tutorial forum, C++ forum, or Work in Progress forum.

Voxels are fairly problematic. How i achieved to do it, its without a custom mesh, calculating the vertices from C++, and creating a custom mesh component that uses that vertices to draw. Its not easy at all. You could take a look at the voxel generator part of my code here https://bitbucket.org/victorblancoruiz9/cubicengine/src/4edebc3c5178af0bc3676816baa49cd1d2aa1a68/src/VoxelBlock.cpp?at=master . I warn you, this is VERY ****** code, and its not for UE4, but for normal OpenGL. it WONT build, but you can take a look at the VoxelChunk class and how it creates its vertex array, and have an idea on how to do it. There are also some tutorials in google easy to find. But none for UE4.

The most accessible for you (and I assume what you actually want) would be:

That isn’t really an actual Voxel implementation but now a days pretty much everyone that asks for that means “Like Minecraft” anyway and it is a complete example.

Outside of that the easiest route would be to wait for Cubiquity or VoxelFarm to enter UE4 (both are in progress according to their creators). If you want to roll your own then check out the Procedural Mesh Generation thread in the forums and start looking up Voxel storage and traversal techniques or incorporate PolyVox to skip all of of the generation side of things, it handles all of the basic Voxel functions to a tolerable level of quality (I use it myself with some modifications) and it handles both marching cubes and cubic Voxel representations (no more advanced techniques yet like dual contour and the storage is either flat array or paged in).

There are quite a few people with working Voxel Implementations in UE4 but as far as I am aware none of us are working on an open library or toolkit like BrickGame/Cubiquity/VoxelFarm.

If you were wondering about performance considering dynamic lighting, my tests so far have been decent but i’ve had to play heavily with the dynamic lighting settings.
https://www.youtube.com/watch?v=0uGN8oF5svQ

Voxel Farm is being adapted to UE4, and they will also be releasing it at an affordable indie subscription.

This solution goes for realism, but the logic behind voxels remain the same (I think?), so it shouldn’t be too problematic to adapt an art style like f.ex minecraft…

EDIT: Mordentral beat me to it :slight_smile: