Voxel Plugin

I have just started to look for some voxel c++ code to help me, or to use in an Unreal Engine 4 project I am undertaking and save time writing the code myself, and this looks by the videos to be what I am looking for as far as terrain is concerned. However, it looks to be once again that I have come across code that has pretty much zero documentation or guidance available to help to use it or even understand how to use it. The only thing to go by is a line saying to get stated one needs to add a VoxelWorld actor to their Scene. Well I did that to only find my character falls through it, and only it.

Fortunately I thought, I found a basic level in the downloaded file called NavMesDemo that works where the character does not fall through the VoxelWorld actor. Short story, after a few hours trying to figure out what basic thing I was missing and how to get things to work in my project, the best thing to do is to come here and suggest that a basic tutorial on how to set up and use this plugin be created. The demos show good promise that this is a decent plugin to use in ones projects and even contribute to. But as with too many other projects like this that I come across, documentation is lacking and making it much harder to than it should be to use. So I will be moving on to look at something that has decent documentation if not tutorials, even if it is not as good as this. I have had too many experiences in the past of wasted time trying to understand how to implement undocumented code.

I will repeat the suggestion, if one wishes for uptake of this work, create a series of tutorials of how to use this plugin. If they are to be videos, have voice included as it is more painful to watch a video and understand it without voice than it is to read text.

All the best with this.
Regards.

I remember the very begining were easy to follow up the development of this, but after some time I got lost too, but I didn’t get hard on top of it to figure what was missing. Your suggestion is welcome and I hope Phyronnaz will check this and improve it. It is in the released section but atm it is wip as they are changing things.

I’m trying to get this installed on 4.19 preview and upon generating my project files I’m receiving the following error:



ERROR: c:\Users\ULLS\Documents\Unreal Projects\VoxelTest\Plugins\Voxel\Source\Voxel\Voxel.Build.cs(17,51) :
error CS0122: 'UnrealBuildTool.BuildConfiguration' is inaccessible due to its protection level
ERROR: UnrealBuildTool Exception: Unable to compile source files.


Any one have any ideas?

Here’s what I’ve been doing this last month:

  1. Improved the graph editor. The graph editor allows to generate worlds easily and with no code at all, without sacrificing performance as you can convert a graph to C++. I’ve switched to a more blueprint-like flow:

This allows for branches, and enable more optimizations. I’ve also added reroute nodes.

I’ve added recursive world generators: this allows to sample a world generator from another. This is a really powerful tool, as you can do for instance the following

with this graph:

(original asset was made by @HeadClot in MagicaVox)

And modifying the graph a bit like that:

leads to structures like those:

https://media.discordapp.net/attachments/379297529235243022/398697397452013589/unknown.png?width=1238

And with some more tweaking:

  1. Added custom actors spawning. They work in a similar way as the grass, as they’re only spawned on near chunks. However, unlike the grass, they’re not destroyed when the player goes far from them, but only disabled using an optimized octree structure:

When spawned, their physics is disabled. However, digging under them makes them fall:

This is handled in a very generic way, allowing for easy customization, as I’ve added blueprints delegate for every step (like enabling physics).

The actors to spawn are chosen from the graph editor:

  1. I’ve improved multithreading to allow for more concurrency. This means that performance is really great now, even with many edits at the same time. Here’s a demo showing that, with more than 20 (big) edits per second: AsteroidsDemo.zip - Google Drive (150MB, demo is configured for an 8 core processor: if you’re dropping below 120FPS, please check that you have at least 8 logical threads. Left Ctrl to add).

The demo is really cool, you should try it ;), here’s a quick preview:

  1. I’ve ported the @Koderz UE custom build with texture arrays to 4.18: https://github.com/Phyronnaz/UnrealEngine/tree/4.18.2-TextureArrays
    As building from source isn’t so much fun, I’ve built a binary release of it (which means it’s the same thing as the version from the launcher): https://drive.google.com/open?id=1Gx9Xm6W2Yt53L5AcAv8qLAC66Tg9jpd_ (3.4 GB).

Texture arrays means unlimited texture painting at a really low cost:

I’ve also made a picker UI:

Both the UI and the texture array are created automatically from textures in a folder: you just have to set the texture suffixes:

  1. I’m currently working on improving the LOD system. I’m going to add a setting to choose the preferred LOD system: no LOD but better resolution, LOD with higher view distance but lower resolution, etc

Here’s a quick test:

Radius is 1km, and there are no LOD. This runs at 120fps on a GTX 970/Intel 4790k (slower on the screenshots because ejected from PIE)


This project went way further than expected. This is why I’m going to change it’s pricing: I’m going to release a paid version, while keeping the open source one too.

The paid version will have more features, like multiplayer, importers (from heightmaps, meshes, 3DCoat, MagicaVox…), graph editor, actors spawning, …
The free version (the one on github) will still be updated, however it will only have the basic voxel system: you’ll still be able to generate custom worlds through C++, and to edit in real time the world, but none of the fancy features listed above


@QuestForge Still waiting for you on the discord :wink:

@DarkS474 VS 2017 won’t be required in the next release

@IDominioNI Thanks for the feedback, indeed docs are really important. However until now everything was changing at a fast pace, so doing docs on an already outdated system would have been losing my time. I surely hope this experience didn’t make you leave this plugin forever :frowning: . Btw, the best way to get fast support is to join the Discord, which is quite active.

@ULLS This should be fixed in the next release


Thank you all for the support, hopefully this plugin will soon be in a more stable state and ready for the release :slight_smile:

Some pictures of infinite noise, created in a few minutes with the graph editor :

Will the paid version have the source available as well?

Amazing progress! This is quickly becoming a must have tool :slight_smile:

All plugins must include source code as per MP rules, so the answer is definitely yes, otherwise he wont be able to even put it for sale.

What will the price be then for the paid version? Will it be cheaper, same or more expensive than the other voxel plugin on the marketplace that in its comments section you said it didn’t have as many features as yours ?
I have yet to decide if going voxel is worth it for the game I am developing with world composition large maps … will the paid version be able to convert any heightmap including world composition and even the materials applied ? What will the performance be for 64km x 64km world composition maps ? I would need the paid version to be able to convert so large heightmap maps with no serious performance hit.
Could you add an option to set unbreakable areas ? And an unbreakable level below the terrain of a voxel map? I mean… to avoid a player digging and going off the map… allowing the creation of holes with destruction only up to a certain level that can be set with parameters.
What I don’t understand yet is if with this plugin of yours all actors need having a blueprint attached to work on the voxel map, otherwise they would fall off the map ? And if that is the case would that be true with the paid version too? Or did I get it all wrong ?

Thanks.

I am currently evaluating various voxel options and have made good progress writing my own voxel plugin using the PolyVox library…

I was particularly interested in your multiplayer implementation - none of the advanced features you’ve mentioned are important to me so I’m not interested in paying for such an advanced project as I know I can get my own simple one up and running; your solution would have simply saved me time.

I’ve cloned your repo and will have another attempt at finding a fix on my own and failing that I’ll continue to work on my own plugin.

I do wish you the best of luck though!

Regards,

ULLS

@getnamo Thanks!

@DarkS474

Probably a bit more expensive.

64km64km is really big. What’s your resolution with that size? one pixel for 10m10m?

You need to add a VoxelInvoker to your player so that the plugin knows how to generate LOD and collisions.

@ULLS

If you look back into the previous versions on github, you should find one with a kinda working multiplayer (V0.7.1). With some work you should be able to fix it. Basically all I’m doing is sending changed values through a custom socket.

Using the following Voxel.Build.cs should fix the error: // Copyright 1998-2017 Epic Games, Inc. All Rights Reserved.using System.IO; - Pastebin.com

I’m getting a ‘Missing Procedural Modules’

" The Following modules are missing or built with a different engine version:

UE4Editor-Procedural.dll "

Rebuilding doesn’t work. What am I missing?

  • plugin looks amazing btw -

@LocalJoke Thanks! That’s quite a generic error, could you join the discord and ask there?

The progress of last week:
I made a new world generator:
https://cdn.discordapp.com/attachments/225448516376461313/405889096175845377/HighresScreenshot00006.png

This one is made of 2 graphs: one to generate only one island (first below), and then another to repeat those islands and to add a perlin noise ground (notice the Island sampler on the bottom right of the second graph below)

https://cdn.discordapp.com/attachments/225448516376461313/405890125134823424/unknown.png

https://cdn.discordapp.com/attachments/225448516376461313/405889999779921932/unknown.png

I’ve also improved LOD performance a lot, allowing for better view distance. Here’s a video showing that and how the settings affect CPU usage:

I did a multiplayer stress test, with 12 players. Everything works fine (above 90fps in PIE while being the server), except for a small issue which causes random player tp when they’re close to each other (edit: fixed):

In the second video, the framerate remains stable while all players are falling (which means entire collisions meshes update at 30hz). The players at the end don’t fall through the world, which shows how robust the collisions system is.

I made a pull yesterday after your post and didnt find this specific map and I think it is not the same version because I was falling from the landscape quite a lot compared with the videos above. As soon you could commit the new version I’d love to try it out!

@NilsonLima I won’t be pushing to Github until the paid version release, as it takes some time to remove the paid features from the code. Glad to hear that though :slight_smile:

I am really interested in this tool. Is there any ETA for the paid version?

@jagler04 Glad to hear that! I’ll post here as soon as I can have a reliable ETA.

More multiplayer:

Been doing some experiments with the world position offset. Could be useful for basic water/ocean animation for instance.

I’ve also added transvoxel back, which means crack free transitions:

https://media.discordapp.net/attachments/379297529235243022/409763117367820288/unknown.png

Can you import heightmaps/splatmaps?

@duke22 You can import heightmaps/splatmaps, splines, meshes, landscapes, MagicaVoxel assets and 3D Coat ones.