Download

Are voxels viable in UE4?

(this thread was created almost 50/50 for my personal questions and general discussion on the topic of voxels, as I bet there are many looking for it)
Hi! I have been playing around in UE4 for a good couple of months now, got to know with the editor, and the general way the engine works, and how to work with it.

Now when it comes to actually wanting to develop something that would not be just a single functionality-demo (like the crystal shooting simulator I did. Yes, a crystal shooting simulator.), but rather a game that actually could classify as enjoyable.

There is one style of computer graphics I have completely fallen in love with -voxels. More exactly, voxels of a very specific size, basically so that if you imagine a minecraft 1m^3 cube (that should be an example everyone knows), and making it consist of 1728 little cubes (that’s 12x12x12).
I also love UE4. The rendering engine is fantastic, the community even better and the workflow generally fits for me quite well.
This week I have spent trying to figure out if the two can be combined, but the information is rather hard to get to, so I finally decided to post a question about it, as most likely someone here knows.
I have had some discussions with Afuzzylama (big thanks to him) about me gaining access to his little contraption he has got going on, but that is about it.

I have seen some nice demos on Cryengine, but I personally dislike the engine for some reason. It's workflow just is quite clunky for an indie.

The unity in the other hand has tons of voxel packages on their asset store, but they vary in quality(some are literally just placing tons of objects, which will kill any computer on this planet if scaled up to any reasonable dimensions), and, let’s face it, Unity 4 is graphically weaker than UDK was, and there are no guarantees on the systems being transportable to U5.

One option of course is to learn proper C++ coding (I do get the general structure of it, and have been able to implement basic gameplay mechanics within it, but my work with it is rather… well, slow. Line by line I have to visit the doc. .) That being said, I would be ready for it, but I would really appreciate someone pointing to the direction I should go about learning it, and overall the back end of the voxels (there isn’t a terrible amount of info on that based on a quick google search)

