I’m really happy that a lot of people are using Cubes for their games and are posting questions and even improvements/contributions (that helped me a lot, honestly) and it’s time to give something back again I guess.
Since I had a little spare time the last week, I worked on a system customize the meshmerger that will be used. In other words, Cubes has now greedy meshing which you can select in the settings object.
If you don’t know what greedy meshing is, I guess those screenshots can explain it:
(Left = “Default” Merger, Right = Greedy Merger)
Notice the fps improvement due to the lower amount of vertices. (400k -> 80k and 90k -> 6k)
For the ones wondering how to set it up in the code, it will be selectable in the CubesSettings object:
settings.setMeshMerger(new GreedyMerger()); settings.setBlockMaterial(new BlockChunk_MaterialGreedy(application.getAssetManager(), "Textures/cubes/terrain.png"));
As you see,you will still be able to use your own forked material (or even merger) instead of the default one for the greedy merger (But you will have to care since there are few shader and vertex information tricks going on to texture the whole thing - I will explain it all in the wiki, but just so you know you still HAVE the possibility to use your own material). Also, the whole texturing is done via @nehon’s ShaderNodes, which are greater than expected, so you will be able to reuse it somehow in your own material if you want to.
I don’t exactly know when I will release the update, maybe this week or next one, most likely when I had time to update the wiki.
So yeah, thanks all for your help, contributions and kind words.