Creating a cube-voxel world generator for fun, but I'm quickly running into performance issues. Could someone verify if my method is best practice, and if I could speed it up somehow?

Having made something involving a lot of cubes, but not like MC, I’d say, maybe focus in the area of materials and collision and instancing.

I can’t give you the exact details without looking them up, but

  1. All blocks that are supposed to be the same thing should have the same material. Maybe even just one actual material that’s held somewhere central and assigned from there.
  1. The simpler you can make the collision, the better. If the blocks only have to look out for one kind of actor, things will go faster than if you have all kinds of overlaps set ( default for BP ).

  2. Maybe the blueprints don’t actually need to contain cubes, but can add an instance to an already existing HISM when they spawn. Something like that.

Of course, the ultimate answer is write it in C++, as I’m sure someone will drop by and point out…

1 Like