Things I am assuming you will try to point me to, and replies to them (kind of in a "Frequently offered solutions (FOS) way):

"<a link to the brick game> " -Yes, I have seen it, but the problem is that download links to the engine branch are dead, (as seems to be the project as well) which makes it impossible for me to compile the bloody thing.

<a link to fuzzy’s pixels for glory>-Yep, that is a thing I am currently investigating. I’ll bring you updates on my negotiations further down the line

< a link to a dodgy voxel engine>-yes, there are surely those out there, but what I am looking for is the polished, broad feel of UE4, and if I change my mind on that, I’ll surely find a couple dozen dodgy alternatives.

Go read a book on C++, and you’ll be fine!-phh… How many people have actually succeeded with this advice? To me it seems like just a nicer way of saying “You will never be able to pull it off without an expensive degree on computer sciences”, which I hope is a false claim.

Allright, that’s that, can’t wait to see your answers and advice! :slight_smile:

I think I have a backup copy of the Brick game’s Engine version (at 4.3). Looks like its including git history. If you want to have that, PM me.

UE4 use to support SVOGI (sparse-voxel octree global illumination). Though I heard the final code was completely removed from the engine. You can still find the papers here:

However, just recently Nvidia used UE4 to show off their Voxel Based GI (VXGI).

yeah, I saw the NVidia demo. I just don’t get how it has directly anything to do with what I was talking about (NVidia demo showed EXTREME amounts of voxels, and it was created by a large team of professionals. The post in the other hand is about more comprehensible amounts of voxels that can be set in place by small teams & indies)

If someone else is stumbling onto this post looking for the changes to the Engine made for Brick Game by Andrew Scheidecker I have pushed his feature branch to my git repo.

https://github.com/eAlex79/UnrealEngine/tree/BrickGame

Anybody interested should pull the branch to his own repo on GitHub because I won’t have it there forever.

I let my subscription run out, I should really resubscribe soon…

Andrew has posted his Engine changes for 4.5:
https://github.com/AndrewScheidecker/UnrealEngine/tree/BrickGame-4.5

Oh great, thx for sharing :slight_smile:

Someone posted this video with a voxel based terrain a few weeks ago:

Oh, thanks for the link :smiley:

Hey DoctorPC - Have you looked into Voxel Farm yet?

They are planning an Indie license which has not been announced yet.

You will need to know a bit about L-Systems. Which would be helpful to know anyway. :slight_smile:

Here is a video of Voxel Studio in action being used to make a house. :slight_smile:

looking into it now, and being amazed by it. Can’t wait for an indie licence, as that piece of technology seems to be capable of things I thought would still be near impossible in 2020 :O. Bit worried about the performance, though.

Voxelfarm is the top of the line engine for voxels at the moment, the creator has a very robust Dual Contour implementation so it supports both smooth and hard edged surfaces at the same time, also all of the main processing is handled in the GPU for the most part. The main downside is that it is likely going to be more involved to work with than you want considering that you are trying to avoid learning C++. It is also the backend for the new Everquest game from what I hear, the performance is good.

I would suggest that you think about Cubiquity when it comes out as they will also support cubic voxels (not just the marching cubes smooth mesh that they displayed) and because it is built on top of their open source and free PolyVox library. They also released a Unity version awhile back that people have been using with success as far as I am aware, so they are hardly unknown and do good work.

All of that being said, I have a lot of free time on my hands and nothing better to do and I added PolyVox into UE4 myself as a plugin because it was fun. You are looking for a scale close to the one in this screen shot right? Although it is currently displaying 1/10 of a meter scale not 1/12 that is just a variable setting. If you can’t get the one guy to help you out (and since Cubiquity seems a while out) I could probably give you something to play with in the mean time.

Something that you will have to consider is that 12x12x12 to a meter voxel volumes are going to be very memory intensive if they are truly volumetric at that scale. I would assume that Pixels for glory probably stores his blocks at the meter level instead of at the sub meter level based on the example images he displays (Also he mentions it in his shader writeup). There is a reason why most voxel games with that type of scale are either top down, isometric, or true raycasted pure voxel implementations (which tend to still be very slow).

Also I agree, there is something really fun about that scale of Voxel, there is a guy posting on Reddit with his project that uses it better than any other that I have run into so far: http://gfycat.com/PowerlessFrailEmeraldtreeskink.

6c4ea75753cec97b5222262807c655101a00be0c.jpeg

Hey DoctorPC, I have tried the BrickBrid plugin used by BrickGame and it was too slow for me (certainly with the voxel size you want). I then used the PolyVox lib (as almost everybody, because it is free and awesome) and the procedural mesh generation from Generate Procedural Mesh - C++ Gameplay Programming - Unreal Engine Forums to create my own C++ code. The generated meshes are updated in real-time from changes to the PolyVox game model and have full collision and AI NavMesh generation working. BUT, it is a lot of work and frustration in C++.
So, my advice for you would be to either wait for the Cubiquity plugin (the engine plugin from the PolyVox guys) or the VoxelFarm release (although it does not look like that will be any time soon). Anyway, if you want your voxel world to be updated in real-time (as in the link from mordentral) then you will probably not get around learning C++. The blueprints from UE4 are just too slow for this kind of operation.

Yes, the memory will be a problem, but because I am not trying to create a random generated open world with millions upon millions of blocks (which may be the most common use for them, but I myself want to explore their benefits in other genres as well), I would imagine that it would run fine on most (at least gaming) computers. To me, I don’t just see it as a terrain solution, but rather a amazing new world that has been explored only very little. (and I hope for not a good reason, lol).

Scale is always relative, but I used fractions of a meter just because they are easier to grasp. At least my current project will not need thousands of blocks of view distance, so even a big scale shouldn’t be a problem.

I am not necessarely trying to avoid learning C++, (I know the very basics of it, and can in fact work with it given enough documentation pages :P), but for the scope of my project I wouldn’t want to go mind bendingly technical, unless I really have to.

Well, I never even considered doing back-end stuff with blueprints. They’re good for"fairly basic scripting", not extending the engine :P.

This guy is porting PolyVox to UE4: https://twitter.com/DayOfWar

That isn’t strictly true, blueprints are a front end for a c++ backend and any half way decent Voxel system for UE4 should have a blueprint interface just for ease of use and flexibility. Half of my current functions are accessible by blueprint and I plan to move every interface that I should need over to being blueprint accessible soon. Obviously i’m not going to iterate through voxels with blueprint loops but I can sure create blueprints that call the c++ function to do so and return the result.

yes, this is what I meant by “basic scripting” (to me accessing interfaces of more complex functions still counts as basic).

oh, great :slight_smile: