Download

UE4 Voxel Plugin - Progress Updates Thread

Can someone finally build a mc clone in ue4 thats works well and has lots of cool stuff? :frowning:

Yeah I am looking forward to it I was watching the livestream to (I saw you in chat but my twitch name is different), the speed improvements alone will be excellent and I want to play with the packet system. I hope I can use it in some unintended ways to significantly speed up some operations.

By the way did you test the demo? I haven’t been able to throw it through very many hardware configurations yet and it is uncapped currently for thread usage. I have good results on all current machines I tested it on but I only have access to so many of them.

I also recently re-worked the threading a bit, I should be able to throw in the compressed volumes at any time now without codebase changes. It slows down the uncompressed volume usage but after testing it doesn’t appear to really be noticeable.

You are free to do so yourself? While Minecraft is a fun game I don’t find it very technically impressive and I really don’t see the point in cloning it to a different engine. For one, there are multiple entirely custom built engines out there specifically designed to clone Minecraft, shoehorning it into this one isn’t a good use of resources to me.

I could throw together a working base “minecraft” in a week or two off of this, but I would be a severe waste of what development time I have and wouldn’t feel very rewarding.

It is probably one of the least interesting uses of this toolset as far as I am concerned, I understand everyones love of the game, my own son grew up on it, but just copying an established and active game is not something that I ever intend to do with my own personal time.

Hey - I just downloaded it - I will let you know how it goes :slight_smile:

Really excited for this :slight_smile:

OK, so follow up from my previous post - The demo ran Great!

See the image for details -> http://prntscr.com/akgo1l

Here are my specs for future reference.

AMD FX 6100 @3.3 Ghz
16GB of RAM
XFX R7 265 1 GB VRAM

Nice, lowest card I had been able to test on before was a 660 at work and highest was a 980ti with my home card being a 780, yours fits right into the profile, I didn’t have an AMD card to play with.

Kind of curious how bad your physx frames are when spamming R? I have it maxed at 500 physics entities so it is intentionally laggy at the moment (plus they collide with each other and physx doesn’t handle it well), but I can’t drop mine below 30FPS with an FX 6350.

For reference with my test cards avg fps was around:

660: 120
780: 220-250
980ti: 350-360

The current demo uses a threadpool that uses all but one of your logical (not physical) cores so during initial level load it maxes your cpu but during runtime everything is spread out evenly.

Let me find out what happens if I spam R.

Also I need to ask - How well does the Static mesh to voxel actor work with allot of voxel items in the scene?

Like how are the draw calls and how are the frames per second?

I have made the decision to not use voxel terrain but use something else which I will go into detail later.

Edit: After spamming R I managed to get down to 25 to 30 FPS but that was after about 5 seconds of pure spamming non stop

Well, its an actor, it pretty much behaves the same as normal actors except the vertices are blocky and thus can get heavy.

I have configurable chunking for actors now so it would be one draw call per chunk per vertex buffer, one buffer for normal voxels, one for water, one for transparent (because of how UE handles transparency this is required).

IE: With no chunking and just solid voxels it is just 1 draw call per actor, that is either the same or slightly better than static meshes depending on how many materials they have.

With the instancing I would like to eventually add it would be one draw call per object type like static mesh objects. But when modifying one it would have to be removed from being an instance obviously.

Honestly instancing would be kind of useless with a modifiable world if you want any kind of fast brush operation, I only intend to add it for things like foliage.

Alright - Thanks for the insight. Glad to hear that there is more optimization you want to do.

I also updated my last post with some info about the destruction system I tested.
I just hope that it is my slow PC that is doing this not your code. :slight_smile:

Well 500 active physics actors are always going to be slow in this engine, more so I assume with an AMD card with Physx. It shouldn’t be spawning so many in any normal scenario.

Yeah understandable. :slight_smile:

Anyway - Got a question you mentioned in a post above that you wont be using world compostion and re-basing the world origin due to the lack of multiplayer. Would you mind going into detail on how you plan to make large worlds and allow them be playable in multiplayer? That is if I am remembering correctly.

Just curious :slight_smile:

Re-basing doesn’t even work in the engine currently for multiplayer. That is why large worlds hasn’t been a big priority at the moment for me, I know that if I add in “large” worlds someone is really going to want to try and use it as an “infinite” world which isn’t technically possible with the engine currently. My game jam thing got around it by having the player stationary and moving the terrain around them to support infinite flight space.

World composition works, but it has the normal UE4 world composition issues, IE walking across a boundry to a new streamed level will stream it in for all connected clients, this is really not something you want for a large scale voxel world.

There is no real solution for multiplayer worlds larger than the current maximum level bounds in engine currently.

That being said I do intend to support up to the maximum engine bounds, but I really need to get the networked chunk streaming working flawlessly first and I am going to use the normal terrain as the test bed for that first.

I take it that you do not want to use world composition due to “pop in” or is there something else?

I am really new to voxel tech so any knowledge I can pick up is awesome. :slight_smile:

Edit: Just noticed that you updated your post. Just a thought - Have you considered double floating point precision?

I know of some one that Is working on this in unreal 4 for a project of theirs. I can get you in touch with them if you want or would double floats complicate the voxel tech?

Its not possible to implement engine precision changes through a plugin, that team is using a direct engine modification.

Also “world composition” does the level streaming still, it has the same issues for multiplayer and uses the origin rebasing which as far as I am aware is not multiplayer capable yet.

So what would you use for large multiplayer worlds ideally?

Just curious here :slight_smile:

The problem with the second method with a voxel world is the RAM usage, would require a custom made form of that.

Hello mordentral,
Do you have an idea of price for this plugin? I really want to get a smooth voxel solution for dynamic terrains that look nice. I am looking at all the tools I would need and this sounds like a great tool to have in the toolbox. I appreciate you sharing your progress with this.

One technical question:
Since you have voxel based characters would it be possible to voxel based entities such as ships or fixed objects like buildings? I was hoping to mix say smooth voxel terrain with cubic voxels for buildings or other objects.

Hey mordentral,

Check this pull request out - https://github.com/EpicGames/UnrealEngine/pull/2359

It will allow for large worlds in multiplayer with your plugin :slight_smile:

Yeah I read that, it appears a little unfinished/needs some revisions but the feature itself is way past due at this point so at the very least he deserves support to bring it back up.

This isn’t a smooth terrain system, it had Marching Cubes but I find MC ugly and a bad solution so I removed it, you should check out VoxelFarms WIP integration for what you want.

I’ve been working a lot with VR since getting my vive. I reorginized my Trello for this plugin though and will start back up on it, it really just needs the chunk sending to be completed on network. Sadly 4.11 did not have what I was hoping for regarding packet pipelines so I had to revert to a better version of my original implementation and spent a bit improving the compression for network sends. Its hard to be motivated about finishing the networking when I have to chunk data through RPCS as it is far from the solution I would have liked :(, in many ways it would have been far easier to finish this up on a custom engine.

I was afraid you would say that. Darn, thanks for sharing your work. VoxelFarms is a non solution for me. I would rather have a fixed price on something like that. I don’t want to pay for a library in perpetuity or lose access if I stop paying. It looks promising, but the pricing model does not work for me. That is why I was really disappointed when Cubiquity bowed out. So I will need to either roll my own, find another solution, or just make due with default solutions. I was really hoping to randomize complex terrains that looked organic.

Cubiquity in UE4 is open sourced now, you could get their last version and work from it if it suites you better.