Voxel based games

Hello!

I’m making a voxel based game, and would like to know how capable UE4 is doing just that? Is there any way to “attach” 2 “blocks” together, so that they would for a single physics collisionbox, and not fall apart when force is applied (Unless |forece of block A - the force of block B| >= X) Thanks!

I like voxlap, it’s fast (very fun demo: )
http://advsys.net/ken/voxlap/voxlap05.htm

Speed isn’t really an issue, and the consept of mine revolves heavily enough on physics&lighting for engine that primitive to be, well, problematic.

Well, for voxel engine with complex physics and lighting you will have to reinvent everything by yourself and UE4 or any other engine simply does not matter

If you just wanted to do a small test, “Welding” is supported in UE4-

https://docs.unrealengine.com/latest/INT/Engine/Physics/PhAT/UserGuide/index.html#welding

For anything as detailed as Minecraft, you could look at integrating/copying existing free code. But the short answer is no, it’s not possible because it’s not coded into the engine already. Setting up 10 000 physics cubes might be slow… well, maybe it’s possible.

I have been making plans to get better performance (for example, the blocks are only physical when you are on X radius from them, and when they are not visible/meaningfull, they are completely despawned and instead just stored as a variable). It will get a bit sketchy, but that’s how I like it :). Physics welding sounds. exactly what I was looking for, thanks!

Is it possible to call for that welding function from code? (as that would be “Kinda” important)

You might want to start here:

If you are looking to combine cubes, you can just create your own mesh and bake in the physics. Unfortunately with this example, Epic hasn’t finished baking collisions at runtime so this code only works in the editor. It is on their list of things to do, so probably by the time you are ready for release, Epic will have it out in that future version of the engine. :slight_smile: