I am currently working on rendering a world of blocks - I have a system so that cubes are made up of 6 Quad’s and quads that the player can’t see aren’t rendered - but when I bring the map size up to about 1000 cubes the frame rate drops significantly.
Is there a way I could increase frame rate? Such as merge all of the Quads into a single mesh. I reckon that’s probably possible but I wouldn’t know where to begin with it.
Thanks to anyone who can help
search the forum, this was around 100 times the last few month answerd. (though you are a bit ahead, most does not even hide not visible blocks.)
And it isn’t the first time he was asking this question xD http://hub.jmonkeyengine.org/groups/graphics/forum/topic/block-landscape-rendering/. Minecraft, Mythruna and 3079 were made of Voxel.
@glaucomardano said:
And it isn't the first time he was asking this question xD http://hub.jmonkeyengine.org/groups/graphics/forum/topic/block-landscape-rendering/. Minecraft, Mythruna and 3079 were made of Voxel.
I'm not asking the same question - I want to know how you could (if possible) merge many objects into one to increase frame rate.
try having a look at https://wiki.jmonkeyengine.org/legacy/doku.php/jme3:intermediate:optimization and looking into GeometryBatchFactory.optimize()
well it ws answerd in similar threads a dozen times, try the forum search.
@thetoucher The optimise method didn’t seem to work very well for me - but thanks for the info anyway :).
I have made a method so that instead of thousands of individual blocks it merges the ones it can into Box’s - this improves frame rate significantly ;D
So I guess my final question would be - Is it possible (and if so, how) to use ‘picking’ to select blocks even though they have been detached from the parent node?
My idea is to detect where the block is going to be destroyed, then replace the large Box with 4 smaller ones. I have illustrated below:
http://img72.imageshack.us/img72/4283/blocks1.png
http://img259.imageshack.us/img259/8436/blocks2.png
Thanks again to anyone who can help
Keep both data strucutres, the rendering optimized and the normal. Now when chaing stuff, do it in the normal one and regenerate the chunk for rendering on the fly. (Ever wonderd whminecraft uses chunks? this is probaly the answer, cause regenerating the whole world will need far to much cpu to do it in realtime)
@EmpirePhoenix said:
Keep both data strucutres, the rendering optimized and the normal. Now when chaing stuff, do it in the normal one and regenerate the chunk for rendering on the fly. (Ever wonderd whminecraft uses chunks? this is probaly the answer, cause regenerating the whole world will need far to much cpu to do it in realtime)
Yeah I see what you mean. Thanks :)
@EmpirePhoenix said:
(Ever wonderd whminecraft uses chunks?
3079 save the world info into .chunk files

What is 3079?